Skip to content

Commit

Permalink
exclude building vector_data slot, force rebuild of older models wh…
Browse files Browse the repository at this point in the history
…ich apparently wasn't happening...
  • Loading branch information
sneakers-the-rat committed Oct 3, 2024
1 parent 8f95d55 commit 8449e9f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions nwb_linkml/src/nwb_linkml/adapters/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ def check(c, cls: Dataset) -> bool:
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 ("*", "+")
)

Expand Down Expand Up @@ -681,10 +681,10 @@ def check(c, cls: Dataset) -> bool:
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 ("*", "+")
)

Expand Down
2 changes: 1 addition & 1 deletion nwb_linkml/src/nwb_linkml/adapters/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def build_containers(self) -> BuildResult:
)

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",
}
Expand Down
4 changes: 2 additions & 2 deletions scripts/generate_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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")
Expand Down

0 comments on commit 8449e9f

Please sign in to comment.