mirror of
https://github.com/p2p-ld/nwb-linkml.git
synced 2024-11-12 17:54:29 +00:00
lint
This commit is contained in:
parent
6c07b87ba0
commit
0a93195726
5 changed files with 13 additions and 8 deletions
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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)}"
|
||||
|
|
|
@ -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,
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ from nwb_linkml.models.pydantic.core.v2_7_0.namespace import (
|
|||
VectorIndex,
|
||||
VoltageClampStimulusSeries,
|
||||
)
|
||||
|
||||
from .conftest import _ragged_array
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue