Skip to content

Commit

Permalink
extend form to allow other subject ID value for DANDI organization
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyCBakerPhD committed Jan 30, 2024
1 parent 38e6edd commit ce6b1ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/nwbinspector/nwbinspector.py
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ def _intercept_in_vitro(nwbfile_object: pynwb.NWBFile, checks: Optional[list] =
if (
any(subject_related_dandi_requirements)
and subject is not None
and getattr(subject, "subject_id", "") == "in_vitro"
and getattr(subject, "subject_id", "").startswith("in_vitro_")
):
non_subject_checks = [check for check in checks if check.__name__ not in subject_related_check_names]
return non_subject_checks
Expand Down
10 changes: 4 additions & 6 deletions tests/test_inspector.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
from datetime import datetime

import numpy as np
import pynwb
from pynwb import NWBFile, NWBHDF5IO, TimeSeries
from pynwb.file import TimeIntervals
from pynwb.file import TimeIntervals, Subject
from pynwb.behavior import SpatialSeries, Position
from pynwb.testing.mock.file import mock_NWBFile
from hdmf.common import DynamicTable
from natsort import natsorted

Expand Down Expand Up @@ -731,10 +731,8 @@ def test_check_unique_identifiers_fail(self):

def test_dandi_config_in_vitro_injection():
"""Test that a special subject_id of 'in_vitro' properly excludes meaningless CRITICAL-elevated subject checks."""
nwbfile = pynwb.testing.mock.file.mock_NWBFile(
subject=pynwb.file.Subject(
subject_id="in_vitro", description="A detailed description about the in vitro setup."
)
nwbfile = mock_NWBFile(
subject=Subject(subject_id="in_vitro_CaMPARI3", description="A detailed description about the in vitro setup.")
)
config = load_config(filepath_or_keyword="dandi")
importance_threshold = "CRITICAL"
Expand Down

0 comments on commit ce6b1ed

Please sign in to comment.