Skip to content

Commit 4493034

Browse files
committed
Some additions to schema
1. Support UNDEFINED datasets in template mode 2. gridUnitSI may now be a vector
1 parent 2fc93d2 commit 4493034

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

share/openPMD/json_schema/dataset_defs.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,19 @@ allOf = [
6868
{ "$ref" = "#/$defs/any_type_dataset_properties", title = "Property definitions" },
6969
]
7070

71+
#####################################################
72+
# ...or `datatype` is UNDEFINED, no extent required #
73+
#####################################################
74+
75+
[["$defs".any_type_dataset.anyOf]]
76+
title = "An undefined template dataset"
77+
allOf = [
78+
{ required = [
79+
"datatype",
80+
], title = "Required properties" },
81+
{ datatype.value = "UNDEFINED", extent = { type = "array", items.type = "integer" } },
82+
]
83+
7184
######################################
7285
# n-dimensional datasets of int type #
7386
######################################

share/openPMD/json_schema/mesh.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ required = [
3232

3333
[allOf.properties.attributes.allOf.properties]
3434

35-
gridUnitSI."$ref" = "attribute_defs.json#/$defs/float_attribute"
35+
# in openPMD 1.0: float_attribute, openPMD 2.0: vec_float_attribute
36+
# TODO: decide how to better deal with the 1.0/2.0 dichotomy
37+
gridUnitSI."$ref" = "attribute_defs.json#/$defs/vec_float_attribute"
3638
gridSpacing."$ref" = "attribute_defs.json#/$defs/vec_float_attribute"
3739
gridGlobalOffset."$ref" = "attribute_defs.json#/$defs/vec_float_attribute"
3840
timeOffset."$ref" = "attribute_defs.json#/$defs/float_attribute"

0 commit comments

Comments
 (0)