Skip to content

Commit

Permalink
tests: fix import issue in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
dbirman committed Jan 27, 2025
1 parent 08471b4 commit b792046
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions examples/aind_smartspim_rig.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
""" example SmartSPIM instrument """

from datetime import datetime
from datetime import date

from aind_data_schema_models.organizations import Organization
from aind_data_schema_models.units import SizeUnit
Expand Down Expand Up @@ -264,7 +264,7 @@
instrument_id="440_SmartSPIM1_20231004",
instrument_type=ImagingInstrumentType.SMARTSPIM,
manufacturer=Organization.LIFECANVAS,
modification_date=datetime.date(2023, 10, 4),
modification_date=date(2023, 10, 4),
modalities=[Modality.SPIM],
components=[
*objectives,
Expand Down
6 changes: 3 additions & 3 deletions tests/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
from aind_data_schema.core.instrument import Instrument
from aind_data_schema.core.session import Session
from aind_data_schema.core.subject import BreedingInfo, Housing, Sex, Species, Subject

from resources.spim_instrument import inst
from tests.resources.spim_instrument import inst

PYD_VERSION = re.match(r"(\d+.\d+).\d+", pyd_version).group(1)

Expand Down Expand Up @@ -192,12 +191,13 @@ def test_validate_smartspim_metadata(self):
surgery1 = Surgery.model_construct(procedures=[nano_inj, ionto_inj])
with self.assertRaises(ValidationError) as context:
Metadata(
name="ecephys_655019_2023-04-03_18-17-09",
name="655019_2023-04-03T181709",
location="bucket",
data_description=DataDescription.model_construct(
label="some label",
creation_time=time(12, 12, 12),
modalities=[Modality.SPIM],
subject_id="655019",
),
procedures=Procedures.model_construct(subject_procedures=[surgery1]),
acquisition=Acquisition.model_construct(),
Expand Down

0 comments on commit b792046

Please sign in to comment.