-
Notifications
You must be signed in to change notification settings - Fork 32
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
add specific exception when ellipse construction attempted without opencv-python
installed
#136
add specific exception when ellipse construction attempted without opencv-python
installed
#136
Conversation
Codecov ReportBase: 78.19% // Head: 78.45% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #136 +/- ##
==========================================
+ Coverage 78.19% 78.45% +0.25%
==========================================
Files 24 24
Lines 4843 4855 +12
==========================================
+ Hits 3787 3809 +22
+ Misses 1056 1046 -10
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
src/stcal/jump/jump.py
Outdated
'certain snowball detection and usage of ellipses will be inoperable') | ||
ELLIPSE_PACKAGE = 'opencv-python' | ||
except (ImportError, ModuleNotFoundError): | ||
ELLIPSE_PACKAGE_WARNING = '`opencv-python` must be installed (`pip install stcal[opencv]`) in order to use ellipses' |
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.
this message accompanies the ModuleNotFoundError
only if opencv
functionality is used without it being installed
Addresses spacetelescope/jwst#7409
related to spacetelescope/jwst#7414
This PR addresses the issue brought up in spacetelescope/jwst#7409; a lack of specificity when using
jump.use_ellipses = True
without anopencv
installation. Instead of aUserWarning
being printed at import time, aModuleNotFoundError
is raised in runtime if ellipse functionality is selected andopencv-python
is not detected.Checklist
CHANGES.rst
(either inBug Fixes
orChanges to API
)