-
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 596 Updates for association processing #241
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 is not clear to me why it is necessary to revert #219; however, in any case the current merge conflict will require a major change to the proposed rdm_open
changes.
As the currently proposed changes are a bit overkill, I suggest replacing
roman_datamodels/src/roman_datamodels/datamodels/_utils.py
Lines 87 to 90 in 7b5f02f
# Temp fix to catch JWST args before being passed to asdf open | |
if "asn_n_members" in kwargs: | |
del kwargs["asn_n_members"] |
if isinstance(init, str):
exts = Path(init).suffixes
if not exts:
raise ValueError(f"Input file path does not have an extension: {init}")
# Assume json files are asn and return them
if exts[0] == "json":
return init
# Temp fix to catch JWST args before being passed to asdf open
if "asn_n_members" in kwargs:
del kwargs["asn_n_members"]
(Additionally, add from pathlib import Path
as part of the imports)
This effectively implements the same guarding logic and should return the file path in the asn (assumed when json is passed) as this code currently does.
for more information, see https://pre-commit.ci
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #241 +/- ##
==========================================
- Coverage 96.87% 96.67% -0.20%
==========================================
Files 28 28
Lines 2399 2406 +7
==========================================
+ Hits 2324 2326 +2
- Misses 75 80 +5
☔ View full report in Codecov by Sentry. |
docs build is failing with the following import error:
|
Resolves RCAL-nnnn
Closes #242
This PR adds a method to identify an association file for processing in the Roman pipeline along a test.
Regresssion testing will be done for the rcal-596 ticket.
Checklist
CHANGES.rst
under the corresponding subsectionpytest tests
=============================================================== test session starts ================================================================
platform darwin -- Python 3.11.0, pytest-7.4.0, pluggy-1.2.0
rootdir: /Users/ddavis/src/Roman/roman_datamodels
configfile: pyproject.toml
plugins: remotedata-0.4.0, asdf-2.15.0, hypothesis-6.82.0, doctestplus-0.13.0, cov-4.1.0, filter-subpackage-0.1.2, mock-3.11.1, astropy-header-0.2.2, astropy-0.10.0, ci-watson-0.6.1, openfiles-0.5.0, env-0.8.2, arraydiff-0.5.0
collected 1115 items
tests/test_maker_utils.py .................................................................................................................. [ 10%]
............................................................................................................................... [ 21%]
tests/test_models.py ....................................................................................................................... [ 32%]
............................................................................................................................................ [ 44%]
............................................................................................................................................ [ 57%]
............................................................................................................................................ [ 69%]
...................................................................... [ 76%]
tests/test_open.py ...................................................... [ 81%]
tests/test_stnode.py ....................................................................................................................... [ 91%]
............................................................................................ [100%]
============================================================== 1115 passed in 41.48s