diff --git a/nwb_linkml/src/nwb_linkml/adapters/adapter.py b/nwb_linkml/src/nwb_linkml/adapters/adapter.py index 64f6a47..13e86fd 100644 --- a/nwb_linkml/src/nwb_linkml/adapters/adapter.py +++ b/nwb_linkml/src/nwb_linkml/adapters/adapter.py @@ -5,8 +5,8 @@ Base class for adapters import sys from abc import abstractmethod from dataclasses import dataclass, field -from typing import Any, Generator, List, Literal, Optional, Tuple, Type, TypeVar, Union, overload from logging import Logger +from typing import Any, Generator, List, Literal, Optional, Tuple, Type, TypeVar, Union, overload from linkml_runtime.dumpers import yaml_dumper from linkml_runtime.linkml_model import ( @@ -104,6 +104,7 @@ class Adapter(BaseModel): @property def logger(self) -> Logger: + """A logger with the name of the adapter class! See :class:`.config`""" if self._logger is None: self._logger = init_logger(self.__class__.__name__) return self._logger diff --git a/nwb_linkml/src/nwb_linkml/config.py b/nwb_linkml/src/nwb_linkml/config.py index bbfcaed..6bea3d5 100644 --- a/nwb_linkml/src/nwb_linkml/config.py +++ b/nwb_linkml/src/nwb_linkml/config.py @@ -2,9 +2,9 @@ Manage the operation of nwb_linkml from environmental variables """ -from typing import Optional, Literal import tempfile from pathlib import Path +from typing import Literal, Optional from pydantic import ( BaseModel, diff --git a/nwb_linkml/src/nwb_linkml/includes/hdmf.py b/nwb_linkml/src/nwb_linkml/includes/hdmf.py index b4a06d5..2ddf2cc 100644 --- a/nwb_linkml/src/nwb_linkml/includes/hdmf.py +++ b/nwb_linkml/src/nwb_linkml/includes/hdmf.py @@ -577,6 +577,9 @@ class TimeSeriesReferenceVectorDataMixin(VectorDataMixin): @model_validator(mode="after") def ensure_equal_length(self) -> "TimeSeriesReferenceVectorDataMixin": + """ + Each of the three indexing columns must be the same length to work! + """ assert len(self.idx_start) == len(self.timeseries) == len(self.count), ( f"Columns have differing lengths: idx: {len(self.idx_start)}, count: {len(self.count)}," f" timeseries: {len(self.timeseries)}" diff --git a/nwb_linkml/tests/test_includes/conftest.py b/nwb_linkml/tests/test_includes/conftest.py index 38f1b7c..67011ec 100644 --- a/nwb_linkml/tests/test_includes/conftest.py +++ b/nwb_linkml/tests/test_includes/conftest.py @@ -4,22 +4,22 @@ import numpy as np import pytest from nwb_linkml.models import ( - ElectricalSeries, - ExtracellularEphysElectrodes, Device, - ElectrodeGroup, DynamicTableRegion, - Units, + ElectricalSeries, + ElectrodeGroup, + ExtracellularEphysElectrodes, IntracellularElectrode, IntracellularElectrodesTable, + IntracellularRecordingsTable, IntracellularResponsesTable, IntracellularStimuliTable, - IntracellularRecordingsTable, + TimeSeriesReferenceVectorData, + Units, VoltageClampSeries, VoltageClampSeriesData, VoltageClampStimulusSeries, VoltageClampStimulusSeriesData, - TimeSeriesReferenceVectorData, ) diff --git a/nwb_linkml/tests/test_includes/test_hdmf.py b/nwb_linkml/tests/test_includes/test_hdmf.py index f1c0af8..f7fd862 100644 --- a/nwb_linkml/tests/test_includes/test_hdmf.py +++ b/nwb_linkml/tests/test_includes/test_hdmf.py @@ -9,6 +9,7 @@ from nwb_linkml.models.pydantic.core.v2_7_0.namespace import ( VectorIndex, VoltageClampStimulusSeries, ) + from .conftest import _ragged_array