8000 Populate meta.asn.table_name when association opened in ModelContainer by jdavies-st · Pull Request #4873 · spacetelescope/jwst · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Populate meta.asn.table_name when association opened in ModelContainer #4873

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

Conversation

jdavies-st
Copy link
Collaborator

Populate meta.asn.table_name in each member of the association that is loaded into a ModelContainer.

Related to #4871 #4865 and #4870.

@jdavies-st jdavies-st added this to the Build 7.5 milestone Apr 30, 2020
@jdavies-st jdavies-st requested a review from hbushouse April 30, 2020 14:29
Copy link
Collaborator
@hbushouse hbushouse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks OK to me.

Of course I guess this also means that at some point we should be able to revert some of the recent changes to do this within pipeline/step modules. But that can wait a bit till we're not under the gun to make a delivery.

@jdavies-st
Copy link
Collaborator Author

Agreed.

I should probably double-check this works when there's a catalog .ecsv file in the association. I suspect we need a try block in there. I'll add that to the tests as well.

@jdavies-st jdavies-st force-pushed the datamodels-container-populate-asn-table branch from d350b6a to 2464145 Compare May 18, 2020 17:46
@jdavies-st
Copy link
Collaborator Author

Well, it looks like the kwarg asn_exptypes="science" needs to be added to datamodels.open() for associations that have non-datamodels such as .ecsv catalogs. So it never even makes it to opening. I added a try/except just in case the attributes are not there for some reason. I also expanded the one test we have to exercise the asn_exptypes keyword, which was not tested.

@jdavies-st jdavies-st force-pushed the datamodels-container-populate-asn-table branch from 2464145 to 05e6eb0 Compare May 18, 2020 18:35
@codecov
Copy link
codecov bot commented May 18, 2020

Codecov Report

Merging #4873 into master will increase coverage by 0.01%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4873      +/-   ##
==========================================
+ Coverage   52.46%   52.47%   +0.01%     
==========================================
  Files         403      403              
  Lines       35723    35729       +6     
  Branches     5543     5544       +1     
==========================================
+ Hits        18742    18750       +8     
+ Misses      15843    15841       -2     
  Partials     1138     1138              
Flag Coverage Δ
#unit 52.47% <66.66%> (+0.01%) ⬆️
Impacted Files Coverage Δ
jwst/datamodels/container.py 67.58% <66.66%> (+2.24%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f5ea2b3...05e6eb0. Read the comment docs.

@jdavies-st jdavies-st merged commit 476eecb into spacetelescope:master May 18, 2020
@jdavies-st jdavies-st deleted the datamodels-container-populate-asn-table branch May 18, 2020 19:22
stscieisenhamer pushed a commit to stscieisenhamer/jwst that referenced this pull request Jun 5, 2020
spacetelescope#4873)

* Populate meta.asn.table_name when association opened in ModelContainer

* Make sure ModelContainer init from asn with non-science works
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0