From df2030427bfafa4954390c9005609b0e4260f8f1 Mon Sep 17 00:00:00 2001 From: Cyril Achard Date: Wed, 25 Nov 2026 15:59:49 +0100 Subject: [PATCH 1/3] Copy base project schemas --- dlccore/project/__init__.py | 7 + dlccore/project/schemas/__init__.py | 0 dlccore/project/schemas/base/__init__.py | 17 +++ dlccore/project/schemas/base/core.py | 132 ++++++++++++++++++ dlccore/project/schemas/base/probes.py | 72 ++++++++++ dlccore/project/schemas/base/resources.py | 100 +++++++++++++ dlccore/project/schemas/base/symlinks.py | 24 ++++ .../project/resources/test_res_invariants.py | 82 +++++++++++ 8 files changed, 434 insertions(+) create mode 100644 dlccore/project/__init__.py create mode 100644 dlccore/project/schemas/__init__.py create mode 100644 dlccore/project/schemas/base/__init__.py create mode 100644 dlccore/project/schemas/base/core.py create mode 100644 dlccore/project/schemas/base/probes.py create mode 100644 dlccore/project/schemas/base/resources.py create mode 100644 dlccore/project/schemas/base/symlinks.py create mode 100644 tests/project/resources/test_res_invariants.py diff --git a/dlccore/project/__init__.py b/dlccore/project/__init__.py new file mode 100644 index 0000000..d022155 --- /dev/null +++ b/dlccore/project/__init__.py @@ -0,0 +1,7 @@ +"""Schema-driven, read-only DeepLabCut project inspection.""" + +from dlc_octopus.api import inspect_project +from dlc_octopus.capabilities import get_project_manager_capabilities +from dlc_octopus.schemas.snapshots import ProjectSnapshot + +__all__ = ["ProjectSnapshot", "get_project_manager_capabilities", "inspect_project"] diff --git a/dlccore/project/schemas/__init__.py b/dlccore/project/schemas/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/dlccore/project/schemas/base/__init__.py b/dlccore/project/schemas/base/__init__.py new file mode 100644 index 0000000..635614a --- /dev/null +++ b/dlccore/project/schemas/base/__init__.py @@ -0,0 +1,17 @@ +from .resources import ( + DirectoryResourceKind, + FileResourceKind, + ProjectResource, + ResourceKind, + ResourceManagement, + UnknownResourceKind, +) + +__all__ = [ + "DirectoryResourceKind", + "FileResourceKind", + "ProjectResource", + "ResourceKind", + "ResourceManagement", + "UnknownResourceKind", +] diff --git a/dlccore/project/schemas/base/core.py b/dlccore/project/schemas/base/core.py new file mode 100644 index 0000000..4b8f48e --- /dev/null +++ b/dlccore/project/schemas/base/core.py @@ -0,0 +1,132 @@ +# dlc_octopus/schemas/base/core.py + +import re +from pathlib import Path, PurePosixPath, PureWindowsPath +from typing import Annotated + +from pydantic import AfterValidator, BaseModel, ConfigDict, StringConstraints + + +class FrozenModel(BaseModel): + """Common behavior for all results and schema models. + + - Unexpected fields are forbidden + - Cannot be modified after creation + - Serializable via pydantic + - Can produce JSON + """ + + model_config = ConfigDict( + extra="forbid", + frozen=True, + ) + + +def path_anchor( + value: str | Path, +) -> str: + """Return the drive and root a path carries under either filesystem, or ``""``. + + ``Path`` takes the host filesystem, so a Windows drive is invisible on POSIX. + Both filesystems are asked, because a path is written on one platform and read on another. + """ + + text = str(value) + + for filesystem in (PureWindowsPath, PurePosixPath): + anchor = filesystem(text).anchor + + if anchor: + return anchor + + return "" + + +def is_absolute_path( + value: str | Path, +) -> bool: + r"""Return whether a path is absolute under either filesystem. + + Stricter than carrying an anchor: ``C:project`` and ``\\project`` are anchored but relative. + """ + + text = str(value) + + return PureWindowsPath(text).is_absolute() or PurePosixPath(text).is_absolute() + + +def reject_anchored_path( + value: Path, +) -> Path: + """Reject a path carrying a drive or a root, whatever the host. + + Raises: + ValueError: If the path is anchored under either filesystem. + """ + + anchor = path_anchor(value) + + if anchor: + raise ValueError(f"must be project-relative, but {str(value)!r} carries the anchor {anchor!r}") + + return value + + +ProjectRelativePath = Annotated[Path, AfterValidator(reject_anchored_path)] + +# Lowercase hex, as ``hashlib`` writes it: a consumer keying on it must not see one file twice. +Sha256Hex = Annotated[str, StringConstraints(pattern=r"^[0-9a-f]{64}$")] + + +def reject_non_segment(value: tuple[str | int, ...]) -> tuple[str | int, ...]: + r"""Reject instance segments that only a caller's mistake produces: empty, joined or anchored. + + ``..`` is user data, reported by validation rather than refused here, as for + ``ProjectRelativePath``. ``\`` and ``:`` are legal inside POSIX file names, so + the anchor is checked on the joined segments, under both filesystems. + + Raises: + ValueError: If a segment is empty or contains ``/``, or the segments carry a drive or root. + """ + + for segment in value: + if isinstance(segment, str) and (segment == "" or "/" in segment): + raise ValueError(f"{segment!r} is not one project-relative path segment") + + if value: + reject_anchored_path(Path("/".join(str(segment) for segment in value))) + + return value + + +# Project-relative path segments, then a logical node's key as ints (a shuffle's 95, 2). +LayoutInstance = Annotated[tuple[str | int, ...], AfterValidator(reject_non_segment)] + + +def instance_from_path(path: Path) -> tuple[str, ...]: + """Return a project-relative path's segments, as a layout instance. + + Raises: + ValueError: If the path is anchored under either filesystem. + """ + + return reject_anchored_path(path).parts + + +_SCHEMA_ID = re.compile(r"dlc(\.[a-z0-9_]+)+") + + +def check_schema_id_format(value: str) -> str: + """Reject a malformed layout schema ID; whether it names a declared node is not checked here. + + Raises: + ValueError: If the ID is not ``dlc`` followed by dot-separated lowercase segments. + """ + + if _SCHEMA_ID.fullmatch(value) is None: + raise ValueError(f"{value!r} is not a layout schema ID of the form 'dlc.[....]'") + + return value + + +SchemaId = Annotated[str, AfterValidator(check_schema_id_format)] diff --git a/dlccore/project/schemas/base/probes.py b/dlccore/project/schemas/base/probes.py new file mode 100644 index 0000000..97ade49 --- /dev/null +++ b/dlccore/project/schemas/base/probes.py @@ -0,0 +1,72 @@ +# dlc_octopus/schemas/base/probes.py +"""Typed filesystem probe vocabulary. + +A ``PathProbe`` records raw filesystem facts about one path: whether it is +missing, what kind of entry it is, and symlink-target details. It never +assigns validation findings, severity, remediation, or project-level +validity, those remain the responsibility of discovery and validation. +""" + +from __future__ import annotations + +from enum import Enum + +from pydantic import model_validator +from typing_extensions import Self + +from dlc_octopus.schemas.base.core import FrozenModel +from dlc_octopus.schemas.base.symlinks import SymlinkObservation + + +class FilesystemEntryKind(str, Enum): + """Observed kind of a directory entry itself (not its symlink target).""" + + FILE = "file" + DIRECTORY = "directory" + SYMLINK = "symlink" + OTHER = "other" + + +class PathProbeStatus(str, Enum): + """Outcome of attempting to observe one directory entry. + + Describes the entry only. A symlink target that could not be read is + recorded by ``SymlinkObservation.target_kind``, not here. + """ + + OBSERVED = "observed" + MISSING = "missing" + INACCESSIBLE = "inaccessible" + + +class PathProbe(FrozenModel): + """Read-only, schema-neutral observation of one filesystem path.""" + + status: PathProbeStatus + entry_kind: FilesystemEntryKind | None = None + symlink: SymlinkObservation | None = None + error_type: str | None = None + error_message: str | None = None + + @model_validator(mode="after") + def validate_probe_shape(self) -> Self: + """Enforce invariants between status, entry kind, and symlink details.""" + + if self.status == PathProbeStatus.MISSING and (self.entry_kind is not None or self.symlink is not None): + raise ValueError("A missing probe must not carry an entry kind or symlink details.") + + has_symlink_kind = self.entry_kind == FilesystemEntryKind.SYMLINK + has_symlink_details = self.symlink is not None + + if has_symlink_kind != has_symlink_details: + raise ValueError( + "A symlink probe must include SymlinkObservation details, and only a symlink probe may include them." + ) + + if self.status == PathProbeStatus.INACCESSIBLE and self.error_type is None: + raise ValueError("An inaccessible probe must retain structured failure information.") + + if self.status == PathProbeStatus.INACCESSIBLE and self.entry_kind is not None: + raise ValueError("An inaccessible probe must not carry an entry kind, the entry itself was not observed.") + + return self diff --git a/dlccore/project/schemas/base/resources.py b/dlccore/project/schemas/base/resources.py new file mode 100644 index 0000000..b3e7f7c --- /dev/null +++ b/dlccore/project/schemas/base/resources.py @@ -0,0 +1,100 @@ +"""Basic project resource types. + +This is vocabulary only. +""" + +from __future__ import annotations + +from enum import Enum + +from pydantic import model_validator +from typing_extensions import Self + +from dlc_octopus.schemas.base.core import FrozenModel, ProjectRelativePath +from dlc_octopus.schemas.base.symlinks import SymlinkObservation + + +class ResourceManagement(str, Enum): + """Describe whether DeepLabCut manages a resource or not.""" + + # DLC manages the resource (e.g., config.yaml) + MANAGED = "managed" + # DLC does not manage the resource, but knows about it (e.g. .napari-deeplabcut JSON metadata) + KNOWN_UNMANAGED = "known_unmanaged" + # DLC does not manage the resource and does not know about it + UNDETERMINED = "undetermined" + + +class DirectoryResourceKind(str, Enum): + # Project folder + PROJECT_ROOT = "project_root" + + # Videos + VIDEOS_DIRECTORY = "videos_directory" + + # Labeled data + LABELED_DATA_DIRECTORY = "labeled_data_directory" # hosts all labeled datasets + LABELED_DATASET = "labeled_dataset" # frames + labels + + # Extend later... + + # Unknown resources + UNKNOWN_DIRECTORY = "unknown_directory" + + +class FileResourceKind(str, Enum): + # Project config file + PROJECT_CONFIG = "project_config" + + # Videos + SOURCE_VIDEO = "source_video" + + # Labeled data + LABELED_FRAME = "labeled_frame" # image file + HUMAN_LABELS = "human_labels" # keypoints + MACHINE_LABELS = "machine_labels" # keypoints + NAPARI_DLC_METADATA = "napari_dlc_metadata" # JSON metadata for napari plugin + + # Unknown resources + UNKNOWN_FILE = "unknown_file" + + +class UnknownResourceKind(str, Enum): + """An entry with an unknown resource kind.""" + + UNKNOWN = "unknown" + + +ResourceKind = DirectoryResourceKind | FileResourceKind | UnknownResourceKind + + +class ProjectResource(FrozenModel): + """A single project resource, as observed on disk.""" + + project_relative_path: ProjectRelativePath + symlink: SymlinkObservation | None = None + kind: ResourceKind + management: ResourceManagement = ResourceManagement.MANAGED + + @model_validator(mode="after") + def validate_kind_and_management( + self, + ) -> Self: + """Ensure semantic kind and management status agree.""" + + unknown_kinds = { + FileResourceKind.UNKNOWN_FILE, + DirectoryResourceKind.UNKNOWN_DIRECTORY, + UnknownResourceKind.UNKNOWN, + } + has_unknown_kind = self.kind in unknown_kinds + has_undetermined_management = self.management == ResourceManagement.UNDETERMINED + + if has_unknown_kind != has_undetermined_management: + raise ValueError( + "Unknown resource kinds must use undetermined " + "management, and undetermined management may " + "only be used with an unknown resource kind." + ) + + return self diff --git a/dlccore/project/schemas/base/symlinks.py b/dlccore/project/schemas/base/symlinks.py new file mode 100644 index 0000000..23f1b10 --- /dev/null +++ b/dlccore/project/schemas/base/symlinks.py @@ -0,0 +1,24 @@ +from __future__ import annotations + +from enum import Enum +from pathlib import Path + +from dlc_octopus.schemas.base.core import FrozenModel + + +class SymlinkTargetKind(str, Enum): + """Observed type of a symbolic-link target.""" + + FILE = "file" + DIRECTORY = "directory" + MISSING = "missing" + OTHER = "other" + INACCESSIBLE = "inaccessible" + + +class SymlinkObservation(FrozenModel): + """Read-only observation of one symbolic link and its target.""" + + raw_target: Path + absolute_target: Path + target_kind: SymlinkTargetKind diff --git a/tests/project/resources/test_res_invariants.py b/tests/project/resources/test_res_invariants.py new file mode 100644 index 0000000..9fe976c --- /dev/null +++ b/tests/project/resources/test_res_invariants.py @@ -0,0 +1,82 @@ +from pathlib import Path + +import pytest +from pydantic import ValidationError + +from dlc_octopus.schemas.base.resources import ( + DirectoryResourceKind, + FileResourceKind, + ProjectResource, + ResourceManagement, +) + + +@pytest.mark.parametrize( + ("kind", "management"), + [ + ( + FileResourceKind.SOURCE_VIDEO, + ResourceManagement.MANAGED, + ), + ( + FileResourceKind.NAPARI_DLC_METADATA, + ResourceManagement.KNOWN_UNMANAGED, + ), + ( + FileResourceKind.UNKNOWN_FILE, + ResourceManagement.UNDETERMINED, + ), + ( + DirectoryResourceKind.UNKNOWN_DIRECTORY, + ResourceManagement.UNDETERMINED, + ), + ], +) +def test_resource_kind_and_management_accept_coherent_combinations( + kind: FileResourceKind | DirectoryResourceKind, + management: ResourceManagement, +) -> None: + resource = ProjectResource( + project_relative_path=Path("resource"), + kind=kind, + management=management, + ) + + assert resource.kind == kind + assert resource.management == management + + +@pytest.mark.parametrize( + ("kind", "management"), + [ + ( + FileResourceKind.UNKNOWN_FILE, + ResourceManagement.MANAGED, + ), + ( + DirectoryResourceKind.UNKNOWN_DIRECTORY, + ResourceManagement.KNOWN_UNMANAGED, + ), + ( + FileResourceKind.SOURCE_VIDEO, + ResourceManagement.UNDETERMINED, + ), + ( + FileResourceKind.NAPARI_DLC_METADATA, + ResourceManagement.UNDETERMINED, + ), + ], +) +def test_resource_kind_and_management_reject_incoherent_combinations( + kind: FileResourceKind | DirectoryResourceKind, + management: ResourceManagement, +) -> None: + with pytest.raises( + ValidationError, + match=("Unknown resource kinds must use undetermined management"), + ): + ProjectResource( + project_relative_path=Path("resource"), + kind=kind, + management=management, + ) From 89e0db136f1e3d21b03ba9bf54ff22a6942201fb Mon Sep 17 00:00:00 2001 From: Cyril Achard Date: Wed, 25 Nov 2026 16:02:03 +0100 Subject: [PATCH 2/3] Adapt base project schemas to dlccore - Rename the package to dlccore.project and add the dlccore license header - dlccore.project's __init__ imports nothing; the prototype's re-exported the API, which lands last - Drop the stale path comments on line 1 --- dlccore/project/__init__.py | 17 +++++++++++------ dlccore/project/schemas/__init__.py | 10 ++++++++++ dlccore/project/schemas/base/__init__.py | 11 +++++++++++ dlccore/project/schemas/base/core.py | 11 ++++++++++- dlccore/project/schemas/base/probes.py | 16 +++++++++++++--- dlccore/project/schemas/base/resources.py | 15 +++++++++++++-- dlccore/project/schemas/base/symlinks.py | 13 ++++++++++++- tests/project/resources/test_res_invariants.py | 13 ++++++++++++- 8 files changed, 92 insertions(+), 14 deletions(-) diff --git a/dlccore/project/__init__.py b/dlccore/project/__init__.py index d022155..c187ccb 100644 --- a/dlccore/project/__init__.py +++ b/dlccore/project/__init__.py @@ -1,7 +1,12 @@ -"""Schema-driven, read-only DeepLabCut project inspection.""" - -from dlc_octopus.api import inspect_project -from dlc_octopus.capabilities import get_project_manager_capabilities -from dlc_octopus.schemas.snapshots import ProjectSnapshot +# +# DeepLabCut Toolbox (deeplabcut.org) +# © A. & M.W. Mathis Labs +# https://github.com/DeepLabCut/dlccore +# +# Contributors: +# https://github.com/DeepLabCut/dlccore/graphs/contributors +# +# Licensed under GNU Lesser General Public License v3.0 +# -__all__ = ["ProjectSnapshot", "get_project_manager_capabilities", "inspect_project"] +"""Schema-driven, read-only DeepLabCut project inspection.""" diff --git a/dlccore/project/schemas/__init__.py b/dlccore/project/schemas/__init__.py index e69de29..d329f1d 100644 --- a/dlccore/project/schemas/__init__.py +++ b/dlccore/project/schemas/__init__.py @@ -0,0 +1,10 @@ +# +# DeepLabCut Toolbox (deeplabcut.org) +# © A. & M.W. Mathis Labs +# https://github.com/DeepLabCut/dlccore +# +# Contributors: +# https://github.com/DeepLabCut/dlccore/graphs/contributors +# +# Licensed under GNU Lesser General Public License v3.0 +# diff --git a/dlccore/project/schemas/base/__init__.py b/dlccore/project/schemas/base/__init__.py index 635614a..9b027ac 100644 --- a/dlccore/project/schemas/base/__init__.py +++ b/dlccore/project/schemas/base/__init__.py @@ -1,3 +1,14 @@ +# +# DeepLabCut Toolbox (deeplabcut.org) +# © A. & M.W. Mathis Labs +# https://github.com/DeepLabCut/dlccore +# +# Contributors: +# https://github.com/DeepLabCut/dlccore/graphs/contributors +# +# Licensed under GNU Lesser General Public License v3.0 +# + from .resources import ( DirectoryResourceKind, FileResourceKind, diff --git a/dlccore/project/schemas/base/core.py b/dlccore/project/schemas/base/core.py index 4b8f48e..8b1ab57 100644 --- a/dlccore/project/schemas/base/core.py +++ b/dlccore/project/schemas/base/core.py @@ -1,4 +1,13 @@ -# dlc_octopus/schemas/base/core.py +# +# DeepLabCut Toolbox (deeplabcut.org) +# © A. & M.W. Mathis Labs +# https://github.com/DeepLabCut/dlccore +# +# Contributors: +# https://github.com/DeepLabCut/dlccore/graphs/contributors +# +# Licensed under GNU Lesser General Public License v3.0 +# import re from pathlib import Path, PurePosixPath, PureWindowsPath diff --git a/dlccore/project/schemas/base/probes.py b/dlccore/project/schemas/base/probes.py index 97ade49..5b8c259 100644 --- a/dlccore/project/schemas/base/probes.py +++ b/dlccore/project/schemas/base/probes.py @@ -1,4 +1,14 @@ -# dlc_octopus/schemas/base/probes.py +# +# DeepLabCut Toolbox (deeplabcut.org) +# © A. & M.W. Mathis Labs +# https://github.com/DeepLabCut/dlccore +# +# Contributors: +# https://github.com/DeepLabCut/dlccore/graphs/contributors +# +# Licensed under GNU Lesser General Public License v3.0 +# + """Typed filesystem probe vocabulary. A ``PathProbe`` records raw filesystem facts about one path: whether it is @@ -14,8 +24,8 @@ from pydantic import model_validator from typing_extensions import Self -from dlc_octopus.schemas.base.core import FrozenModel -from dlc_octopus.schemas.base.symlinks import SymlinkObservation +from dlccore.project.schemas.base.core import FrozenModel +from dlccore.project.schemas.base.symlinks import SymlinkObservation class FilesystemEntryKind(str, Enum): diff --git a/dlccore/project/schemas/base/resources.py b/dlccore/project/schemas/base/resources.py index b3e7f7c..39fd804 100644 --- a/dlccore/project/schemas/base/resources.py +++ b/dlccore/project/schemas/base/resources.py @@ -1,3 +1,14 @@ +# +# DeepLabCut Toolbox (deeplabcut.org) +# © A. & M.W. Mathis Labs +# https://github.com/DeepLabCut/dlccore +# +# Contributors: +# https://github.com/DeepLabCut/dlccore/graphs/contributors +# +# Licensed under GNU Lesser General Public License v3.0 +# + """Basic project resource types. This is vocabulary only. @@ -10,8 +21,8 @@ from pydantic import model_validator from typing_extensions import Self -from dlc_octopus.schemas.base.core import FrozenModel, ProjectRelativePath -from dlc_octopus.schemas.base.symlinks import SymlinkObservation +from dlccore.project.schemas.base.core import FrozenModel, ProjectRelativePath +from dlccore.project.schemas.base.symlinks import SymlinkObservation class ResourceManagement(str, Enum): diff --git a/dlccore/project/schemas/base/symlinks.py b/dlccore/project/schemas/base/symlinks.py index 23f1b10..29f40b3 100644 --- a/dlccore/project/schemas/base/symlinks.py +++ b/dlccore/project/schemas/base/symlinks.py @@ -1,9 +1,20 @@ +# +# DeepLabCut Toolbox (deeplabcut.org) +# © A. & M.W. Mathis Labs +# https://github.com/DeepLabCut/dlccore +# +# Contributors: +# https://github.com/DeepLabCut/dlccore/graphs/contributors +# +# Licensed under GNU Lesser General Public License v3.0 +# + from __future__ import annotations from enum import Enum from pathlib import Path -from dlc_octopus.schemas.base.core import FrozenModel +from dlccore.project.schemas.base.core import FrozenModel class SymlinkTargetKind(str, Enum): diff --git a/tests/project/resources/test_res_invariants.py b/tests/project/resources/test_res_invariants.py index 9fe976c..8d1f175 100644 --- a/tests/project/resources/test_res_invariants.py +++ b/tests/project/resources/test_res_invariants.py @@ -1,9 +1,20 @@ +# +# DeepLabCut Toolbox (deeplabcut.org) +# © A. & M.W. Mathis Labs +# https://github.com/DeepLabCut/dlccore +# +# Contributors: +# https://github.com/DeepLabCut/dlccore/graphs/contributors +# +# Licensed under GNU Lesser General Public License v3.0 +# + from pathlib import Path import pytest from pydantic import ValidationError -from dlc_octopus.schemas.base.resources import ( +from dlccore.project.schemas.base.resources import ( DirectoryResourceKind, FileResourceKind, ProjectResource, From 0ed6cae3ab5b89590106109e9eeb4e3e54d87836 Mon Sep 17 00:00:00 2001 From: Cyril Achard Date: Wed, 25 Nov 2026 16:23:32 +0100 Subject: [PATCH 3/3] Change docstrings for clarity in core and resources schemas --- dlccore/project/schemas/base/core.py | 8 +++----- dlccore/project/schemas/base/resources.py | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/dlccore/project/schemas/base/core.py b/dlccore/project/schemas/base/core.py index 8b1ab57..203264d 100644 --- a/dlccore/project/schemas/base/core.py +++ b/dlccore/project/schemas/base/core.py @@ -82,13 +82,11 @@ def reject_anchored_path( ProjectRelativePath = Annotated[Path, AfterValidator(reject_anchored_path)] - -# Lowercase hex, as ``hashlib`` writes it: a consumer keying on it must not see one file twice. Sha256Hex = Annotated[str, StringConstraints(pattern=r"^[0-9a-f]{64}$")] def reject_non_segment(value: tuple[str | int, ...]) -> tuple[str | int, ...]: - r"""Reject instance segments that only a caller's mistake produces: empty, joined or anchored. + r"""Reject problematic instance segments: empty, joined or anchored. ``..`` is user data, reported by validation rather than refused here, as for ``ProjectRelativePath``. ``\`` and ``:`` are legal inside POSIX file names, so @@ -108,7 +106,7 @@ def reject_non_segment(value: tuple[str | int, ...]) -> tuple[str | int, ...]: return value -# Project-relative path segments, then a logical node's key as ints (a shuffle's 95, 2). +# Project-relative path segments, then a logical node's key as ints (e.g. shuffle's 95, 2). LayoutInstance = Annotated[tuple[str | int, ...], AfterValidator(reject_non_segment)] @@ -126,7 +124,7 @@ def instance_from_path(path: Path) -> tuple[str, ...]: def check_schema_id_format(value: str) -> str: - """Reject a malformed layout schema ID; whether it names a declared node is not checked here. + """Reject a malformed layout schema ID. Does not check if a declared node is named. Raises: ValueError: If the ID is not ``dlc`` followed by dot-separated lowercase segments. diff --git a/dlccore/project/schemas/base/resources.py b/dlccore/project/schemas/base/resources.py index 39fd804..62c779f 100644 --- a/dlccore/project/schemas/base/resources.py +++ b/dlccore/project/schemas/base/resources.py @@ -11,7 +11,7 @@ """Basic project resource types. -This is vocabulary only. +Vocabulary only. """ from __future__ import annotations