From 8449e9f742db9b8a992fa0eac7decd16f223d70f Mon Sep 17 00:00:00 2001 From: sneakers-the-rat Date: Wed, 2 Oct 2024 20:20:34 -0700 Subject: [PATCH] exclude building `vector_data` slot, force rebuild of older models which apparently wasn't happening... --- nwb_linkml/src/nwb_linkml/adapters/dataset.py | 6 +++--- nwb_linkml/src/nwb_linkml/adapters/group.py | 2 +- scripts/generate_core.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/nwb_linkml/src/nwb_linkml/adapters/dataset.py b/nwb_linkml/src/nwb_linkml/adapters/dataset.py index 0e40139..6a6e954 100644 --- a/nwb_linkml/src/nwb_linkml/adapters/dataset.py +++ b/nwb_linkml/src/nwb_linkml/adapters/dataset.py @@ -642,7 +642,7 @@ class MapNVectors(DatasetMap): cls.name is None and cls.neurodata_type_def is None and cls.neurodata_type_inc - and cls.neurodata_type_inc != "VectorData" + and cls.neurodata_type_inc not in ("VectorData", "VectorIndex") and cls.quantity in ("*", "+") ) @@ -681,10 +681,10 @@ class MapNVectorData(DatasetMap): Check for being an unnamed multivalued vector class that IS VectorData """ return ( - (cls.name is None or cls.name == "vector_data") + (cls.name is None or cls.name in ("vector_data", "vector_index")) and cls.neurodata_type_def is None and cls.neurodata_type_inc - and cls.neurodata_type_inc == "VectorData" + and cls.neurodata_type_inc in ("VectorData", "VectorIndex") and cls.quantity in ("*", "+") ) diff --git a/nwb_linkml/src/nwb_linkml/adapters/group.py b/nwb_linkml/src/nwb_linkml/adapters/group.py index f9ef07d..b61a51f 100644 --- a/nwb_linkml/src/nwb_linkml/adapters/group.py +++ b/nwb_linkml/src/nwb_linkml/adapters/group.py @@ -230,7 +230,7 @@ class GroupAdapter(ClassAdapter): ) if self.debug: # pragma: no cover - only used in development - slot.annotations["group_adapter"] = { + slot.annotations["slot_adapter"] = { "tag": "slot_adapter", "value": "container_value_slot", } diff --git a/scripts/generate_core.py b/scripts/generate_core.py index 53a7574..59d9802 100644 --- a/scripts/generate_core.py +++ b/scripts/generate_core.py @@ -102,7 +102,7 @@ def generate_versions( build_progress.update(linkml_task, advance=1, action="Build LinkML") - linkml_res = linkml_provider.build(core_ns) + linkml_res = linkml_provider.build(core_ns, force=True) build_progress.update(linkml_task, advance=1, action="Built LinkML") # build pydantic @@ -115,7 +115,7 @@ def generate_versions( pbar_string = schema.parts[-3] build_progress.update(pydantic_task, action=pbar_string) pydantic_provider.build( - schema, versions=core_ns.versions, split=True, parallel=True + schema, versions=core_ns.versions, split=True, parallel=True, force=True ) build_progress.update(pydantic_task, advance=1) build_progress.update(pydantic_task, action="Built Pydantic")