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

Record manifest providing package in history, use specific warning for _check_extensions #1758

Merged
merged 5 commits into from May 7, 2024

Conversation

braingram
Copy link
Contributor

@braingram braingram commented Feb 15, 2024

Description

This PR adds the package name and version for the package providing the manifest used to create an extension that was used to write the file. For example, writing out a file with this PR produces a history:

history:
  extensions:
  - !core/extension_metadata-1.0.0
    extension_class: asdf.extension._manifest.ManifestExtension
    extension_uri: asdf://asdf-format.org/core/extensions/core-1.5.0
    manifest_software: !core/software-1.0.0 {name: asdf-standard, version: 1.0.4.dev153+gcafd84a}
    software: !core/software-1.0.0 {name: asdf, version: 3.0.2.dev81+g67e7a8e3.d20240205}

This will be beneficial for tracking what software was used for the many asdf extensions that use manifests from other packages (like gwcs and asdf-wcs-schemas, roman_datamodels and rad, etc...).

This new manifest_software is also checked during AsdfFile._check_extension.

Finally, the warning class used during _check_extension was changed from the generic AsdfWarning to a more specific AsdfPackageVersionWarning (which inherits from AsdfWarning).

Fixes #1740

Checklist:

  • pre-commit checks ran successfully
  • tests ran successfully
  • for a public change, a changelog entry was added
  • for a public change, documentation was updated
  • for any new features, unit tests were added

@braingram braingram changed the title Manifest record Record manifest providing package in history, use specific warning for _check_extensions Feb 15, 2024
@braingram braingram marked this pull request as ready for review February 15, 2024 15:37
@braingram braingram requested a review from a team as a code owner February 15, 2024 15:37
@braingram braingram requested a review from eslavich March 7, 2024 15:56
@braingram braingram merged commit f64fdb8 into asdf-format:main May 7, 2024
33 checks passed
@braingram braingram deleted the manifest_record branch May 7, 2024 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Raise a warning type specific to software version mismatches when wrong version of packages is installed
2 participants