-
-
Notifications
You must be signed in to change notification settings - Fork 443
[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
Conversation
@jni This might be worth it to shoehorn into 0.6.0 give the whole triangulation backend can of worms. |
Codecov ReportAttention: Patch coverage is
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. 🚀 New features to boost your workflow:
|
napari/utils/info.py
Outdated
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) |
There was a problem hiding this comment.
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? 🤔
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
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 😬
_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()) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
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.