Skip to content
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

Register empty 1.0.0 extension to avoid warning when opening old files #475

Merged
merged 3 commits into from
Sep 15, 2023

Conversation

braingram
Copy link
Collaborator

See #473 for more details.

Changes in #469 removed the 1.0.0 extension (which contains erroneous duplicate tags). A consequence of this removal is that opening old files produced with this extension results in the following warning:

asdf.exceptions.AsdfWarning: File was created with extension URI 'asdf://asdf-format.org/astronomy/gwcs/extensions/gwcs-1.0.0' (from package gwcs==0.18.2), which is not currently installed 

Based on discussions linked in #473 these warnings should be ignored (as the 1.0.1 and 1.1.0 extensions support all the 1.0.0 tags). Rather than describe this nuance in the documentation and request that users update files this PR takes the alternative approach proposed in #473 to register an empty extension for the 1.0.0 uri (which does not use the 1.0.0 manifest). This prevents the above warning without requiring the user to update their files (this does mean that old files will continue to have the 1.0.0 extension listed in the asdf history, a test was added to verify that the changes in this PR are sufficient to allow opening of those files without a warning).

Fixes #473

@braingram braingram requested a review from a team as a code owner September 13, 2023 13:10
@braingram braingram changed the title Empty 1.0.0 extension to avoid uninformative warnings Register empty 1.0.0 extension to avoid uninformative warnings Sep 13, 2023
@braingram braingram changed the title Register empty 1.0.0 extension to avoid uninformative warnings Register empty 1.0.0 extension to avoid warning when opening old files Sep 13, 2023
@codecov
Copy link

codecov bot commented Sep 13, 2023

Codecov Report

Patch coverage is 100.00% of modified lines.

Files Changed Coverage
gwcs/extension.py 100.00%

📢 Thoughts on this report? Let us know!.

@braingram
Copy link
Collaborator Author

jwst tests passed except for the expected 5x errors due to unreleased changes in stcal (see spacetelescope/jwst#7874)

UnboundLocalError: local variable 'n_slices' referenced before assignment

@braingram
Copy link
Collaborator Author

@pllim
Copy link
Contributor

pllim commented Sep 13, 2023

p.s. UnboundLocalError -- Wow, how did this get merged and not caught in CI first?

@nden
Copy link
Collaborator

nden commented Sep 15, 2023

Another jwst regtest run with expected failures: https://plwishmaster.stsci.edu:8081/job/RT/job/JWST-Developers-Pull-Requests/948/

@nden nden merged commit 4eb5f7a into spacetelescope:master Sep 15, 2023
22 of 23 checks passed
@nden nden added this to the 0.19 milestone Sep 15, 2023
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.

Consider adding a description in the docs about manifest changes in #469
3 participants