-
Notifications
You must be signed in to change notification settings - Fork 21
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
feat: Allow passing a config from command line #257
Conversation
happy to get this in @ianhi ... but there are two comments that need addressing and merge conflicts to fix |
Yup, I'm catching up on some github things this week. hope to address this and several other things soon. |
very strange. I can't reproduce these errors locally, even with new environment |
oh actually, I can reproduce it if I run |
tests/test_main.py
Outdated
import napari | ||
from napari.qt import QtViewer | ||
|
||
with patch("napari.run") as mock_run: | ||
with patch("qtpy.QtWidgets.QMainWindow.show") as mock_show: | ||
main() | ||
with patch("napari.utils.notifications.show_warning") as mock_warning: |
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.
It seems that this patch isn't actually patching (i.e. the warning still gets displayed) and it is never called.
Any idea what I'm doing wrong here?
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.
not immediately, but you know what... just use warnings.warn()
, napari will intercept that anyway and show a warning in the UI (or at least it used to?)
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.
hmm it doesn't seem to capture it in the same way. maybe i need to change the level
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.
oh, it's possible that the napari warnings hook hasn't yet been invoked by this point?
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.
actually scratch that, now the show warnign is also not showing, so maybe just going away to quickly. it still shows up in teh terminal
This was very helpful thank you! |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #257 +/- ##
==========================================
+ Coverage 78.24% 79.04% +0.80%
==========================================
Files 15 15
Lines 671 692 +21
==========================================
+ Hits 525 547 +22
+ Misses 146 145 -1 ☔ View full report in Codecov by Sentry. |
i finished this up |
Allows for
closes #252