-
Notifications
You must be signed in to change notification settings - Fork 4
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
Use dynaconf for user preferences #99
Conversation
Codecov Report
@@ Coverage Diff @@
## main #99 +/- ##
==========================================
- Coverage 92.30% 91.89% -0.41%
==========================================
Files 39 40 +1
Lines 3078 3233 +155
==========================================
+ Hits 2841 2971 +130
- Misses 237 262 +25
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
8918edf
to
e12d6f8
Compare
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.
Nice! Just some minor comments. Feel free to act on or ignore them as you see fit.
60b5c17
to
6ac06fa
Compare
6ac06fa
to
0739c9d
Compare
@gselzer This is looking really nice! I ran into a couple of problems, like one does: JVMNotRunningI tried changing
Console error
Suboptimal dialog message when clicking ImageJ GUI button on macOSThe message I receive is: "The ImageJ2 user interface cannot be opened when running PyImageJ headlessly. Visit this site for more information." Which is correct, but what is not explained is that because I'm on macOS, napari-imagej has no choice but to run in headless mode, and interactive mode is not available. I think this could be better communicated to users. Relatedly: I'm not sure if on non-Mac platforms, the settings dialog has a toggle between headless and interactive, but I don't see it on macOS. |
I looked into why the If I change I was worried that Maven finally killed support for the special |
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.
LGTM!
A couple things I'd like to add before merge:
|
Maybe later we could use the new settings_change signal to incorporate some of the changes without a restart, but a restart is unavoidable for other settings (the imagej directory/endpoint being the poster child for this)
Due to the way confuse maintains settings changes, we can get different settings orderings in the popup as a function of the previous edits made. By editing over the settings present in the DEFAULT source (src/napari-imagej/config-default.yaml), we get two nice effects: 1. Settings will always appear in the order listed in the default configuration file 2. Defined settings that are NOT in the default configuration file are not listed in this popup. This could happen if the user hacked their own configuration, for example. Unfortunately, this does not fix the way that settings changes are dumped into the user's settings. Thus the settings can still appear out of order in the user's file. More work needed on that one...
6b64a73
to
65f4133
Compare
3a5a5c1
to
f1ea36d
Compare
This change was motivated by @imagejan's comments, but I also took the liberty of documenting the function
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 only got through part of it, but gotta run now. Will do the rest later!
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.
Finished the review!
fb645e8
to
5dca3dc
Compare
52f4b22
to
4dfc6ac
Compare
Thanks to resetting the configuration, we don't care about modified settings
We really only need to run it once per pytest run
Ensure that: 1. The setting doesn't change 2. A popup appears saying why it didn't change
92e66e3
to
ed868fc
Compare
This PR introduces
dynaconf
as a preferences management tool, and removes bugs associated with relative paths.