Skip to content

Conversation

@nden
Copy link
Collaborator

@nden nden commented Apr 26, 2023

Resolves JP-nnnn

Closes #

This PR addresses an issue with data model inheritance. Models inheriting from stdatamodels.jwst.DataModel do not register as instances of DataModel. For example isinstance(SlitModel(), stdatamodels.jwst.datamodels.DataModel returns False. Since stdatamodels.jwst.datamodels.DataModel is deprecated n favor of stdatamodels.jwst.datamodels.JwstDataModel I've replaced any occurrence of DatModel with JwstDataModel.

Checklist for maintainers

  • added entry in CHANGES.rst within the relevant release section
  • updated or added relevant tests
  • updated relevant documentation
  • added relevant milestone
  • added relevant label(s)
  • ran regression tests, post a link to the Jenkins job below.
    How to run regression tests on a PR
  • Make sure the JIRA ticket is resolved properly

regression tests: https://plwishmaster.stsci.edu:8081/job/RT/job/JWST-Developers-Pull-Requests/695/

@codecov
Copy link

codecov bot commented Apr 26, 2023

Codecov Report

Patch coverage: 78.94% and project coverage change: -0.01 ⚠️

Comparison is base (001e188) 77.57% compared to head (8cca620) 77.56%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7571      +/-   ##
==========================================
- Coverage   77.57%   77.56%   -0.01%     
==========================================
  Files         455      455              
  Lines       36340    36340              
==========================================
- Hits        28189    28188       -1     
- Misses       8151     8152       +1     
Flag Coverage Δ *Carryforward flag
nightly 77.62% <ø> (-0.01%) ⬇️ Carriedforward from db57f02

*This pull request uses carry forward flags. Click here to find out more.

Impacted Files Coverage Δ
jwst/outlier_detection/outlier_detection.py 89.90% <ø> (ø)
jwst/outlier_detection/outlier_detection_ifu.py 91.26% <ø> (ø)
jwst/outlier_detection/outlier_detection_scaled.py 21.12% <ø> (ø)
jwst/outlier_detection/outlier_detection_spec.py 69.56% <ø> (ø)
jwst/pipeline/calwebb_image2.py 85.50% <0.00%> (-1.45%) ⬇️
jwst/resample/resample_spec.py 78.37% <ø> (ø)
jwst/assign_wcs/util.py 83.86% <50.00%> (ø)
jwst/assign_wcs/pointing.py 94.92% <75.00%> (ø)
jwst/datamodels/container.py 81.72% <85.71%> (ø)
jwst/model_blender/blender.py 78.40% <100.00%> (ø)
... and 1 more

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@hbushouse hbushouse added this to the Build 9.3 milestone Apr 26, 2023
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.

Just caught one minor typo.

@hbushouse
Copy link
Collaborator

When you do a regtest run, be sure to specify "stdatamodels==1.4.0" in the OVERRIDE_REQUIREMENTS field, so that you don't get spurious errors/differences due to the new NIRCam grism transforms.

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.

LGTM

@hbushouse
Copy link
Collaborator

Is there a github issue or JP ticket tracking this problem?

@hbushouse hbushouse merged commit 269bedc into spacetelescope:master Apr 27, 2023
@nden
Copy link
Collaborator Author

nden commented Apr 27, 2023

No, there isn't a ticket. Should I write a Github or JP ticket?

@tapastro
Copy link
Contributor

I think there are many more occurrences of DataModel in the pipeline - should they all be changed to JwstDataModel, or were these changes targeted?

@hbushouse
Copy link
Collaborator

No, there isn't a ticket. Should I write a Github or JP ticket?

I think a github issue would be good and sufficient. No need to bother folks who monitor the JP project.

@nden
Copy link
Collaborator Author

nden commented Apr 27, 2023

I think there are many more occurrences of DataModel in the pipeline - should they all be changed to JwstDataModel, or were these changes targeted?

Are there? In code or docstrings? I guess I missed them. I'd like to fix all of them.

@nden nden mentioned this pull request Apr 27, 2023
@nden nden deleted the datamodel-inheritence branch July 13, 2023 11:48
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.

3 participants