diff --git a/tests/read_nwbfile_tests.py b/tests/read_nwbfile_tests.py index 84f8ae435..c0f687328 100644 --- a/tests/read_nwbfile_tests.py +++ b/tests/read_nwbfile_tests.py @@ -9,7 +9,7 @@ from pynwb.testing.mock.base import mock_TimeSeries from nwbinspector.tools import read_nwbfile -from nwbinspector.testing._testing import ( +from nwbinspector.testing import ( check_streaming_tests_enabled, check_hdf5_io_open, check_zarr_io_open, diff --git a/tests/streaming_tests.py b/tests/streaming_tests.py index 5a4274bbe..e339ea91b 100644 --- a/tests/streaming_tests.py +++ b/tests/streaming_tests.py @@ -7,12 +7,10 @@ from pathlib import Path from unittest import TestCase -from nwbinspector import Importance -from nwbinspector import inspect_all -from nwbinspector._registration import InspectorMessage +from nwbinspector import Importance, inspect_all, InspectorMessage from nwbinspector.tools import read_nwbfile -from nwbinspector.testing._testing import check_streaming_tests_enabled, check_hdf5_io_open -from nwbinspector.utils._utils import FilePathType +from nwbinspector.testing import check_streaming_tests_enabled, check_hdf5_io_open +from nwbinspector.utils import FilePathType STREAMING_TESTS_ENABLED, DISABLED_STREAMING_TESTS_REASON = check_streaming_tests_enabled() diff --git a/tests/test_check_configuration.py b/tests/test_check_configuration.py index c0969197b..92ff825bf 100644 --- a/tests/test_check_configuration.py +++ b/tests/test_check_configuration.py @@ -9,8 +9,10 @@ check_timestamps_match_first_dimension, available_checks, default_check_registry, + validate_config, + configure_checks, + load_config, ) -from nwbinspector import validate_config, configure_checks, load_config from nwbinspector._configuration import _copy_function diff --git a/tests/test_register_check.py b/tests/test_register_check.py index f762e3b03..28d2062ef 100644 --- a/tests/test_register_check.py +++ b/tests/test_register_check.py @@ -4,7 +4,7 @@ from hdmf.testing import TestCase from pynwb import TimeSeries -from nwbinspector._registration import register_check, Importance, Severity, InspectorMessage +from nwbinspector import register_check, Importance, Severity, InspectorMessage class TestRegisterClass(TestCase): diff --git a/tests/test_utils.py b/tests/test_utils.py index aa2741ea7..5ff3781bc 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -4,7 +4,7 @@ from hdmf.testing import TestCase from nwbinspector import Importance -from nwbinspector.utils._utils import ( +from nwbinspector.utils import ( format_byte_size, is_regular_series, is_dict_in_string, diff --git a/tests/unit_tests/test_behavior.py b/tests/unit_tests/test_behavior.py index bd34161c9..788734beb 100644 --- a/tests/unit_tests/test_behavior.py +++ b/tests/unit_tests/test_behavior.py @@ -2,7 +2,7 @@ import numpy as np from nwbinspector import InspectorMessage, Importance -from nwbinspector.checks.behavior import ( +from nwbinspector.checks import ( check_compass_direction_unit, check_spatial_series_dims, check_spatial_series_degrees_magnitude, diff --git a/tests/unit_tests/test_ecephys.py b/tests/unit_tests/test_ecephys.py index ccd3ab636..4015e94b7 100644 --- a/tests/unit_tests/test_ecephys.py +++ b/tests/unit_tests/test_ecephys.py @@ -8,9 +8,8 @@ from pynwb.misc import Units from hdmf.common.table import DynamicTableRegion, DynamicTable -from nwbinspector import ( - InspectorMessage, - Importance, +from nwbinspector import InspectorMessage, Importance +from nwbinspector.checks import ( check_negative_spike_times, check_electrical_series_dims, check_electrical_series_reference_electrodes_table, diff --git a/tests/unit_tests/test_general.py b/tests/unit_tests/test_general.py index dc32552a3..ba6120030 100644 --- a/tests/unit_tests/test_general.py +++ b/tests/unit_tests/test_general.py @@ -1,6 +1,7 @@ from hdmf.common import DynamicTable -from nwbinspector import InspectorMessage, Importance, check_name_slashes, check_description +from nwbinspector import InspectorMessage, Importance +from nwbinspector.checks import check_name_slashes, check_description def test_check_name_slashes_pass(): diff --git a/tests/unit_tests/test_icephys.py b/tests/unit_tests/test_icephys.py index 5bb019a72..bd5c6f32d 100644 --- a/tests/unit_tests/test_icephys.py +++ b/tests/unit_tests/test_icephys.py @@ -3,8 +3,9 @@ from pynwb.icephys import IntracellularElectrode from pynwb.device import Device -from nwbinspector import InspectorMessage, Importance, check_intracellular_electrode_cell_id_exists -from nwbinspector.utils._utils import get_package_version +from nwbinspector import InspectorMessage, Importance +from nwbinspector.checks import check_intracellular_electrode_cell_id_exists +from nwbinspector.utils import get_package_version PYNWB_VERSION_LOWER_2_1_0 = get_package_version(name="pynwb") < Version("2.1.0") PYNWB_VERSION_LOWER_SKIP_REASON = "This test requires PyNWB>=2.1.0" diff --git a/tests/unit_tests/test_image_series.py b/tests/unit_tests/test_image_series.py index d67f25578..a9b7f5d9c 100644 --- a/tests/unit_tests/test_image_series.py +++ b/tests/unit_tests/test_image_series.py @@ -7,9 +7,8 @@ from pynwb import NWBHDF5IO, H5DataIO from pynwb.image import ImageSeries -from nwbinspector import ( - InspectorMessage, - Importance, +from nwbinspector import InspectorMessage, Importance +from nwbinspector.checks import ( check_image_series_external_file_valid, check_image_series_external_file_relative, check_image_series_data_size, diff --git a/tests/unit_tests/test_images.py b/tests/unit_tests/test_images.py index f332bdeff..952934273 100644 --- a/tests/unit_tests/test_images.py +++ b/tests/unit_tests/test_images.py @@ -6,12 +6,12 @@ from packaging.version import Version from nwbinspector import InspectorMessage, Importance -from nwbinspector.checks.images import ( +from nwbinspector.checks import ( check_order_of_images_unique, check_order_of_images_len, check_index_series_points_to_image, ) -from nwbinspector.utils._utils import get_package_version +from nwbinspector.utils import get_package_version HAVE_IMAGES = get_package_version(name="pynwb") >= Version("2.1.0") skip_reason = "You must have PyNWB>=v2.1.0 to run these tests!" diff --git a/tests/unit_tests/test_nwb_containers.py b/tests/unit_tests/test_nwb_containers.py index 84f40855b..6c114fef7 100644 --- a/tests/unit_tests/test_nwb_containers.py +++ b/tests/unit_tests/test_nwb_containers.py @@ -9,9 +9,8 @@ from pynwb import NWBContainer, NWBFile from pynwb.image import ImageSeries -from nwbinspector import ( - InspectorMessage, - Importance, +from nwbinspector import InspectorMessage, Importance +from nwbinspector.checks import ( check_small_dataset_compression, check_large_dataset_compression, check_empty_string_for_optional_attribute, diff --git a/tests/unit_tests/test_nwbfile_metadata.py b/tests/unit_tests/test_nwbfile_metadata.py index f781fbefe..33bbe5072 100644 --- a/tests/unit_tests/test_nwbfile_metadata.py +++ b/tests/unit_tests/test_nwbfile_metadata.py @@ -4,9 +4,8 @@ from pynwb import NWBFile, ProcessingModule from pynwb.file import Subject -from nwbinspector import ( - InspectorMessage, - Importance, +from nwbinspector import InspectorMessage, Importance +from nwbinspector.checks import ( check_experimenter_exists, check_experimenter_form, check_experiment_description, diff --git a/tests/unit_tests/test_ogen.py b/tests/unit_tests/test_ogen.py index 0f5ed9e86..158f10af8 100644 --- a/tests/unit_tests/test_ogen.py +++ b/tests/unit_tests/test_ogen.py @@ -5,7 +5,7 @@ from pynwb.device import Device from pynwb.file import NWBFile -from nwbinspector import check_optogenetic_stimulus_site_has_optogenetic_series +from nwbinspector.checks import check_optogenetic_stimulus_site_has_optogenetic_series class TestCheckOptogeneticStimulusSiteHasOptogeneticSeries(TestCase): diff --git a/tests/unit_tests/test_ophys.py b/tests/unit_tests/test_ophys.py index 432fc78fb..13b797087 100644 --- a/tests/unit_tests/test_ophys.py +++ b/tests/unit_tests/test_ophys.py @@ -15,9 +15,8 @@ ) from hdmf.common.table import DynamicTableRegion, DynamicTable -from nwbinspector import ( - InspectorMessage, - Importance, +from nwbinspector import InspectorMessage, Importance +from nwbinspector.checks import ( check_roi_response_series_dims, check_roi_response_series_link_to_plane_segmentation, check_excitation_lambda_in_nm, diff --git a/tests/unit_tests/test_tables.py b/tests/unit_tests/test_tables.py index 39ba2249b..e8a95a90f 100644 --- a/tests/unit_tests/test_tables.py +++ b/tests/unit_tests/test_tables.py @@ -7,9 +7,8 @@ from hdmf.common import DynamicTable, DynamicTableRegion from pynwb.file import TimeIntervals, Units, ElectrodeTable, ElectrodeGroup, Device -from nwbinspector import ( - InspectorMessage, - Importance, +from nwbinspector import InspectorMessage, Importance +from nwbinspector.checks import ( check_empty_table, check_time_interval_time_columns, check_time_intervals_stop_after_start, @@ -21,7 +20,7 @@ check_ids_unique, check_table_time_columns_are_not_negative, ) -from nwbinspector.utils._utils import get_package_version +from nwbinspector.utils import get_package_version class TestCheckDynamicTableRegion(TestCase): diff --git a/tests/unit_tests/test_time_series.py b/tests/unit_tests/test_time_series.py index b36901bfb..55d557034 100644 --- a/tests/unit_tests/test_time_series.py +++ b/tests/unit_tests/test_time_series.py @@ -5,9 +5,8 @@ from packaging import version -from nwbinspector import ( - InspectorMessage, - Importance, +from nwbinspector import InspectorMessage, Importance +from nwbinspector.checks import ( check_regular_timestamps, check_data_orientation, check_timestamps_match_first_dimension,