-
Notifications
You must be signed in to change notification settings - Fork 10
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
Schema updates for current and upcoming asdf changes #910
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #910 +/- ##
==========================================
- Coverage 96.48% 96.12% -0.37%
==========================================
Files 95 95
Lines 6293 6347 +54
==========================================
+ Hits 6072 6101 +29
- Misses 221 246 +25 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
104dcdf
to
f9dca49
Compare
Hi @braingram, I am planning a rework on some of the code for asdf>=3 (hopefully soon) |
Thanks for taking a look!
That sounds great. Let me know if there's anything I can do to help (and feel free to ping me when the changes are ready for review or if you run into any issues). There are a few changes in 3.1.0 (changelog here) that might be useful including:
|
Thank you, I followed the 3.0/3.1 release notes and the changes will make for some big QOL improvements here! |
9d28fb7
to
7ec0aa2
Compare
adf7b16
to
1c85c27
Compare
FYI the asdf development branch will soon be transitioning to asdf 4.0 where ASDF standard 1.6.0 will be the default. |
f237191
to
c3ce41d
Compare
The next version of the ASDF standard (1.6.0) contains a new version of the ndarray schema (ndarray-1.1.0). Examples that explicitly use ndarray-1.0.0 will only work with the older standard versions (<1.6.0). This doesn't impact file reading and writing (as if 1.5.0 is used for write, ndarray-1.0.0 will be used, if 1.6.0 is used, ndarray-1.1.0 will be used). However the schema examples require hard-coded yaml that is less flexible than real files and require a restriction like that added in this commit.
c3ce41d
to
54e0bd7
Compare
Following up on #952 I modified this PR to also unpin asdf. I also noticed that there is an import of Lines 120 to 121 in c8457bf
AsdfSpec was deprecated in asdf 3.3.0 and I can't find any places in weldx where an AsdfSpec is provided to format_tag so I updated this PR to remove the AsdfSpec usage. See asdf-format/asdf#1772 for motivation why AsdfSpec was removed.
|
Also tests like this one: weldx/weldx/tests/asdf_tests/test_weldx_file.py Lines 324 to 325 in c8457bf
appear to be relying on asdf validating a tree provided via AsdfFile(tree) . This behavior was deprecated in asdf 3.1.0 (see asdf-format/asdf#1691) and removed in asdf 4.0.0.
I modified this PR to call |
Changes
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). This PR updates the weldx schemas for these upcoming changes (and applies a few other related fixes).
ndarray-1.0.0
adding aasdf-standard
requirement to force these examples to use ASDF standard 1.5.0 (wherendarray-1.0.0
exists)For the manifests, the
id
in the files follow the form.../weldx/manifests/...
weldx/weldx/manifests/weldx-0.1.2.yaml
Line 3 in 2bceb68
However these files are registered:
weldx/weldx/asdf/extension.py
Lines 27 to 33 in 2bceb68
using the
WELDX_EXTENSION_URI_BASE
uri prefix:weldx/weldx/asdf/constants.py
Line 9 in 2bceb68
which uses
.../weldx/extensions
. This means that these manifest resources are available (via the asdfresource_manager
) using../weldx/extensions/...
uris yet have ids with.../weldx/manifests/
This PR changes the
id
s to match theuri
s.This PR also updates
SerializationContext
imports to useasdf.extension
for asdf version >= 3.0.0 to avoidDeprecationWarning
messages form importingasdf.asdf
andSerializationContext
fromasdf.asdf
.Related Issues
Fixes #900
Checks
CHANGELOG.md
tests/
doc/