8000 [maint, enh] Add experimental settings status to napari --info by psobolewskiPhD · Pull Request #7857 · napari/napari · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[maint, enh] Add experimental settings status to napari --info #7857

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 29, 2025

Conversation

psobolewskiPhD
Copy link
Member
@psobolewskiPhD psobolewskiPhD commented Apr 24, 2025

References and relevant issues

closes: #7856

Description

This PR ensures that napari --info will report the experimental settings: async, autoswap_buffers, and triangulation backend. (For the latter one I added a env var.)
This will help troubleshooting when folks post napari info.

Edit: I specifically don't include the other settings from Experimental because they arn't really experimental, they are settings for individual tools (lasso tool and labels polygon tool) that were put there for lack of better place. They probably belong in either Application or a new pane. Also, they don't affect napari behavior as a whole.

@psobolewskiPhD psobolewskiPhD requested review from Czaki, jni and a team as code owners April 24, 2025 01:17
@psobolewskiPhD psobolewskiPhD added enhancement maintenance PR with maintance changes, labels Apr 24, 2025
@psobolewskiPhD
Copy link
Member Author

@jni This might be worth it to shoehorn into 0.6.0 give the whole triangulation backend can of worms.

Copy link
codecov bot commented Apr 24, 2025

Codecov Report

Attention: Patch coverage is 71.42857% with 4 lines in your changes missing coverage. Please review.

Project coverage is 92.95%. Comparing base (dd73493) to head (59c72e9).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
napari/utils/info.py 71.42% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7857      +/-   ##
==========================================
+ Coverage   92.91%   92.95%   +0.03%     
==========================================
  Files         641      641              
  Lines       60335    60346      +11     
==========================================
+ Hits        56060    56092      +32     
+ Misses       4275     4254      -21     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

except ValueError:
from napari.utils._appdirs import user_config_dir

text += f' - {os.getenv("NAPARI_CONFIG", user_config_dir())}'
_async_setting = os.getenv('NAPARI_ASYNC', False)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this ValueError meant to catch? 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea. Was there already so I didn't want to rock the boat.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm. Well, for now, CI is failing. 😂 It may have something to do with types — I think the output of getenv is supposed to be always a string...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just pushed a try to fix the typing. I have no idea about the shapes triangulation seg fault 😬

@jni jni added this to the 0.6.0 milestone Apr 25, 2025
@jni jni added the ready to merge Last chance for comments! Will be merged in ~24h label Apr 25, 2025
Comment on lines +226 to +231
_async_setting = str(os.getenv('NAPARI_ASYNC', 'False'))
_autoswap_buffers = str(os.getenv('NAPARI_AUTOSWAP', 'False'))
_triangulation_backend = str(
os.getenv('NAPARI_TRIANGULATION_BACKEND', 'Fastest available')
)
_config_path = os.getenv('NAPARI_CONFIG', user_config_dir())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we need this ValueError path?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dunno, you added it 🤣
I'm not sure what case triggers it, maybe CI?

8000 Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, confirm it was added in #5333. That discussion was fun to read a few years later 😊 but offered no clues as to why this try/except is here. 😕 I agree with @psobolewskiPhD that it's probably best not to mess with it in this PR.

@jni jni merged commit 9bc8a76 into napari:main Apr 29, 2025
44 checks passed
@jni jni removed the enhancement label Apr 29, 2025
@github-actions github-actions bot removed the ready to merge Last chance for comments! Will be merged in ~24h label Apr 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance PR with maintance changes, preferences
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ensure napari --info reports experimental settings: async, triangulation backend
3 participants
0