Skip to content

Commit

Permalink
Update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
rly committed Mar 16, 2024
1 parent 26dc2d3 commit 9f8fad6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 32 deletions.
14 changes: 9 additions & 5 deletions tests/input/examples/schema_definition-native-array-1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ classes:
annotations:
array_data_mapping:
data: temperatures_in_K
dims: [x, "y", t]
dims: ["x", "y", "t"] # YAML 1.1 treats unquoted y as True
coords:
latitude_in_deg: x
latitude_in_deg: "x"
longitude_in_deg: "y"
time_in_d: t
time_in_d: "t"
attributes:
name:
identifier: true
Expand All @@ -38,15 +38,15 @@ classes:
unit:
ucum_code: deg
array:
exact_number_dimensions: 1
exact_number_dimensions: 2
longitude_in_deg:
required: true
range: float
multivalued: true
unit:
ucum_code: deg
array:
exact_number_dimensions: 1
exact_number_dimensions: 2
time_in_d:
range: float
multivalued: true
Expand All @@ -65,4 +65,8 @@ classes:
ucum_code: K
array:
exact_number_dimensions: 3
dimensions:
- range: LatitudeSeries # or range: float, array: ...
- range: LongitudeSeries
- range: DaySeries

31 changes: 4 additions & 27 deletions tests/input/examples/schema_definition-native-array-2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,53 +25,36 @@ classes:
annotations:
array_data_mapping:
data: temperatures_in_K
dims: [x, "y", t]
dims: ["x", "y", "t"] # YAML 1.1 treats unquoted y as True
coords:
latitude_in_deg: x
latitude_in_deg: "x"
longitude_in_deg: "y"
time_in_d: t
time_in_d: "t"
attributes:
name:
identifier: true
range: string
latitude_in_deg:
implements:
- linkml:axis
range: LatitudeSeries
required: true
annotations:
axis_index: 0
longitude_in_deg:
implements:
- linkml:axis
range: LongitudeSeries
required: true
annotations:
axis_index: 1
time_in_d:
implements:
- linkml:axis
range: DaySeries
required: true
annotations:
axis_index: 2
temperatures_in_K:
implements:
- linkml:array
range: TemperatureMatrix
required: true

TemperatureMatrix:
description: A 3D array of temperatures
implements:
- linkml:NDArray
- linkml:RowOrderedArray
attributes:
values:
range: float
multivalued: true
implements:
- linkml:elements
- linkml:elements # signals to a containing DataArray that this has the data
required: true
unit:
ucum_code: K
Expand All @@ -80,8 +63,6 @@ classes:

LatitudeSeries:
description: A series whose values represent latitude
implements:
- linkml:NDArray
attributes:
values:
range: float
Expand All @@ -96,8 +77,6 @@ classes:

LongitudeSeries:
description: A series whose values represent longitude
implements:
- linkml:NDArray
attributes:
values:
range: float
Expand All @@ -112,8 +91,6 @@ classes:

DaySeries:
description: A series whose values represent the days since the start of the measurement period
implements:
- linkml:NDArray
attributes:
values:
range: float
Expand Down

0 comments on commit 9f8fad6

Please sign in to comment.