-
Notifications
You must be signed in to change notification settings - Fork 13
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
updates for upcoming ASDF standard 1.6.0 #324
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #324 +/- ##
==========================================
+ Coverage 96.36% 97.74% +1.38%
==========================================
Files 51 34 -17
Lines 2832 1994 -838
==========================================
- Hits 2729 1949 -780
+ Misses 103 45 -58 ☔ View full report in Codecov by Sentry. |
73f86aa
to
913a9c3
Compare
update schemas to support upcoming asdf standard 1.6.0
a271a6e
to
f6f5d61
Compare
Hi @braingram Thanks so much for this PR (and the sunpy one). The code changes look good, but I have a couple of questions mainly so I understand this properly. I generally try and stick to SPEC-0 dependency rules (so 2 years for most deps), but I am willing to not do this for ASDF things where it makes sense, because that seems to be a challenge. With regards to the minimum dependencies, if we have those new minimums installed would we write files which use 1.6.0? or would it be the minimum needed to read a file written with 1.6.0? |
Thanks! SPEC-0 is new to me. asdf does not currently support older releases and unfortunately we do not have the bandwidth of the This might be possible but I suspect that this PR will instead need to restrict dkist to using ASDF standard 1.5.0 as asdf 2.11 produces invalid files if told to write out 1.6.0.
Currently 1.6.0 is not yet the default in asdf (switching that will occur at the next major version change, 4.0, which we are hoping to release in the next 6 months but don't have a hard ETA). So a call to AsdfFile.write_to with no |
That's the default position. As I say though I am happy for there to be well reasoned exceptions.
Under what conditions would asdf 2.11 write out a 1.6.0 file?
So asdf wont write a 1.6.0 file by default until we write a file out with asdf 4.0+ installed? |
Oh the other thing I should make clear is that we write out files with the minimum versions of all these packages at the data center, so that we don't throw warnings about the users env being too old when it is within the minimums for the given version of the So I am also trying to understand what the impact would be on us starting to generate our production files with these new minimums. |
Thanks for the reply. I certainly want to find a solution that fixes the most issues with minimal impact.
In asdf 2.11 it is possible to provide I am not aware of any code in the asdf downstream that provides a version to
Exactly! I think the main issue here is the schema tests in
It's possible to disable these schema tests for |
deead5b
to
6d9f1df
Compare
{env:PYTEST_COMMAND} \ | ||
online: --remote-data=any \ | ||
# It's not possible to test the new schemas with the oldest dependencies | ||
# as the new schemas require new dependent schemas | ||
oldestdeps: -o asdf_schema_tests_enabled=false | ||
{posargs} |
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.
oh hey, I didn't know you could do that 🤔
Thanks a lot for this @braingram and taking the time to explain it all to me. |
asdf is working on making the current development version of the ASDF standard (1.6.0) stable (see asdf-format/asdf#1744 for details). As the 1.6.0 version contains new versions of a few core schemas (including ndarray) many dependent schemas will require updates to be compatible with the new version (if they contain
$ref
ortag
links to core schemas).This PR updates the
dkist
schemas to be compatible with ASDF standard 1.6.0. One example of a required update (for ASDF 1.6.0 compatibility) is updating thetransform
$ref
s found in severaldkist
schemas to transform-1.3.0. The schema updates were accompanied by creation of a newdkist-wcs-1.3.0
extension.Similar updates will be needed for
sunpy
(see: sunpy/sunpy#7432) to allowdkist
to be fully compatible with ASDF standard 1.6.0. (see this run where asdf switched the default to 1.6.0 and dkist tests were run with this PR and the sunpy PR: https://github.com/asdf-format/asdf/actions/runs/8345268069/job/22843626280?pr=1744).A few minor schema fixes were also added:
id
s to matchuri
s used to register manifests with asdfextension_uri
for each extensionvarying_celestial_transform
schemaSeveral dependency changes are also included (more on this below):
asdf-unit-schemas
as a dependency (this package only provided redundant schemas and has been decommissioned: https://github.com/asdf-format/asdf-unit-schemas)asdf
to 2.14.4. This was needed for 2 reasons:pytest-asdf
plugin to test the examples in the new schemas (which useasdf-standard
requirements)asdf
included experimental support for the development standard (1.6.0). However versions before 2.14 fail to fully support the current state of the ASDF 1.6.0 standard (they will write out files using the oldndarray-1.0.0
tag instead of the requiredndarray-1.1.0
tag). If a user forced asdf to use the development standard they will have produced files that may not be compatible with the current ASDF 1.6.0 standard. This also means that if theminimum-dependencies
CI attempts to use a version of asdf < 2.14 that it will produce invalid files and errors.asdf-transform-schemas
version to allow thedkist
schema tests in theminimum-dependencies
job to find the newtransform-1.3.0
schema (also increase theasdf-standard
version to match the minimum in that version ofasdf-transform-schemas
)asdf-astropy
version to make it aware of the updatedasdf-transform-schemas
to allow it to test the new schemas during theminimum-dependencies
job (and increase theasdf-coordinate-schemas
version to match the requirement inasdf-astropy
).Many of the minimum version bumps above were required to allow the schema tests to pass in the
minimum-dependencies
job. If these version increases are not an issue I think they are overall improvements (and reduce the risk that say an old environment is updated and does not pick up the required schemas). If the minimum version increases are an issue one thing to consider would be disabling the schema tests during theminimum-dependencies
job.