diff --git a/src/nwbinspector/checks/__init__.py b/src/nwbinspector/checks/__init__.py index 138c28eb9..13874db28 100644 --- a/src/nwbinspector/checks/__init__.py +++ b/src/nwbinspector/checks/__init__.py @@ -1,12 +1,153 @@ -from .ecephys import * -from .general import * -from .image_series import * -from .images import * -from .nwb_containers import * -from .nwbfile_metadata import * -from .ogen import * -from .ophys import * -from .tables import * -from .time_series import * -from .icephys import * -from .behavior import * +from ._ecephys import ( + check_negative_spike_times, + check_electrical_series_dims, + check_electrical_series_reference_electrodes_table, + check_spike_times_not_in_unobserved_interval, +) +from ._general import ( + check_description, + check_name_slashes, +) +from ._image_series import ( + check_image_series_data_size, + check_image_series_reference_images, + check_image_series_reference_optical_channel, + check_image_series_external_file_relative, + check_image_series_external_file_valid, +) +from ._images import ( + check_order_of_images_unique, + check_order_of_images_len, + check_index_series_points_to_image, +) +from ._nwb_containers import ( + check_empty_string_for_optional_attribute, + check_small_dataset_compression, + check_large_dataset_compression, +) +from ._nwbfile_metadata import ( + check_keywords, + check_institution, + check_subject_age, + check_subject_sex, + check_subject_exists, + check_doi_publications, + check_experimenter_form, + check_experimenter_exists, + check_experiment_description, + check_subject_id_exists, + check_subject_species_exists, + check_subject_species_form, + check_subject_proper_age_range, + check_session_start_time_future_date, + check_processing_module_name, + check_session_start_time_old_date, +) +from ._ogen import ( + check_optogenetic_stimulus_site_has_optogenetic_series, +) +from ._ophys import ( + check_excitation_lambda_in_nm, + check_plane_segmentation_image_mask_shape_against_ref_images, + check_roi_response_series_dims, + check_emission_lambda_in_nm, + check_roi_response_series_link_to_plane_segmentation, +) +from ._tables import ( + check_single_row, + check_ids_unique, + check_empty_table, + check_col_not_nan, + check_column_binary_capability, + check_dynamic_table_region_data_validity, + check_time_interval_time_columns, + check_time_intervals_stop_after_start, + check_table_values_for_dict, + check_table_time_columns_are_not_negative, +) +from ._time_series import ( + check_resolution, + check_missing_unit, + check_regular_timestamps, + check_timestamps_ascending, + check_data_orientation, + check_timestamps_without_nans, + check_timestamps_match_first_dimension, + check_timestamp_of_the_first_sample_is_not_negative, + check_rate_is_not_zero, +) +from ._icephys import ( + check_intracellular_electrode_cell_id_exists, +) +from ._behavior import ( + check_compass_direction_unit, + check_spatial_series_radians_magnitude, + check_spatial_series_dims, + check_spatial_series_degrees_magnitude, +) + +__all__ = [ + "check_negative_spike_times", + "check_electrical_series_dims", + "check_electrical_series_reference_electrodes_table", + "check_spike_times_not_in_unobserved_interval", + "check_description", + "check_name_slashes", + "check_image_series_data_size", + "check_image_series_reference_images", + "check_image_series_reference_optical_channel", + "check_image_series_external_file_relative", + "check_image_series_external_file_valid", + "check_order_of_images_unique", + "check_order_of_images_len", + "check_index_series_points_to_image", + "check_empty_string_for_optional_attribute", + "check_small_dataset_compression", + "check_large_dataset_compression", + "check_keywords", + "check_institution", + "check_subject_age", + "check_subject_sex", + "check_subject_exists", + "check_doi_publications", + "check_experimenter_form", + "check_experimenter_exists", + "check_experiment_description", + "check_subject_id_exists", + "check_subject_species_exists", + "check_subject_species_form", + "check_subject_proper_age_range", + "check_session_start_time_future_date", + "check_processing_module_name", + "check_session_start_time_old_date", + "check_optogenetic_stimulus_site_has_optogenetic_series", + "check_excitation_lambda_in_nm", + "check_plane_segmentation_image_mask_shape_against_ref_images", + "check_roi_response_series_dims", + "check_emission_lambda_in_nm", + "check_roi_response_series_link_to_plane_segmentation", + "check_single_row", + "check_ids_unique", + "check_empty_table", + "check_col_not_nan", + "check_column_binary_capability", + "check_dynamic_table_region_data_validity", + "check_time_interval_time_columns", + "check_time_intervals_stop_after_start", + "check_table_values_for_dict", + "check_table_time_columns_are_not_negative", + "check_resolution", + "check_missing_unit", + "check_regular_timestamps", + "check_timestamps_ascending", + "check_data_orientation", + "check_timestamps_without_nans", + "check_timestamps_match_first_dimension", + "check_timestamp_of_the_first_sample_is_not_negative", + "check_rate_is_not_zero", + "check_intracellular_electrode_cell_id_exists", + "check_compass_direction_unit", + "check_spatial_series_radians_magnitude", + "check_spatial_series_dims", + "check_spatial_series_degrees_magnitude", +] diff --git a/src/nwbinspector/checks/behavior.py b/src/nwbinspector/checks/_behavior.py similarity index 100% rename from src/nwbinspector/checks/behavior.py rename to src/nwbinspector/checks/_behavior.py diff --git a/src/nwbinspector/checks/ecephys.py b/src/nwbinspector/checks/_ecephys.py similarity index 100% rename from src/nwbinspector/checks/ecephys.py rename to src/nwbinspector/checks/_ecephys.py diff --git a/src/nwbinspector/checks/general.py b/src/nwbinspector/checks/_general.py similarity index 100% rename from src/nwbinspector/checks/general.py rename to src/nwbinspector/checks/_general.py diff --git a/src/nwbinspector/checks/icephys.py b/src/nwbinspector/checks/_icephys.py similarity index 100% rename from src/nwbinspector/checks/icephys.py rename to src/nwbinspector/checks/_icephys.py diff --git a/src/nwbinspector/checks/image_series.py b/src/nwbinspector/checks/_image_series.py similarity index 100% rename from src/nwbinspector/checks/image_series.py rename to src/nwbinspector/checks/_image_series.py diff --git a/src/nwbinspector/checks/images.py b/src/nwbinspector/checks/_images.py similarity index 100% rename from src/nwbinspector/checks/images.py rename to src/nwbinspector/checks/_images.py diff --git a/src/nwbinspector/checks/nwb_containers.py b/src/nwbinspector/checks/_nwb_containers.py similarity index 100% rename from src/nwbinspector/checks/nwb_containers.py rename to src/nwbinspector/checks/_nwb_containers.py diff --git a/src/nwbinspector/checks/nwbfile_metadata.py b/src/nwbinspector/checks/_nwbfile_metadata.py similarity index 100% rename from src/nwbinspector/checks/nwbfile_metadata.py rename to src/nwbinspector/checks/_nwbfile_metadata.py diff --git a/src/nwbinspector/checks/ogen.py b/src/nwbinspector/checks/_ogen.py similarity index 100% rename from src/nwbinspector/checks/ogen.py rename to src/nwbinspector/checks/_ogen.py diff --git a/src/nwbinspector/checks/ophys.py b/src/nwbinspector/checks/_ophys.py similarity index 100% rename from src/nwbinspector/checks/ophys.py rename to src/nwbinspector/checks/_ophys.py diff --git a/src/nwbinspector/checks/tables.py b/src/nwbinspector/checks/_tables.py similarity index 100% rename from src/nwbinspector/checks/tables.py rename to src/nwbinspector/checks/_tables.py diff --git a/src/nwbinspector/checks/time_series.py b/src/nwbinspector/checks/_time_series.py similarity index 100% rename from src/nwbinspector/checks/time_series.py rename to src/nwbinspector/checks/_time_series.py diff --git a/src/nwbinspector/checks/behavior/__init__.py b/src/nwbinspector/checks/behavior/__init__.py new file mode 100644 index 000000000..f9c304fe4 --- /dev/null +++ b/src/nwbinspector/checks/behavior/__init__.py @@ -0,0 +1,13 @@ +import warnings + +message = ( + "All submodules below the level 'nwbinspector.checks' have been deprecated. " + "Please retrieve the specific check function(s) you wish to use from the `available_checks` registry " + "at the top-level or import directly from 'nwbinspector.checks'." +) + +warnings.warn(message=message, category=DeprecationWarning, stacklevel=2) + +# Still keep imports functional with warning for soft deprecation cycle +# TODO: remove after 9/15/2024 +from .._behavior import * diff --git a/src/nwbinspector/checks/ecephys/__init__.py b/src/nwbinspector/checks/ecephys/__init__.py new file mode 100644 index 000000000..f9c304fe4 --- /dev/null +++ b/src/nwbinspector/checks/ecephys/__init__.py @@ -0,0 +1,13 @@ +import warnings + +message = ( + "All submodules below the level 'nwbinspector.checks' have been deprecated. " + "Please retrieve the specific check function(s) you wish to use from the `available_checks` registry " + "at the top-level or import directly from 'nwbinspector.checks'." +) + +warnings.warn(message=message, category=DeprecationWarning, stacklevel=2) + +# Still keep imports functional with warning for soft deprecation cycle +# TODO: remove after 9/15/2024 +from .._behavior import * diff --git a/src/nwbinspector/checks/general/__init__.py b/src/nwbinspector/checks/general/__init__.py new file mode 100644 index 000000000..f9c304fe4 --- /dev/null +++ b/src/nwbinspector/checks/general/__init__.py @@ -0,0 +1,13 @@ +import warnings + +message = ( + "All submodules below the level 'nwbinspector.checks' have been deprecated. " + "Please retrieve the specific check function(s) you wish to use from the `available_checks` registry " + "at the top-level or import directly from 'nwbinspector.checks'." +) + +warnings.warn(message=message, category=DeprecationWarning, stacklevel=2) + +# Still keep imports functional with warning for soft deprecation cycle +# TODO: remove after 9/15/2024 +from .._behavior import * diff --git a/src/nwbinspector/checks/icephys/__init__.py b/src/nwbinspector/checks/icephys/__init__.py new file mode 100644 index 000000000..f9c304fe4 --- /dev/null +++ b/src/nwbinspector/checks/icephys/__init__.py @@ -0,0 +1,13 @@ +import warnings + +message = ( + "All submodules below the level 'nwbinspector.checks' have been deprecated. " + "Please retrieve the specific check function(s) you wish to use from the `available_checks` registry " + "at the top-level or import directly from 'nwbinspector.checks'." +) + +warnings.warn(message=message, category=DeprecationWarning, stacklevel=2) + +# Still keep imports functional with warning for soft deprecation cycle +# TODO: remove after 9/15/2024 +from .._behavior import * diff --git a/src/nwbinspector/checks/image_series/__init__.py b/src/nwbinspector/checks/image_series/__init__.py new file mode 100644 index 000000000..f9c304fe4 --- /dev/null +++ b/src/nwbinspector/checks/image_series/__init__.py @@ -0,0 +1,13 @@ +import warnings + +message = ( + "All submodules below the level 'nwbinspector.checks' have been deprecated. " + "Please retrieve the specific check function(s) you wish to use from the `available_checks` registry " + "at the top-level or import directly from 'nwbinspector.checks'." +) + +warnings.warn(message=message, category=DeprecationWarning, stacklevel=2) + +# Still keep imports functional with warning for soft deprecation cycle +# TODO: remove after 9/15/2024 +from .._behavior import * diff --git a/src/nwbinspector/checks/images/__init__.py b/src/nwbinspector/checks/images/__init__.py new file mode 100644 index 000000000..f9c304fe4 --- /dev/null +++ b/src/nwbinspector/checks/images/__init__.py @@ -0,0 +1,13 @@ +import warnings + +message = ( + "All submodules below the level 'nwbinspector.checks' have been deprecated. " + "Please retrieve the specific check function(s) you wish to use from the `available_checks` registry " + "at the top-level or import directly from 'nwbinspector.checks'." +) + +warnings.warn(message=message, category=DeprecationWarning, stacklevel=2) + +# Still keep imports functional with warning for soft deprecation cycle +# TODO: remove after 9/15/2024 +from .._behavior import * diff --git a/src/nwbinspector/checks/nwb_containers/__init__.py b/src/nwbinspector/checks/nwb_containers/__init__.py new file mode 100644 index 000000000..f9c304fe4 --- /dev/null +++ b/src/nwbinspector/checks/nwb_containers/__init__.py @@ -0,0 +1,13 @@ +import warnings + +message = ( + "All submodules below the level 'nwbinspector.checks' have been deprecated. " + "Please retrieve the specific check function(s) you wish to use from the `available_checks` registry " + "at the top-level or import directly from 'nwbinspector.checks'." +) + +warnings.warn(message=message, category=DeprecationWarning, stacklevel=2) + +# Still keep imports functional with warning for soft deprecation cycle +# TODO: remove after 9/15/2024 +from .._behavior import * diff --git a/src/nwbinspector/checks/nwbfile_metadata/__init__.py b/src/nwbinspector/checks/nwbfile_metadata/__init__.py new file mode 100644 index 000000000..f9c304fe4 --- /dev/null +++ b/src/nwbinspector/checks/nwbfile_metadata/__init__.py @@ -0,0 +1,13 @@ +import warnings + +message = ( + "All submodules below the level 'nwbinspector.checks' have been deprecated. " + "Please retrieve the specific check function(s) you wish to use from the `available_checks` registry " + "at the top-level or import directly from 'nwbinspector.checks'." +) + +warnings.warn(message=message, category=DeprecationWarning, stacklevel=2) + +# Still keep imports functional with warning for soft deprecation cycle +# TODO: remove after 9/15/2024 +from .._behavior import * diff --git a/src/nwbinspector/checks/ogen/__init__.py b/src/nwbinspector/checks/ogen/__init__.py new file mode 100644 index 000000000..f9c304fe4 --- /dev/null +++ b/src/nwbinspector/checks/ogen/__init__.py @@ -0,0 +1,13 @@ +import warnings + +message = ( + "All submodules below the level 'nwbinspector.checks' have been deprecated. " + "Please retrieve the specific check function(s) you wish to use from the `available_checks` registry " + "at the top-level or import directly from 'nwbinspector.checks'." +) + +warnings.warn(message=message, category=DeprecationWarning, stacklevel=2) + +# Still keep imports functional with warning for soft deprecation cycle +# TODO: remove after 9/15/2024 +from .._behavior import * diff --git a/src/nwbinspector/checks/ophys/__init__.py b/src/nwbinspector/checks/ophys/__init__.py new file mode 100644 index 000000000..f9c304fe4 --- /dev/null +++ b/src/nwbinspector/checks/ophys/__init__.py @@ -0,0 +1,13 @@ +import warnings + +message = ( + "All submodules below the level 'nwbinspector.checks' have been deprecated. " + "Please retrieve the specific check function(s) you wish to use from the `available_checks` registry " + "at the top-level or import directly from 'nwbinspector.checks'." +) + +warnings.warn(message=message, category=DeprecationWarning, stacklevel=2) + +# Still keep imports functional with warning for soft deprecation cycle +# TODO: remove after 9/15/2024 +from .._behavior import * diff --git a/src/nwbinspector/checks/tables/__init__.py b/src/nwbinspector/checks/tables/__init__.py new file mode 100644 index 000000000..f9c304fe4 --- /dev/null +++ b/src/nwbinspector/checks/tables/__init__.py @@ -0,0 +1,13 @@ +import warnings + +message = ( + "All submodules below the level 'nwbinspector.checks' have been deprecated. " + "Please retrieve the specific check function(s) you wish to use from the `available_checks` registry " + "at the top-level or import directly from 'nwbinspector.checks'." +) + +warnings.warn(message=message, category=DeprecationWarning, stacklevel=2) + +# Still keep imports functional with warning for soft deprecation cycle +# TODO: remove after 9/15/2024 +from .._behavior import * diff --git a/src/nwbinspector/checks/time_series/__init__.py b/src/nwbinspector/checks/time_series/__init__.py new file mode 100644 index 000000000..f9c304fe4 --- /dev/null +++ b/src/nwbinspector/checks/time_series/__init__.py @@ -0,0 +1,13 @@ +import warnings + +message = ( + "All submodules below the level 'nwbinspector.checks' have been deprecated. " + "Please retrieve the specific check function(s) you wish to use from the `available_checks` registry " + "at the top-level or import directly from 'nwbinspector.checks'." +) + +warnings.warn(message=message, category=DeprecationWarning, stacklevel=2) + +# Still keep imports functional with warning for soft deprecation cycle +# TODO: remove after 9/15/2024 +from .._behavior import *