From 5d42804ce5c0addcdd6fa58056e93598c4cc7cfa Mon Sep 17 00:00:00 2001 From: Ryan Ly Date: Fri, 31 Jan 2025 17:35:51 -0800 Subject: [PATCH 1/7] Restrict symbols in names --- source/description.rst | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/source/description.rst b/source/description.rst index ca51187..32dba66 100644 --- a/source/description.rst +++ b/source/description.rst @@ -150,7 +150,7 @@ Text description of the namespace. ``name`` ^^^^^^^^ -Unique name used to refer to the namespace. +Unique name used to refer to the namespace. The name must not contain ":", "/", or whitespace. ``full_name`` ^^^^^^^^^^^^^ @@ -160,7 +160,8 @@ Optional string with extended full name for the namespace. ``version`` ^^^^^^^^^^^ -Version string for the namespace +Version string for the namespace. The version string must follow the NWB versioning guidelines: +https://www.nwb.org/versioning-guidelines/ ``date`` ^^^^^^^^ @@ -270,6 +271,8 @@ Groups are specified as part of the top-level list or via lists stored in the ke The key/value pairs that make up a group specification are described in more detail next in Section :numref:`sec-group-spec-keys`. The keys should be ordered as specified above for readability and consistency with the rest of the schema. +The ``name``, ``default_name``, ``{{ data_type_def }}``, and ``{{ data_type_inc }}`` must not contain ":" or "/". + .. note:: In version 3.0, the ``linkable`` key was removed. @@ -539,7 +542,8 @@ Attribute specification keys ^^^^^^^^ String with the name for the attribute. The ``name`` key is required and must -specify a unique attribute on the current parent object (e.g., group or dataset) +specify a unique attribute on the current parent object (e.g., group or dataset). +The name must not contain whitespace. .. _sec-dtype: @@ -902,6 +906,8 @@ The key/value pairs that make up a dataset specification are described in more d :numref:`sec-dataset-spec-keys`. The keys should be ordered as specified above for readability and consistency with the rest of the schema. +The ``name``, ``default_name``, ``{{ data_type_def }}``, and ``{{ data_type_inc }}`` must not contain ":" or "/". + .. note:: In version 3.0, the ``default_value`` key was removed for datasets. The From 2fe922256dd10336183b3806cafdb9470ed2f6e0 Mon Sep 17 00:00:00 2001 From: Ryan Ly Date: Mon, 3 Feb 2025 11:26:14 -0800 Subject: [PATCH 2/7] Update source/description.rst --- source/description.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/description.rst b/source/description.rst index 32dba66..96b4aaf 100644 --- a/source/description.rst +++ b/source/description.rst @@ -160,8 +160,8 @@ Optional string with extended full name for the namespace. ``version`` ^^^^^^^^^^^ -Version string for the namespace. The version string must follow the NWB versioning guidelines: -https://www.nwb.org/versioning-guidelines/ +Version string for the namespace. The version string must not contain ":" or "/". It should follow +the NWB versioning guidelines: https://www.nwb.org/versioning-guidelines/ ``date`` ^^^^^^^^ From bc156d5390e13e8d9164fc589f0ed6c36c86669c Mon Sep 17 00:00:00 2001 From: Ryan Ly Date: Mon, 3 Feb 2025 11:27:40 -0800 Subject: [PATCH 3/7] Update source/description.rst --- source/description.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/description.rst b/source/description.rst index 96b4aaf..29391be 100644 --- a/source/description.rst +++ b/source/description.rst @@ -271,7 +271,8 @@ Groups are specified as part of the top-level list or via lists stored in the ke The key/value pairs that make up a group specification are described in more detail next in Section :numref:`sec-group-spec-keys`. The keys should be ordered as specified above for readability and consistency with the rest of the schema. -The ``name``, ``default_name``, ``{{ data_type_def }}``, and ``{{ data_type_inc }}`` must not contain ":" or "/". +The ``name``, ``default_name``, ``{{ data_type_def }}``, and ``{{ data_type_inc }}`` must follow the regular +expression pattern: ``^[A-Za-z_][A-Za-z0-9_]*$`` to ensure compatibility across APIs. .. note:: From eba0d996b5eb5b0e2e1ae2e57e4df98aedc62c5a Mon Sep 17 00:00:00 2001 From: Ryan Ly Date: Mon, 3 Feb 2025 11:28:01 -0800 Subject: [PATCH 4/7] Update source/description.rst --- source/description.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/description.rst b/source/description.rst index 29391be..2120351 100644 --- a/source/description.rst +++ b/source/description.rst @@ -271,8 +271,8 @@ Groups are specified as part of the top-level list or via lists stored in the ke The key/value pairs that make up a group specification are described in more detail next in Section :numref:`sec-group-spec-keys`. The keys should be ordered as specified above for readability and consistency with the rest of the schema. -The ``name``, ``default_name``, ``{{ data_type_def }}``, and ``{{ data_type_inc }}`` must follow the regular -expression pattern: ``^[A-Za-z_][A-Za-z0-9_]*$`` to ensure compatibility across APIs. +The ``name``, ``default_name``, ``{{ data_type_def }}``, and ``{{ data_type_inc }}`` must follow the +regular expression pattern: ``^[A-Za-z_][A-Za-z0-9_]*$`` to ensure compatibility across APIs. .. note:: From f0f8f2ac86b1b9a20c79821b935814fa937acbe2 Mon Sep 17 00:00:00 2001 From: Ryan Ly Date: Mon, 3 Feb 2025 11:28:38 -0800 Subject: [PATCH 5/7] Update source/description.rst --- source/description.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/description.rst b/source/description.rst index 2120351..579d8dc 100644 --- a/source/description.rst +++ b/source/description.rst @@ -544,7 +544,8 @@ Attribute specification keys String with the name for the attribute. The ``name`` key is required and must specify a unique attribute on the current parent object (e.g., group or dataset). -The name must not contain whitespace. +The name must follow the regular expression pattern: +``^[A-Za-z_][A-Za-z0-9_]*$`` to ensure compatibility across APIs. .. _sec-dtype: From ff27d3fc9b9b81be1f3c8a7c791fc5f8579e5d40 Mon Sep 17 00:00:00 2001 From: Ryan Ly Date: Mon, 3 Feb 2025 11:29:04 -0800 Subject: [PATCH 6/7] Update source/description.rst --- source/description.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/description.rst b/source/description.rst index 579d8dc..4ce21d6 100644 --- a/source/description.rst +++ b/source/description.rst @@ -908,7 +908,8 @@ The key/value pairs that make up a dataset specification are described in more d :numref:`sec-dataset-spec-keys`. The keys should be ordered as specified above for readability and consistency with the rest of the schema. -The ``name``, ``default_name``, ``{{ data_type_def }}``, and ``{{ data_type_inc }}`` must not contain ":" or "/". +The ``name``, ``default_name``, ``{{ data_type_def }}``, and ``{{ data_type_inc }}`` must follow the +regular expression pattern: ``^[A-Za-z_][A-Za-z0-9_]*$`` to ensure compatibility across APIs. .. note:: From 6ecd861b6175cc18314a2cfb05f1b06448b968c2 Mon Sep 17 00:00:00 2001 From: Ryan Ly Date: Mon, 3 Feb 2025 11:31:12 -0800 Subject: [PATCH 7/7] Add restriction to link names --- source/description.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/description.rst b/source/description.rst index 4ce21d6..3b51bb2 100644 --- a/source/description.rst +++ b/source/description.rst @@ -854,7 +854,8 @@ Link specification keys ``name`` ^^^^^^^^ -Optional key specifying the ``name`` of the link. +Optional key specifying the ``name`` of the link. The name must follow the +regular expression pattern: ``^[A-Za-z_][A-Za-z0-9_]*$`` to ensure compatibility across APIs. ``target_type`` ^^^^^^^^^^^^^^^