Skip to content

Commit

Permalink
restrict schema tests using ndarray-1.0.0 to stardard 1.5.0
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
braingram committed Mar 22, 2024
1 parent e24ede5 commit 2ee0569
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ description: |
examples:
-
- A simple `SpatialData` with triangulation
- asdf-standard-1.5.0
- |
!<asdf://weldx.bam.de/weldx/tags/core/geometry/spatial_data-0.1.0>
coordinates: !core/ndarray-1.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ description: |
examples:
-
- A simple `SpatialData` with triangulation
- asdf-standard-1.5.0
- |
!<asdf://weldx.bam.de/weldx/tags/core/geometry/spatial_data-0.1.1>
coordinates: !<asdf://weldx.bam.de/weldx/tags/units/quantity-0.1.0>
Expand All @@ -32,6 +33,7 @@ examples:
shape: [2, 3]
-
- A `SpatialData` object with data in three dimensions
- asdf-standard-1.5.0
- |
!<asdf://weldx.bam.de/weldx/tags/core/geometry/spatial_data-0.1.1>
coordinates: !<asdf://weldx.bam.de/weldx/tags/core/data_array-0.1.0>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ examples:
value: 10.0
-
- A time_series describing a sine oscillation in 3d space along the z-axis
- asdf-standard-1.5.0
- |
!<asdf://weldx.bam.de/weldx/tags/core/time_series-0.1.0>
expression: !<asdf://weldx.bam.de/weldx/tags/core/mathematical_expression-0.1.0>
Expand Down
2 changes: 2 additions & 0 deletions weldx/schemas/weldx.bam.de/weldx/core/time_series-0.1.1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ examples:
value: 10.0
-
- A time series of 4 discrete points
- asdf-standard-1.5.0
- |
!<asdf://weldx.bam.de/weldx/tags/core/time_series-0.1.1>
values: !core/ndarray-1.0.0
Expand All @@ -33,6 +34,7 @@ examples:
interpolation: step
-
- A time_series describing a sine oscillation in 3d space along the z-axis
- asdf-standard-1.5.0
- |
!<asdf://weldx.bam.de/weldx/tags/core/time_series-0.1.1>
expression: !<asdf://weldx.bam.de/weldx/tags/core/mathematical_expression-0.1.0>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ description: |
examples:
-
- A constant transformation describing a translation of 1 mm into the z direction
- asdf-standard-1.5.0
- |
!<asdf://weldx.bam.de/weldx/tags/core/transformations/local_coordinate_system-0.1.0>
coordinates: !<asdf://weldx.bam.de/weldx/tags/core/variable-0.1.0>
Expand All @@ -26,6 +27,7 @@ examples:
- |
A time dependent transformation describing a linear movement from 5 mm to 295 mm
over 20 seconds along the x-axis direction.
- asdf-standard-1.5.0
- |
!<asdf://weldx.bam.de/weldx/tags/core/transformations/local_coordinate_system-0.1.0>
time: !<asdf://weldx.bam.de/weldx/tags/time/timedeltaindex-0.1.0>
Expand All @@ -50,6 +52,7 @@ examples:
shape: [2, 3]
-
- A static transformation describing an euler rotation of 45 degree around the x-axis.
- asdf-standard-1.5.0
- |
!<asdf://weldx.bam.de/weldx/tags/core/transformations/local_coordinate_system-0.1.0>
orientations: !<asdf://weldx.bam.de/weldx/tags/core/variable-0.1.0>
Expand All @@ -67,6 +70,7 @@ examples:
- |
A time dependent transformation describing an euler rotation around the y-axis from 0 degree to 120 degree
over 20 seconds.
- asdf-standard-1.5.0
- |
!<asdf://weldx.bam.de/weldx/tags/core/transformations/local_coordinate_system-0.1.0>
time: !<asdf://weldx.bam.de/weldx/tags/time/timedeltaindex-0.1.0>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ description: |
examples:
-
- A constant transformation describing a translation of 1 mm into the z direction
- asdf-standard-1.5.0
- |
!<asdf://weldx.bam.de/weldx/tags/core/transformations/local_coordinate_system-0.1.1>
coordinates: !<asdf://weldx.bam.de/weldx/tags/core/variable-0.1.0>
Expand All @@ -26,6 +27,7 @@ examples:
- |
A time dependent transformation describing a linear movement from 5 mm to 295 mm
over 20 seconds along the x-axis direction.
- asdf-standard-1.5.0
- |
!<asdf://weldx.bam.de/weldx/tags/core/transformations/local_coordinate_system-0.1.1>
time: !<asdf://weldx.bam.de/weldx/tags/time/timedeltaindex-0.1.0>
Expand All @@ -50,6 +52,7 @@ examples:
shape: [2, 3]
-
- A static transformation describing an euler rotation of 45 degree around the x-axis.
- asdf-standard-1.5.0
- |
!<asdf://weldx.bam.de/weldx/tags/core/transformations/local_coordinate_system-0.1.1>
orientations: !<asdf://weldx.bam.de/weldx/tags/core/variable-0.1.0>
Expand All @@ -67,6 +70,7 @@ examples:
- |
A time dependent transformation describing an euler rotation around the y-axis from 0 degree to 120 degree
over 20 seconds.
- asdf-standard-1.5.0
- |
!<asdf://weldx.bam.de/weldx/tags/core/transformations/local_coordinate_system-0.1.1>
time: !<asdf://weldx.bam.de/weldx/tags/time/timedeltaindex-0.1.0>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ description: |
examples:
-
- A "xyz" euler rotation with 10, 20 and 60 degree angles as euler representation.
- asdf-standard-1.5.0
- |
!<asdf://weldx.bam.de/weldx/tags/core/transformations/rotation-0.1.0>
angles: !<asdf://weldx.bam.de/weldx/tags/units/quantity-0.1.0>
Expand All @@ -22,6 +23,7 @@ examples:
sequence: xyz
-
- The quaternion rotation representation
- asdf-standard-1.5.0
- |
!<asdf://weldx.bam.de/weldx/tags/core/transformations/rotation-0.1.0>
quaternions: !core/ndarray-1.0.0
Expand All @@ -30,6 +32,7 @@ examples:
shape: [4]
-
- The matrix rotation representation.
- asdf-standard-1.5.0
- |
!<asdf://weldx.bam.de/weldx/tags/core/transformations/rotation-0.1.0>
matrix: !core/ndarray-1.0.0
Expand All @@ -41,6 +44,7 @@ examples:
shape: [3, 3]
-
- The rotation vector representation.
- asdf-standard-1.5.0
- |
!<asdf://weldx.bam.de/weldx/tags/core/transformations/rotation-0.1.0>
rotvec: !core/ndarray-1.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ properties:
examples:
-
- Two seams with a single layer and bead, but the first seam has two weldments while the second has only one.
- asdf-standard-1.5.0
- |
!<tag:stsci.edu:asdf/core/asdf-1.1.0>
weld_seam:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ required: [weld_seam]
examples:
-
- Two seams with a single layer and bead, but the first seam has two weldments while the second has only one.
- asdf-standard-1.5.0
- |
!<tag:stsci.edu:asdf/core/asdf-1.1.0>
weld_seam:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ required: [process, equipment, workpiece, measurements, welding_current, welding
examples:
-
- A simple welding application
- asdf-standard-1.5.0
- |
!<tag:stsci.edu:asdf/core/asdf-1.1.0>
TCP: !<asdf://weldx.bam.de/weldx/tags/core/transformations/local_coordinate_system-0.1.0>
Expand Down
1 change: 1 addition & 0 deletions weldx/schemas/weldx.bam.de/weldx/process/GMAW-0.1.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ examples:
tag: CLOOS/pulse
-
- A spray arc process where the voltage decreases linearly from 40 V to 20 V over 10 s
- asdf-standard-1.5.0
- |
!<asdf://weldx.bam.de/weldx/tags/process/CLOOS/spray_arc-0.1.0>
base_process: spray
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ examples:
max: !<asdf://weldx.bam.de/weldx/tags/time/timedelta-0.1.0> P0DT0H0M10S
-
- An irregular timedeltaindex representing timestamps at 0 s, 4 s, 6 s and 10 s
- asdf-standard-1.5.0
- |
!<asdf://weldx.bam.de/weldx/tags/time/timedeltaindex-0.1.0>
values: !core/ndarray-1.0.0
Expand Down
2 changes: 2 additions & 0 deletions weldx/schemas/weldx.bam.de/weldx/units/quantity-0.1.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ examples:
units: !<asdf://weldx.bam.de/weldx/tags/units/units-0.1.0> kilometer
-
- A quantity with an array of values
- asdf-standard-1.5.0
- |
!<asdf://weldx.bam.de/weldx/tags/units/quantity-0.1.0>
value: !core/ndarray-1.0.0 [1, 2, 3, 4]
units: !<asdf://weldx.bam.de/weldx/tags/units/units-0.1.0> ampere
-
- A quantity with an n-dimensional array of values
- asdf-standard-1.5.0
- |
!<asdf://weldx.bam.de/weldx/tags/units/quantity-0.1.0>
value: !core/ndarray-1.0.0
Expand Down

0 comments on commit 2ee0569

Please sign in to comment.