-
Notifications
You must be signed in to change notification settings - Fork 167
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
JP-1645 Supress CRDS unknown reftype errors while retrieving step parameter reference files. #5375
JP-1645 Supress CRDS unknown reftype errors while retrieving step parameter reference files. #5375
Conversation
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 will be nice to not see these error messages from CRDS anymore.
Just a minor comment below.
jwst/stpipe/tests/test_crds.py
Outdated
model = datamodels.ImageModel((10, 10)) | ||
model.save('image.fits') |
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 needs to be done in a with
context manager. You're leaving an open file 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.
Will do, but technically no file is open, unless the below is a bug:
>>> import jwst.datamodels as dm
>>> m = dm.ImageModel((10, 10))
>>> m.save('junk.fits')
'junk.fits'
>>> m._files_to_close
[]
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.
Interesting! I was always under the impression that once something was written, it was then tied to the file. This a nice, positive thing to discover!
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.
Other than what @jdavies-st said, looks OK to me.
Codecov Report
@@ Coverage Diff @@
## master #5375 +/- ##
==========================================
- Coverage 52.88% 52.85% -0.03%
==========================================
Files 409 409
Lines 37098 37111 +13
Branches 5760 5763 +3
==========================================
- Hits 19618 19616 -2
- Misses 16231 16246 +15
Partials 1249 1249
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Changing the status of the PR to |
This PR has been rendered unnecessary by CCD_783 |
Resolves JP-1645
Resolves #5251
Currently, the CRDS database is sparsely populated with respect to all the possible step parameter reftypes. As such, under normal usage, it is expected to not find a requested reftype. As such, suppress CRDS errors unless debugging is in effect.