-
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
RCAL-991: support passing a file to rdm.open #453
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #453 +/- ##
==========================================
- Coverage 97.56% 97.24% -0.32%
==========================================
Files 30 37 +7
Lines 2788 3302 +514
==========================================
+ Hits 2720 3211 +491
- Misses 68 91 +23 ☔ View full report in Codecov by Sentry. |
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.
Looks good to me, thanks Brett. I think your choice of "do nothing if it's not a path" is probably the right one, though it is a bit awkward that rdm.open(open(path)) and rdm.open(path) will do different things. Part of the motivation here was wanting to give files the right names by default if we we opened files from a particular name. Is there an appropriate hint for an S3 file that we should use instead, or should we give up? Thanks!
Thanks! This awkwardness exists for
Both with this PR (for file-like input as is the case for |
Resolves RCAL-991
Closes #449
This PR restores (unofficial) support for passing file-like objects to
rdm.open
and updates docstrings to make it "official".Tasks
roman_datamodels
tests.docs/
page.no-changelog-entry-needed
.)changes/
:echo "changed something" > changes/<PR#>.<changetype>.rst
(see below for change types).romancal
regression test (https://github.com/spacetelescope/RegressionTests/actions/workflows/romancal.yml) with this branch installed ("git+https://github.com/<fork>/rad@<branch>"
).News fragment change types:
changes/<PR#>.feature.rst
: new featurechanges/<PR#>.bugfix.rst
: fixes an issuechanges/<PR#>.doc.rst
: documentation changechanges/<PR#>.removal.rst
: deprecation or removal of public APIchanges/<PR#>.misc.rst
: infrastructure or miscellaneous change