-
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
update spatial data schema #655
update spatial data schema #655
Conversation
Codecov Report
@@ Coverage Diff @@
## master #655 +/- ##
=======================================
Coverage 96.08% 96.08%
=======================================
Files 91 91
Lines 5895 5906 +11
=======================================
+ Hits 5664 5675 +11
Misses 231 231
Continue to review full report at Codecov.
|
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.
Something I am asking myself now is how the standard version and the schema versions are tied together:
If I modify another schema from version 0.1.0
to 0.1.1
, will the standard still remain at 0.1.1
or does it bump to 0.1.2
since it is different from the previous 0.1.1
? Or does the schema version automatically raise from 0.1.0
to 0.1.2
skipping 0.1.1
. I guess the latter case makes more sense and the increments of the standard version are always tied to a new standard release (independent from a weldx release). So all schemas that are modified during a standard release have the same version number as the standard regardless of their previous version number.
oneOf: | ||
- tag: "tag:stsci.edu:asdf/core/ndarray-1.*" | ||
properties: | ||
datatype: | ||
type: string | ||
enum: [float32, float64] | ||
wx_shape: [(~), 3] | ||
- tag: "asdf://weldx.bam.de/weldx/tags/core/data_array-0.1.*" | ||
wx_shape: [..., 3] |
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.
Seeing this gets me thinking (also in the context of the GerericSeries
) that the wx_shape
validator should probably be able to deal with dimension names when used in conjunction with a data_array
schema. For example, instead of [..., 3]
we could write [..., c=3]
. The latter case would express "any number of dimensions with arbitrary shape, but c
must have shape (3,)
" I think this would simplify things a bit since we do not need to define a coordinate order to fulfill the requirement. Maybe we should give this a different name (wx_coordinate_shape
?) to avoid confusions.
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.
agreed, in general I think it would be a good addition to have a powerful validator for xarray structures
the overall structure and implementation probably needs some planning
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.
Should I create a new issue as reminder?
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.
yes that never hurts 😉
weldx/schemas/weldx.bam.de/weldx/core/geometry/spatial_data-0.1.1.yaml
Outdated
Show resolved
Hide resolved
My idea for now was the following:
So right now we can gather all the work we do on schemas under the |
So in this case, schema version numbers are not coupled to the standard version? Means, if the standard changes from |
yes those are independent (and I would prefer to keep the changes in schema versions also following the semantic versioning for themselfes) The coupling to the 'standard' version is only defined by the listing in the manifest file |
Changes
core/geometry/spatial_data
schema to support >2 dimensional arrays as xarray.DataArraywx_shape
validation support forcore/data_array
0.1.1
Related Issues
Closes # (add issue numbers)
Checks