From 2ee6b73175b1fbb96b3379a5ec99bdda5b2a5644 Mon Sep 17 00:00:00 2001 From: Ryan Ly Date: Thu, 8 Aug 2024 10:39:23 -0700 Subject: [PATCH 1/4] Add allowed shapes for Data --- common/base.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/common/base.yaml b/common/base.yaml index 1e8cbc0..0d3a3f1 100644 --- a/common/base.yaml +++ b/common/base.yaml @@ -2,6 +2,23 @@ datasets: - data_type_def: Data doc: An abstract data type for a dataset. + shape: + - - 1 # would want to specify a scalar here + - - null # 1D + - - null # 2D + - null + - - null # 3D + - null + - null + - - null # 4D + - null + - null + - null + - - null # 5D + - null + - null + - null + - null groups: - data_type_def: Container From f4a50b460a56c6aa9befac8e2f17b902df5e16d8 Mon Sep 17 00:00:00 2001 From: Ryan Ly Date: Thu, 8 Aug 2024 11:37:43 -0700 Subject: [PATCH 2/4] Change Data shape to new special value Any --- common/base.yaml | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/common/base.yaml b/common/base.yaml index 0d3a3f1..d4556e7 100644 --- a/common/base.yaml +++ b/common/base.yaml @@ -2,23 +2,7 @@ datasets: - data_type_def: Data doc: An abstract data type for a dataset. - shape: - - - 1 # would want to specify a scalar here - - - null # 1D - - - null # 2D - - null - - - null # 3D - - null - - null - - - null # 4D - - null - - null - - null - - - null # 5D - - null - - null - - null - - null + shape: Any groups: - data_type_def: Container From b6f8882e99755c98665ce7cd4f4a04fb9370348b Mon Sep 17 00:00:00 2001 From: Ryan Ly Date: Thu, 8 Aug 2024 12:01:20 -0700 Subject: [PATCH 3/4] Update schema to use language 3.0.0 --- common/base.yaml | 2 +- common/experimental.yaml | 1 + common/namespace.yaml | 2 +- common/resources.yaml | 2 +- common/sparse.yaml | 2 +- common/table.yaml | 2 +- hdmf-common.schema.json => hdmf.schema.json | 20 ++++++++++---------- 7 files changed, 16 insertions(+), 15 deletions(-) rename hdmf-common.schema.json => hdmf.schema.json (95%) diff --git a/common/base.yaml b/common/base.yaml index d4556e7..477335c 100644 --- a/common/base.yaml +++ b/common/base.yaml @@ -1,4 +1,4 @@ -# hdmf-schema-language=2.0.2 +# hdmf-schema-language=3.0.0 datasets: - data_type_def: Data doc: An abstract data type for a dataset. diff --git a/common/experimental.yaml b/common/experimental.yaml index 0cb6ba4..9ca12b7 100644 --- a/common/experimental.yaml +++ b/common/experimental.yaml @@ -1,3 +1,4 @@ +# hdmf-schema-language=3.0.0 groups: [] datasets: - data_type_def: EnumData diff --git a/common/namespace.yaml b/common/namespace.yaml index b174003..e5d494a 100644 --- a/common/namespace.yaml +++ b/common/namespace.yaml @@ -1,4 +1,4 @@ -# hdmf-schema-language=2.0.2 +# hdmf-schema-language=3.0.0 namespaces: - name: hdmf-common doc: Common data structures provided by HDMF diff --git a/common/resources.yaml b/common/resources.yaml index 5e091c7..543264c 100644 --- a/common/resources.yaml +++ b/common/resources.yaml @@ -1,4 +1,4 @@ -# hdmf-schema-language=2.0.2 +# hdmf-schema-language=3.0.0 groups: - data_type_def: HERD data_type_inc: Container diff --git a/common/sparse.yaml b/common/sparse.yaml index 09de817..7672f05 100644 --- a/common/sparse.yaml +++ b/common/sparse.yaml @@ -1,4 +1,4 @@ -# hdmf-schema-language=2.0.2 +# hdmf-schema-language=3.0.0 groups: - data_type_def: CSRMatrix data_type_inc: Container diff --git a/common/table.yaml b/common/table.yaml index 2bacf8b..5d7a903 100644 --- a/common/table.yaml +++ b/common/table.yaml @@ -1,4 +1,4 @@ -# hdmf-schema-language=2.0.2 +# hdmf-schema-language=3.0.0 datasets: - data_type_def: VectorData diff --git a/hdmf-common.schema.json b/hdmf.schema.json similarity index 95% rename from hdmf-common.schema.json rename to hdmf.schema.json index fc0f381..b9b9719 100644 --- a/hdmf-common.schema.json +++ b/hdmf.schema.json @@ -1,9 +1,9 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "hdmf-common.schema.json", - "title": "Schema for the HDMF Common specification", - "description": "A schema for validating HDMF Common YAML Files", - "version": "1.8.0", + "$id": "hdmf.schema.json", + "title": "Schema for the HDMF language specification", + "description": "A schema for validating HDMF YAML files and HDMF extensions", + "version": "3.0.0-beta", "type": "object", "additionalProperties": false, "properties": { @@ -98,10 +98,10 @@ "int16", "int8", "uint", + "uint64", "uint32", "uint16", "uint8", - "uint64", "numeric", "text", "utf", @@ -141,6 +141,9 @@ { "type": "array", "items": {"$ref": "#/definitions/shape_spec"} + }, + { + "const": "Any" } ] }, @@ -205,7 +208,6 @@ "data_type_def": {"$ref": "#/definitions/protectedString"}, "data_type_inc": {"$ref": "#/definitions/protectedString"}, "quantity": {"$ref": "#/definitions/quantity"}, - "linkable": {"type": "boolean"}, "datasets": {"$ref": "#/definitions/datasets"}, "links": {"$ref": "#/definitions/links"}, "groups": {"$ref": "#/definitions/groups"}, @@ -269,12 +271,10 @@ "data_type_def": {"$ref": "#/definitions/protectedString"}, "data_type_inc": {"$ref": "#/definitions/protectedString"}, "quantity": {"$ref": "#/definitions/quantity"}, - "linkable": {"type": "boolean"}, "attributes": {"$ref": "#/definitions/attributes"}, - "value": {"description": "Optional constant, fixed value for the attribute."}, - "default_value": {"description": "Optional default value for variable-valued attributes."} + "value": {"description": "Optional constant, fixed value for the dataset."} } } } } -} +} \ No newline at end of file From 88e6b98be70f979ec1d46d207b0967e0c7d4c102 Mon Sep 17 00:00:00 2001 From: Ryan Ly Date: Thu, 8 Aug 2024 12:59:14 -0700 Subject: [PATCH 4/4] Use special value for scalar --- common/base.yaml | 1 - hdmf.schema.json | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/common/base.yaml b/common/base.yaml index 477335c..620ef07 100644 --- a/common/base.yaml +++ b/common/base.yaml @@ -2,7 +2,6 @@ datasets: - data_type_def: Data doc: An abstract data type for a dataset. - shape: Any groups: - data_type_def: Container diff --git a/hdmf.schema.json b/hdmf.schema.json index b9b9719..0f9b85c 100644 --- a/hdmf.schema.json +++ b/hdmf.schema.json @@ -143,7 +143,7 @@ "items": {"$ref": "#/definitions/shape_spec"} }, { - "const": "Any" + "const": "scalar" } ] },