From 5cf57f169df86875c4f684518ec3514b1bacffbc Mon Sep 17 00:00:00 2001 From: Cody Baker <51133164+CodyCBakerPhD@users.noreply.github.com> Date: Thu, 21 Jul 2022 07:37:47 -0400 Subject: [PATCH 01/11] Update testing.yml --- .github/workflows/testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 944114219..aa93d0df8 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -1,7 +1,7 @@ name: Minimal and Full Tests on: schedule: - - cron: "0 0 * * *" # daily + - cron: "0 16 * * *" # Daily at noon EST pull_request: env: From 1d4fdba51b3d984abd0b13bf7e63d9aa3bc264cb Mon Sep 17 00:00:00 2001 From: Cody Baker <51133164+CodyCBakerPhD@users.noreply.github.com> Date: Thu, 21 Jul 2022 08:11:18 -0400 Subject: [PATCH 02/11] Update README.md --- README.md | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index d733d6368..3b1e37112 100644 --- a/README.md +++ b/README.md @@ -5,13 +5,11 @@ [![documentation](https://readthedocs.org/projects/nwb-conversion-tools/badge/?version=main)](https://nwb-conversion-tools.readthedocs.io/en/main/) [![License](https://img.shields.io/pypi/l/pynwb.svg)](https://github.com/catalystneuro/nwb-conversion-tools/license.txt) -# NWB conversion tools +# NeuroConv -NWB Conversion Tools is a package for creating NWB files by converting and +NeuroConv is a package for creating NWB files by converting and combining neural data in proprietary formats and adding essential metadata. -**Under heavy construction. API is changing rapidly.** - Features: * Command line interface @@ -27,16 +25,16 @@ pip install nwb-conversion-tools For more flexibility we recommend installing the latest version directly from GitHub. The following commands create an environment with all the required dependencies and the latest updates: ```shell -git clone https://github.com/catalystneuro/nwb-conversion-tools -cd nwb-conversion-tools -conda env create -f make_env.yml -conda activate nwb_conversion_env +git clone https://github.com/catalystneuro/neuroconv +cd neuroconv +conda env create -f make_environment.yml +conda activate neuroconv_environment ``` Note that this will install the package in [editable mode](https://pip.pypa.io/en/stable/cli/pip_install/#editable-installs). Finally, if you prefer to avoid `conda` altogether, the following commands provide a clean installation within the current environment: ```shell -pip install git+https://github.com/catalystneuro/nwb-conversion-tools.git@master +pip install git+https://github.com/catalystneuro/neuroconv.git@master ``` ## Dependencies @@ -142,8 +140,8 @@ The output of these tests is, by default, stored in a temporary directory that i For building the documentation locally, the following procedure can be followed. Create a clean environment and type the following commands in your terminal: ```shell -git clone https://github.com/catalystneuro/nwb-conversion-tools -cd nwb-conversion-tools +git clone https://github.com/catalystneuro/neuroconv +cd neuroconv pip install -e .[docs] ``` These commands install both the latest version of the repo and the dependencies necessary to build the documentation. From 9e85571cb4854d0bb211b6b4f3c6257db1f04668 Mon Sep 17 00:00:00 2001 From: CodyCBakerPhD Date: Thu, 21 Jul 2022 12:41:05 +0000 Subject: [PATCH 03/11] fixed minimal --- README.md | 4 +- make_env_testing.yml | 9 - make_env.yml => make_environment.yml | 2 +- setup.py | 10 +- .../__init__.py | 0 .../basedatainterface.py | 0 .../datainterfaces/__init__.py | 0 .../datainterfaces/behavior/__init__.py | 0 .../datainterfaces/behavior/movie/__init__.py | 0 .../behavior/movie/movie_utils.py | 0 .../behavior/movie/moviedatainterface.py | 4 +- .../datainterfaces/ecephys/__init__.py | 0 .../datainterfaces/ecephys/axona/__init__.py | 0 .../ecephys/axona/axonadatainterface.py | 0 .../ecephys/baselfpextractorinterface.py | 0 .../baserecordingextractorinterface.py | 0 .../ecephys/basesortingextractorinterface.py | 0 .../ecephys/blackrock/__init__.py | 0 .../blackrock/blackrockdatainterface.py | 0 .../ecephys/blackrock/header_tools.py | 0 .../datainterfaces/ecephys/ced/__init__.py | 0 .../ecephys/ced/ceddatainterface.py | 0 .../ecephys/cellexplorer/__init__.py | 0 .../cellexplorer/cellexplorerdatainterface.py | 0 .../datainterfaces/ecephys/intan/__init__.py | 0 .../ecephys/intan/intandatainterface.py | 0 .../ecephys/kilosort/__init__.py | 0 .../ecephys/kilosort/kilosortdatainterface.py | 0 .../ecephys/neuralynx/__init__.py | 0 .../neuralynx/neuralynxdatainterface.py | 0 .../ecephys/neuroscope/__init__.py | 0 .../ecephys/neuroscope/neuroscope_utils.py | 0 .../neuroscope/neuroscopedatainterface.py | 0 .../ecephys/openephys/__init__.py | 0 .../openephys/openephysdatainterface.py | 0 .../datainterfaces/ecephys/phy/__init__.py | 0 .../ecephys/phy/phydatainterface.py | 0 .../ecephys/spikegadgets/__init__.py | 0 .../spikegadgets/spikegadgetsdatainterface.py | 0 .../ecephys/spikeglx/__init__.py | 0 .../ecephys/spikeglx/spikeglx_utils.py | 0 .../ecephys/spikeglx/spikeglxdatainterface.py | 0 .../ecephys/spikeinterface/__init__.py | 0 .../spikeinterface/sipickledatainterfaces.py | 0 .../ecephys/tutorial/__init__.py | 0 .../recordingtutorialdatainterface.py | 0 .../tutorial/sortingtutorialdatainterface.py | 0 .../datainterfaces/icephys/__init__.py | 0 .../datainterfaces/icephys/abf/__init__.py | 0 .../icephys/abf/abfdatainterface.py | 0 .../icephys/baseicephysinterface.py | 0 .../datainterfaces/ophys/__init__.py | 0 .../ophys/baseimagingextractorinterface.py | 0 .../basesegmentationextractorinterface.py | 0 .../datainterfaces/ophys/caiman/__init__.py | 0 .../ophys/caiman/caimandatainterface.py | 0 .../datainterfaces/ophys/cnmfe/__init__.py | 0 .../ophys/cnmfe/cnmfedatainterface.py | 0 .../datainterfaces/ophys/extract/__init__.py | 0 .../ophys/extract/extractdatainterface.py | 0 .../datainterfaces/ophys/hdf5/__init__.py | 0 .../ophys/hdf5/hdf5datainterface.py | 0 .../datainterfaces/ophys/sbx/__init__.py | 0 .../ophys/sbx/sbxdatainterface.py | 0 .../ophys/scanimage/__init__.py | 0 .../scanimage/scanimageimaginginterface.py | 0 .../datainterfaces/ophys/sima/__init__.py | 0 .../ophys/sima/simadatainterface.py | 0 .../datainterfaces/ophys/suite2p/__init__.py | 0 .../ophys/suite2p/suite2pdatainterface.py | 0 .../datainterfaces/ophys/tiff/__init__.py | 0 .../ophys/tiff/tiffdatainterface.py | 0 .../nwbconverter.py | 0 .../tools/__init__.py | 0 .../tools/data_transfers.py | 0 .../tools/figshare.py | 0 .../tools/hdmf.py | 0 .../tools/neo/__init__.py | 0 .../tools/neo/neo.py | 0 .../tools/nwb_helpers.py | 0 .../tools/roiextractors/__init__.py | 0 .../tools/roiextractors/roiextractors.py | 2 +- .../tools/spikeinterface/__init__.py | 0 .../tools/spikeinterface/spikeinterface.py | 0 ...pikeinterfacerecordingdatachunkiterator.py | 0 .../yaml_conversion_specification/__init__.py | 0 .../yaml_conversion_specification.py | 0 .../utils/__init__.py | 0 .../utils/checks.py | 0 .../utils/dict.py | 0 .../utils/globbing.py | 0 .../utils/json_schema.py | 0 .../utils/types.py | 0 .../schemas/metadata_schema.json | 267 ------------------ .../schemas/source_example.json | 12 - .../schemas/source_schema.json | 56 ---- .../yaml_conversion_specification_schema.json | 51 ---- tests/test_internals/test_converter.py | 5 +- tests/test_internals/test_globbing_utils.py | 2 +- tests/test_internals/test_hdmf.py | 2 +- tests/test_internals/test_interfaces.py | 6 +- .../test_internals/test_json_schema_utils.py | 2 +- tests/test_internals/test_movie_interface.py | 2 +- tests/test_internals/test_movie_utils.py | 4 +- .../test_roi_extractors_module.py | 2 +- tests/test_internals/test_schemas.py | 6 +- tests/test_internals/test_si.py | 11 +- tests/test_internals/test_tools.py | 4 +- tests/test_internals/test_tools/test_hdmf.py | 2 +- tests/test_internals/test_utils.py | 2 +- tests/test_on_data/setup_paths.py | 2 +- tests/test_on_data/test_gin_behavior.py | 4 +- tests/test_on_data/test_gin_ecephys.py | 2 +- tests/test_on_data/test_gin_icephys.py | 6 +- tests/test_on_data/test_gin_ophys.py | 2 +- .../test_metadata/test_neuralynx_metadata.py | 2 +- .../test_metadata/test_neuroscope_metadata.py | 4 +- .../test_metadata/test_scanimage_metadata.py | 2 +- .../test_metadata/test_spikeglx_metadata.py | 4 +- .../test_metadata_combinations.py | 4 +- .../test_yaml_conversion_specification.py | 4 +- .../test_yaml_conversion_specification_cli.py | 2 +- 122 files changed, 53 insertions(+), 452 deletions(-) delete mode 100644 make_env_testing.yml rename make_env.yml => make_environment.yml (84%) rename src/{nwb_conversion_tools => neuroconv}/__init__.py (100%) rename src/{nwb_conversion_tools => neuroconv}/basedatainterface.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/__init__.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/behavior/__init__.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/behavior/movie/__init__.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/behavior/movie/movie_utils.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/behavior/movie/moviedatainterface.py (99%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ecephys/__init__.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ecephys/axona/__init__.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ecephys/axona/axonadatainterface.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ecephys/baselfpextractorinterface.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ecephys/baserecordingextractorinterface.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ecephys/basesortingextractorinterface.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ecephys/blackrock/__init__.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ecephys/blackrock/blackrockdatainterface.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ecephys/blackrock/header_tools.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ecephys/ced/__init__.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ecephys/ced/ceddatainterface.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ecephys/cellexplorer/__init__.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ecephys/cellexplorer/cellexplorerdatainterface.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ecephys/intan/__init__.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ecephys/intan/intandatainterface.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ecephys/kilosort/__init__.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ecephys/kilosort/kilosortdatainterface.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ecephys/neuralynx/__init__.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ecephys/neuralynx/neuralynxdatainterface.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ecephys/neuroscope/__init__.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ecephys/neuroscope/neuroscope_utils.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ecephys/neuroscope/neuroscopedatainterface.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ecephys/openephys/__init__.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ecephys/openephys/openephysdatainterface.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ecephys/phy/__init__.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ecephys/phy/phydatainterface.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ecephys/spikegadgets/__init__.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ecephys/spikegadgets/spikegadgetsdatainterface.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ecephys/spikeglx/__init__.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ecephys/spikeglx/spikeglx_utils.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ecephys/spikeglx/spikeglxdatainterface.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ecephys/spikeinterface/__init__.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ecephys/spikeinterface/sipickledatainterfaces.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ecephys/tutorial/__init__.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ecephys/tutorial/recordingtutorialdatainterface.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ecephys/tutorial/sortingtutorialdatainterface.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/icephys/__init__.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/icephys/abf/__init__.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/icephys/abf/abfdatainterface.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/icephys/baseicephysinterface.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ophys/__init__.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ophys/baseimagingextractorinterface.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ophys/basesegmentationextractorinterface.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ophys/caiman/__init__.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ophys/caiman/caimandatainterface.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ophys/cnmfe/__init__.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ophys/cnmfe/cnmfedatainterface.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ophys/extract/__init__.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ophys/extract/extractdatainterface.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ophys/hdf5/__init__.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ophys/hdf5/hdf5datainterface.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ophys/sbx/__init__.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ophys/sbx/sbxdatainterface.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ophys/scanimage/__init__.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ophys/scanimage/scanimageimaginginterface.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ophys/sima/__init__.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ophys/sima/simadatainterface.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ophys/suite2p/__init__.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ophys/suite2p/suite2pdatainterface.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ophys/tiff/__init__.py (100%) rename src/{nwb_conversion_tools => neuroconv}/datainterfaces/ophys/tiff/tiffdatainterface.py (100%) rename src/{nwb_conversion_tools => neuroconv}/nwbconverter.py (100%) rename src/{nwb_conversion_tools => neuroconv}/tools/__init__.py (100%) rename src/{nwb_conversion_tools => neuroconv}/tools/data_transfers.py (100%) rename src/{nwb_conversion_tools => neuroconv}/tools/figshare.py (100%) rename src/{nwb_conversion_tools => neuroconv}/tools/hdmf.py (100%) rename src/{nwb_conversion_tools => neuroconv}/tools/neo/__init__.py (100%) rename src/{nwb_conversion_tools => neuroconv}/tools/neo/neo.py (100%) rename src/{nwb_conversion_tools => neuroconv}/tools/nwb_helpers.py (100%) rename src/{nwb_conversion_tools => neuroconv}/tools/roiextractors/__init__.py (100%) rename src/{nwb_conversion_tools => neuroconv}/tools/roiextractors/roiextractors.py (99%) rename src/{nwb_conversion_tools => neuroconv}/tools/spikeinterface/__init__.py (100%) rename src/{nwb_conversion_tools => neuroconv}/tools/spikeinterface/spikeinterface.py (100%) rename src/{nwb_conversion_tools => neuroconv}/tools/spikeinterface/spikeinterfacerecordingdatachunkiterator.py (100%) rename src/{nwb_conversion_tools => neuroconv}/tools/yaml_conversion_specification/__init__.py (100%) rename src/{nwb_conversion_tools => neuroconv}/tools/yaml_conversion_specification/yaml_conversion_specification.py (100%) rename src/{nwb_conversion_tools => neuroconv}/utils/__init__.py (100%) rename src/{nwb_conversion_tools => neuroconv}/utils/checks.py (100%) rename src/{nwb_conversion_tools => neuroconv}/utils/dict.py (100%) rename src/{nwb_conversion_tools => neuroconv}/utils/globbing.py (100%) rename src/{nwb_conversion_tools => neuroconv}/utils/json_schema.py (100%) rename src/{nwb_conversion_tools => neuroconv}/utils/types.py (100%) delete mode 100644 src/nwb_conversion_tools/schemas/metadata_schema.json delete mode 100644 src/nwb_conversion_tools/schemas/source_example.json delete mode 100644 src/nwb_conversion_tools/schemas/source_schema.json delete mode 100644 src/nwb_conversion_tools/schemas/yaml_conversion_specification_schema.json diff --git a/README.md b/README.md index d733d6368..3ac5b944e 100644 --- a/README.md +++ b/README.md @@ -7,11 +7,9 @@ # NWB conversion tools -NWB Conversion Tools is a package for creating NWB files by converting and +Neuroconv is a package for creating NWB files by converting and combining neural data in proprietary formats and adding essential metadata. -**Under heavy construction. API is changing rapidly.** - Features: * Command line interface diff --git a/make_env_testing.yml b/make_env_testing.yml deleted file mode 100644 index a183f9ad7..000000000 --- a/make_env_testing.yml +++ /dev/null @@ -1,9 +0,0 @@ -name: nwb_conversion_testing_env -channels: -- conda-forge -dependencies: -- python>=3.7,<3.10 -- datalad -- pip -- pip: - - -e .[test, full] diff --git a/make_env.yml b/make_environment.yml similarity index 84% rename from make_env.yml rename to make_environment.yml index 61aad1d6a..9c5cc94e9 100644 --- a/make_env.yml +++ b/make_environment.yml @@ -1,4 +1,4 @@ -name: nwb_conversion_env +name: neuroconv_environment channels: - defaults - anaconda diff --git a/setup.py b/setup.py index 19fe12933..01d10497e 100644 --- a/setup.py +++ b/setup.py @@ -26,14 +26,14 @@ copy(src=gin_config_file_base, dst=gin_config_file_local) setup( - name="nwb-conversion-tools", - version="0.11.38", + name="neuroconv", + version="0.1.0", description="Convert data from proprietary formats to NWB format.", long_description=long_description, long_description_content_type="text/markdown", - author="Ben Dichter, Cody Baker, and Luiz Tauffer", + author="Cody Baker, Szonja Weigl, Heberto Mayorquin, Luiz Tauffer, and Ben Dichter.", author_email="ben.dichter@gmail.com", - url="https://github.com/catalystneuro/nwb-conversion-tools", + url="https://github.com/catalystneuro/neuroconv", keywords="nwb", packages=find_packages(where="src"), package_dir={"": "src"}, @@ -43,7 +43,7 @@ extras_require=extras_require, entry_points={ "console_scripts": [ - "nwbct-run-conversion = nwb_conversion_tools.tools.yaml_conversion_specification.yaml_conversion_specification:run_conversion_from_yaml_cli", + "neuroconv = neuroconv.tools.yaml_conversion_specification.yaml_conversion_specification:run_conversion_from_yaml_cli", ], }, ) diff --git a/src/nwb_conversion_tools/__init__.py b/src/neuroconv/__init__.py similarity index 100% rename from src/nwb_conversion_tools/__init__.py rename to src/neuroconv/__init__.py diff --git a/src/nwb_conversion_tools/basedatainterface.py b/src/neuroconv/basedatainterface.py similarity index 100% rename from src/nwb_conversion_tools/basedatainterface.py rename to src/neuroconv/basedatainterface.py diff --git a/src/nwb_conversion_tools/datainterfaces/__init__.py b/src/neuroconv/datainterfaces/__init__.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/__init__.py rename to src/neuroconv/datainterfaces/__init__.py diff --git a/src/nwb_conversion_tools/datainterfaces/behavior/__init__.py b/src/neuroconv/datainterfaces/behavior/__init__.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/behavior/__init__.py rename to src/neuroconv/datainterfaces/behavior/__init__.py diff --git a/src/nwb_conversion_tools/datainterfaces/behavior/movie/__init__.py b/src/neuroconv/datainterfaces/behavior/movie/__init__.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/behavior/movie/__init__.py rename to src/neuroconv/datainterfaces/behavior/movie/__init__.py diff --git a/src/nwb_conversion_tools/datainterfaces/behavior/movie/movie_utils.py b/src/neuroconv/datainterfaces/behavior/movie/movie_utils.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/behavior/movie/movie_utils.py rename to src/neuroconv/datainterfaces/behavior/movie/movie_utils.py diff --git a/src/nwb_conversion_tools/datainterfaces/behavior/movie/moviedatainterface.py b/src/neuroconv/datainterfaces/behavior/movie/moviedatainterface.py similarity index 99% rename from src/nwb_conversion_tools/datainterfaces/behavior/movie/moviedatainterface.py rename to src/neuroconv/datainterfaces/behavior/movie/moviedatainterface.py index 443367a5f..4543805bd 100644 --- a/src/nwb_conversion_tools/datainterfaces/behavior/movie/moviedatainterface.py +++ b/src/neuroconv/datainterfaces/behavior/movie/moviedatainterface.py @@ -10,12 +10,11 @@ from pynwb import NWBFile from pynwb.image import ImageSeries from tqdm import tqdm -from nwb_conversion_tools.utils import calculate_regular_series_rate from .movie_utils import VideoCaptureContext from ....basedatainterface import BaseDataInterface from ....tools.nwb_helpers import get_module -from ....utils import get_schema_from_hdmf_class, get_base_schema +from ....utils import get_schema_from_hdmf_class, get_base_schema, calculate_regular_series_rate def _check_duplicates(movies_metadata, file_paths): @@ -37,7 +36,6 @@ def _check_duplicates(movies_metadata, file_paths): file_paths_list: List[List[str]] len(file_paths_list)==len(movies_metadata_unique) """ - keys_set = [] movies_metadata_unique = [] file_paths_list = [] diff --git a/src/nwb_conversion_tools/datainterfaces/ecephys/__init__.py b/src/neuroconv/datainterfaces/ecephys/__init__.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ecephys/__init__.py rename to src/neuroconv/datainterfaces/ecephys/__init__.py diff --git a/src/nwb_conversion_tools/datainterfaces/ecephys/axona/__init__.py b/src/neuroconv/datainterfaces/ecephys/axona/__init__.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ecephys/axona/__init__.py rename to src/neuroconv/datainterfaces/ecephys/axona/__init__.py diff --git a/src/nwb_conversion_tools/datainterfaces/ecephys/axona/axonadatainterface.py b/src/neuroconv/datainterfaces/ecephys/axona/axonadatainterface.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ecephys/axona/axonadatainterface.py rename to src/neuroconv/datainterfaces/ecephys/axona/axonadatainterface.py diff --git a/src/nwb_conversion_tools/datainterfaces/ecephys/baselfpextractorinterface.py b/src/neuroconv/datainterfaces/ecephys/baselfpextractorinterface.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ecephys/baselfpextractorinterface.py rename to src/neuroconv/datainterfaces/ecephys/baselfpextractorinterface.py diff --git a/src/nwb_conversion_tools/datainterfaces/ecephys/baserecordingextractorinterface.py b/src/neuroconv/datainterfaces/ecephys/baserecordingextractorinterface.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ecephys/baserecordingextractorinterface.py rename to src/neuroconv/datainterfaces/ecephys/baserecordingextractorinterface.py diff --git a/src/nwb_conversion_tools/datainterfaces/ecephys/basesortingextractorinterface.py b/src/neuroconv/datainterfaces/ecephys/basesortingextractorinterface.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ecephys/basesortingextractorinterface.py rename to src/neuroconv/datainterfaces/ecephys/basesortingextractorinterface.py diff --git a/src/nwb_conversion_tools/datainterfaces/ecephys/blackrock/__init__.py b/src/neuroconv/datainterfaces/ecephys/blackrock/__init__.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ecephys/blackrock/__init__.py rename to src/neuroconv/datainterfaces/ecephys/blackrock/__init__.py diff --git a/src/nwb_conversion_tools/datainterfaces/ecephys/blackrock/blackrockdatainterface.py b/src/neuroconv/datainterfaces/ecephys/blackrock/blackrockdatainterface.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ecephys/blackrock/blackrockdatainterface.py rename to src/neuroconv/datainterfaces/ecephys/blackrock/blackrockdatainterface.py diff --git a/src/nwb_conversion_tools/datainterfaces/ecephys/blackrock/header_tools.py b/src/neuroconv/datainterfaces/ecephys/blackrock/header_tools.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ecephys/blackrock/header_tools.py rename to src/neuroconv/datainterfaces/ecephys/blackrock/header_tools.py diff --git a/src/nwb_conversion_tools/datainterfaces/ecephys/ced/__init__.py b/src/neuroconv/datainterfaces/ecephys/ced/__init__.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ecephys/ced/__init__.py rename to src/neuroconv/datainterfaces/ecephys/ced/__init__.py diff --git a/src/nwb_conversion_tools/datainterfaces/ecephys/ced/ceddatainterface.py b/src/neuroconv/datainterfaces/ecephys/ced/ceddatainterface.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ecephys/ced/ceddatainterface.py rename to src/neuroconv/datainterfaces/ecephys/ced/ceddatainterface.py diff --git a/src/nwb_conversion_tools/datainterfaces/ecephys/cellexplorer/__init__.py b/src/neuroconv/datainterfaces/ecephys/cellexplorer/__init__.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ecephys/cellexplorer/__init__.py rename to src/neuroconv/datainterfaces/ecephys/cellexplorer/__init__.py diff --git a/src/nwb_conversion_tools/datainterfaces/ecephys/cellexplorer/cellexplorerdatainterface.py b/src/neuroconv/datainterfaces/ecephys/cellexplorer/cellexplorerdatainterface.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ecephys/cellexplorer/cellexplorerdatainterface.py rename to src/neuroconv/datainterfaces/ecephys/cellexplorer/cellexplorerdatainterface.py diff --git a/src/nwb_conversion_tools/datainterfaces/ecephys/intan/__init__.py b/src/neuroconv/datainterfaces/ecephys/intan/__init__.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ecephys/intan/__init__.py rename to src/neuroconv/datainterfaces/ecephys/intan/__init__.py diff --git a/src/nwb_conversion_tools/datainterfaces/ecephys/intan/intandatainterface.py b/src/neuroconv/datainterfaces/ecephys/intan/intandatainterface.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ecephys/intan/intandatainterface.py rename to src/neuroconv/datainterfaces/ecephys/intan/intandatainterface.py diff --git a/src/nwb_conversion_tools/datainterfaces/ecephys/kilosort/__init__.py b/src/neuroconv/datainterfaces/ecephys/kilosort/__init__.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ecephys/kilosort/__init__.py rename to src/neuroconv/datainterfaces/ecephys/kilosort/__init__.py diff --git a/src/nwb_conversion_tools/datainterfaces/ecephys/kilosort/kilosortdatainterface.py b/src/neuroconv/datainterfaces/ecephys/kilosort/kilosortdatainterface.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ecephys/kilosort/kilosortdatainterface.py rename to src/neuroconv/datainterfaces/ecephys/kilosort/kilosortdatainterface.py diff --git a/src/nwb_conversion_tools/datainterfaces/ecephys/neuralynx/__init__.py b/src/neuroconv/datainterfaces/ecephys/neuralynx/__init__.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ecephys/neuralynx/__init__.py rename to src/neuroconv/datainterfaces/ecephys/neuralynx/__init__.py diff --git a/src/nwb_conversion_tools/datainterfaces/ecephys/neuralynx/neuralynxdatainterface.py b/src/neuroconv/datainterfaces/ecephys/neuralynx/neuralynxdatainterface.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ecephys/neuralynx/neuralynxdatainterface.py rename to src/neuroconv/datainterfaces/ecephys/neuralynx/neuralynxdatainterface.py diff --git a/src/nwb_conversion_tools/datainterfaces/ecephys/neuroscope/__init__.py b/src/neuroconv/datainterfaces/ecephys/neuroscope/__init__.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ecephys/neuroscope/__init__.py rename to src/neuroconv/datainterfaces/ecephys/neuroscope/__init__.py diff --git a/src/nwb_conversion_tools/datainterfaces/ecephys/neuroscope/neuroscope_utils.py b/src/neuroconv/datainterfaces/ecephys/neuroscope/neuroscope_utils.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ecephys/neuroscope/neuroscope_utils.py rename to src/neuroconv/datainterfaces/ecephys/neuroscope/neuroscope_utils.py diff --git a/src/nwb_conversion_tools/datainterfaces/ecephys/neuroscope/neuroscopedatainterface.py b/src/neuroconv/datainterfaces/ecephys/neuroscope/neuroscopedatainterface.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ecephys/neuroscope/neuroscopedatainterface.py rename to src/neuroconv/datainterfaces/ecephys/neuroscope/neuroscopedatainterface.py diff --git a/src/nwb_conversion_tools/datainterfaces/ecephys/openephys/__init__.py b/src/neuroconv/datainterfaces/ecephys/openephys/__init__.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ecephys/openephys/__init__.py rename to src/neuroconv/datainterfaces/ecephys/openephys/__init__.py diff --git a/src/nwb_conversion_tools/datainterfaces/ecephys/openephys/openephysdatainterface.py b/src/neuroconv/datainterfaces/ecephys/openephys/openephysdatainterface.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ecephys/openephys/openephysdatainterface.py rename to src/neuroconv/datainterfaces/ecephys/openephys/openephysdatainterface.py diff --git a/src/nwb_conversion_tools/datainterfaces/ecephys/phy/__init__.py b/src/neuroconv/datainterfaces/ecephys/phy/__init__.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ecephys/phy/__init__.py rename to src/neuroconv/datainterfaces/ecephys/phy/__init__.py diff --git a/src/nwb_conversion_tools/datainterfaces/ecephys/phy/phydatainterface.py b/src/neuroconv/datainterfaces/ecephys/phy/phydatainterface.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ecephys/phy/phydatainterface.py rename to src/neuroconv/datainterfaces/ecephys/phy/phydatainterface.py diff --git a/src/nwb_conversion_tools/datainterfaces/ecephys/spikegadgets/__init__.py b/src/neuroconv/datainterfaces/ecephys/spikegadgets/__init__.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ecephys/spikegadgets/__init__.py rename to src/neuroconv/datainterfaces/ecephys/spikegadgets/__init__.py diff --git a/src/nwb_conversion_tools/datainterfaces/ecephys/spikegadgets/spikegadgetsdatainterface.py b/src/neuroconv/datainterfaces/ecephys/spikegadgets/spikegadgetsdatainterface.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ecephys/spikegadgets/spikegadgetsdatainterface.py rename to src/neuroconv/datainterfaces/ecephys/spikegadgets/spikegadgetsdatainterface.py diff --git a/src/nwb_conversion_tools/datainterfaces/ecephys/spikeglx/__init__.py b/src/neuroconv/datainterfaces/ecephys/spikeglx/__init__.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ecephys/spikeglx/__init__.py rename to src/neuroconv/datainterfaces/ecephys/spikeglx/__init__.py diff --git a/src/nwb_conversion_tools/datainterfaces/ecephys/spikeglx/spikeglx_utils.py b/src/neuroconv/datainterfaces/ecephys/spikeglx/spikeglx_utils.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ecephys/spikeglx/spikeglx_utils.py rename to src/neuroconv/datainterfaces/ecephys/spikeglx/spikeglx_utils.py diff --git a/src/nwb_conversion_tools/datainterfaces/ecephys/spikeglx/spikeglxdatainterface.py b/src/neuroconv/datainterfaces/ecephys/spikeglx/spikeglxdatainterface.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ecephys/spikeglx/spikeglxdatainterface.py rename to src/neuroconv/datainterfaces/ecephys/spikeglx/spikeglxdatainterface.py diff --git a/src/nwb_conversion_tools/datainterfaces/ecephys/spikeinterface/__init__.py b/src/neuroconv/datainterfaces/ecephys/spikeinterface/__init__.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ecephys/spikeinterface/__init__.py rename to src/neuroconv/datainterfaces/ecephys/spikeinterface/__init__.py diff --git a/src/nwb_conversion_tools/datainterfaces/ecephys/spikeinterface/sipickledatainterfaces.py b/src/neuroconv/datainterfaces/ecephys/spikeinterface/sipickledatainterfaces.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ecephys/spikeinterface/sipickledatainterfaces.py rename to src/neuroconv/datainterfaces/ecephys/spikeinterface/sipickledatainterfaces.py diff --git a/src/nwb_conversion_tools/datainterfaces/ecephys/tutorial/__init__.py b/src/neuroconv/datainterfaces/ecephys/tutorial/__init__.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ecephys/tutorial/__init__.py rename to src/neuroconv/datainterfaces/ecephys/tutorial/__init__.py diff --git a/src/nwb_conversion_tools/datainterfaces/ecephys/tutorial/recordingtutorialdatainterface.py b/src/neuroconv/datainterfaces/ecephys/tutorial/recordingtutorialdatainterface.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ecephys/tutorial/recordingtutorialdatainterface.py rename to src/neuroconv/datainterfaces/ecephys/tutorial/recordingtutorialdatainterface.py diff --git a/src/nwb_conversion_tools/datainterfaces/ecephys/tutorial/sortingtutorialdatainterface.py b/src/neuroconv/datainterfaces/ecephys/tutorial/sortingtutorialdatainterface.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ecephys/tutorial/sortingtutorialdatainterface.py rename to src/neuroconv/datainterfaces/ecephys/tutorial/sortingtutorialdatainterface.py diff --git a/src/nwb_conversion_tools/datainterfaces/icephys/__init__.py b/src/neuroconv/datainterfaces/icephys/__init__.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/icephys/__init__.py rename to src/neuroconv/datainterfaces/icephys/__init__.py diff --git a/src/nwb_conversion_tools/datainterfaces/icephys/abf/__init__.py b/src/neuroconv/datainterfaces/icephys/abf/__init__.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/icephys/abf/__init__.py rename to src/neuroconv/datainterfaces/icephys/abf/__init__.py diff --git a/src/nwb_conversion_tools/datainterfaces/icephys/abf/abfdatainterface.py b/src/neuroconv/datainterfaces/icephys/abf/abfdatainterface.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/icephys/abf/abfdatainterface.py rename to src/neuroconv/datainterfaces/icephys/abf/abfdatainterface.py diff --git a/src/nwb_conversion_tools/datainterfaces/icephys/baseicephysinterface.py b/src/neuroconv/datainterfaces/icephys/baseicephysinterface.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/icephys/baseicephysinterface.py rename to src/neuroconv/datainterfaces/icephys/baseicephysinterface.py diff --git a/src/nwb_conversion_tools/datainterfaces/ophys/__init__.py b/src/neuroconv/datainterfaces/ophys/__init__.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ophys/__init__.py rename to src/neuroconv/datainterfaces/ophys/__init__.py diff --git a/src/nwb_conversion_tools/datainterfaces/ophys/baseimagingextractorinterface.py b/src/neuroconv/datainterfaces/ophys/baseimagingextractorinterface.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ophys/baseimagingextractorinterface.py rename to src/neuroconv/datainterfaces/ophys/baseimagingextractorinterface.py diff --git a/src/nwb_conversion_tools/datainterfaces/ophys/basesegmentationextractorinterface.py b/src/neuroconv/datainterfaces/ophys/basesegmentationextractorinterface.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ophys/basesegmentationextractorinterface.py rename to src/neuroconv/datainterfaces/ophys/basesegmentationextractorinterface.py diff --git a/src/nwb_conversion_tools/datainterfaces/ophys/caiman/__init__.py b/src/neuroconv/datainterfaces/ophys/caiman/__init__.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ophys/caiman/__init__.py rename to src/neuroconv/datainterfaces/ophys/caiman/__init__.py diff --git a/src/nwb_conversion_tools/datainterfaces/ophys/caiman/caimandatainterface.py b/src/neuroconv/datainterfaces/ophys/caiman/caimandatainterface.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ophys/caiman/caimandatainterface.py rename to src/neuroconv/datainterfaces/ophys/caiman/caimandatainterface.py diff --git a/src/nwb_conversion_tools/datainterfaces/ophys/cnmfe/__init__.py b/src/neuroconv/datainterfaces/ophys/cnmfe/__init__.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ophys/cnmfe/__init__.py rename to src/neuroconv/datainterfaces/ophys/cnmfe/__init__.py diff --git a/src/nwb_conversion_tools/datainterfaces/ophys/cnmfe/cnmfedatainterface.py b/src/neuroconv/datainterfaces/ophys/cnmfe/cnmfedatainterface.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ophys/cnmfe/cnmfedatainterface.py rename to src/neuroconv/datainterfaces/ophys/cnmfe/cnmfedatainterface.py diff --git a/src/nwb_conversion_tools/datainterfaces/ophys/extract/__init__.py b/src/neuroconv/datainterfaces/ophys/extract/__init__.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ophys/extract/__init__.py rename to src/neuroconv/datainterfaces/ophys/extract/__init__.py diff --git a/src/nwb_conversion_tools/datainterfaces/ophys/extract/extractdatainterface.py b/src/neuroconv/datainterfaces/ophys/extract/extractdatainterface.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ophys/extract/extractdatainterface.py rename to src/neuroconv/datainterfaces/ophys/extract/extractdatainterface.py diff --git a/src/nwb_conversion_tools/datainterfaces/ophys/hdf5/__init__.py b/src/neuroconv/datainterfaces/ophys/hdf5/__init__.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ophys/hdf5/__init__.py rename to src/neuroconv/datainterfaces/ophys/hdf5/__init__.py diff --git a/src/nwb_conversion_tools/datainterfaces/ophys/hdf5/hdf5datainterface.py b/src/neuroconv/datainterfaces/ophys/hdf5/hdf5datainterface.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ophys/hdf5/hdf5datainterface.py rename to src/neuroconv/datainterfaces/ophys/hdf5/hdf5datainterface.py diff --git a/src/nwb_conversion_tools/datainterfaces/ophys/sbx/__init__.py b/src/neuroconv/datainterfaces/ophys/sbx/__init__.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ophys/sbx/__init__.py rename to src/neuroconv/datainterfaces/ophys/sbx/__init__.py diff --git a/src/nwb_conversion_tools/datainterfaces/ophys/sbx/sbxdatainterface.py b/src/neuroconv/datainterfaces/ophys/sbx/sbxdatainterface.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ophys/sbx/sbxdatainterface.py rename to src/neuroconv/datainterfaces/ophys/sbx/sbxdatainterface.py diff --git a/src/nwb_conversion_tools/datainterfaces/ophys/scanimage/__init__.py b/src/neuroconv/datainterfaces/ophys/scanimage/__init__.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ophys/scanimage/__init__.py rename to src/neuroconv/datainterfaces/ophys/scanimage/__init__.py diff --git a/src/nwb_conversion_tools/datainterfaces/ophys/scanimage/scanimageimaginginterface.py b/src/neuroconv/datainterfaces/ophys/scanimage/scanimageimaginginterface.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ophys/scanimage/scanimageimaginginterface.py rename to src/neuroconv/datainterfaces/ophys/scanimage/scanimageimaginginterface.py diff --git a/src/nwb_conversion_tools/datainterfaces/ophys/sima/__init__.py b/src/neuroconv/datainterfaces/ophys/sima/__init__.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ophys/sima/__init__.py rename to src/neuroconv/datainterfaces/ophys/sima/__init__.py diff --git a/src/nwb_conversion_tools/datainterfaces/ophys/sima/simadatainterface.py b/src/neuroconv/datainterfaces/ophys/sima/simadatainterface.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ophys/sima/simadatainterface.py rename to src/neuroconv/datainterfaces/ophys/sima/simadatainterface.py diff --git a/src/nwb_conversion_tools/datainterfaces/ophys/suite2p/__init__.py b/src/neuroconv/datainterfaces/ophys/suite2p/__init__.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ophys/suite2p/__init__.py rename to src/neuroconv/datainterfaces/ophys/suite2p/__init__.py diff --git a/src/nwb_conversion_tools/datainterfaces/ophys/suite2p/suite2pdatainterface.py b/src/neuroconv/datainterfaces/ophys/suite2p/suite2pdatainterface.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ophys/suite2p/suite2pdatainterface.py rename to src/neuroconv/datainterfaces/ophys/suite2p/suite2pdatainterface.py diff --git a/src/nwb_conversion_tools/datainterfaces/ophys/tiff/__init__.py b/src/neuroconv/datainterfaces/ophys/tiff/__init__.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ophys/tiff/__init__.py rename to src/neuroconv/datainterfaces/ophys/tiff/__init__.py diff --git a/src/nwb_conversion_tools/datainterfaces/ophys/tiff/tiffdatainterface.py b/src/neuroconv/datainterfaces/ophys/tiff/tiffdatainterface.py similarity index 100% rename from src/nwb_conversion_tools/datainterfaces/ophys/tiff/tiffdatainterface.py rename to src/neuroconv/datainterfaces/ophys/tiff/tiffdatainterface.py diff --git a/src/nwb_conversion_tools/nwbconverter.py b/src/neuroconv/nwbconverter.py similarity index 100% rename from src/nwb_conversion_tools/nwbconverter.py rename to src/neuroconv/nwbconverter.py diff --git a/src/nwb_conversion_tools/tools/__init__.py b/src/neuroconv/tools/__init__.py similarity index 100% rename from src/nwb_conversion_tools/tools/__init__.py rename to src/neuroconv/tools/__init__.py diff --git a/src/nwb_conversion_tools/tools/data_transfers.py b/src/neuroconv/tools/data_transfers.py similarity index 100% rename from src/nwb_conversion_tools/tools/data_transfers.py rename to src/neuroconv/tools/data_transfers.py diff --git a/src/nwb_conversion_tools/tools/figshare.py b/src/neuroconv/tools/figshare.py similarity index 100% rename from src/nwb_conversion_tools/tools/figshare.py rename to src/neuroconv/tools/figshare.py diff --git a/src/nwb_conversion_tools/tools/hdmf.py b/src/neuroconv/tools/hdmf.py similarity index 100% rename from src/nwb_conversion_tools/tools/hdmf.py rename to src/neuroconv/tools/hdmf.py diff --git a/src/nwb_conversion_tools/tools/neo/__init__.py b/src/neuroconv/tools/neo/__init__.py similarity index 100% rename from src/nwb_conversion_tools/tools/neo/__init__.py rename to src/neuroconv/tools/neo/__init__.py diff --git a/src/nwb_conversion_tools/tools/neo/neo.py b/src/neuroconv/tools/neo/neo.py similarity index 100% rename from src/nwb_conversion_tools/tools/neo/neo.py rename to src/neuroconv/tools/neo/neo.py diff --git a/src/nwb_conversion_tools/tools/nwb_helpers.py b/src/neuroconv/tools/nwb_helpers.py similarity index 100% rename from src/nwb_conversion_tools/tools/nwb_helpers.py rename to src/neuroconv/tools/nwb_helpers.py diff --git a/src/nwb_conversion_tools/tools/roiextractors/__init__.py b/src/neuroconv/tools/roiextractors/__init__.py similarity index 100% rename from src/nwb_conversion_tools/tools/roiextractors/__init__.py rename to src/neuroconv/tools/roiextractors/__init__.py diff --git a/src/nwb_conversion_tools/tools/roiextractors/roiextractors.py b/src/neuroconv/tools/roiextractors/roiextractors.py similarity index 99% rename from src/nwb_conversion_tools/tools/roiextractors/roiextractors.py rename to src/neuroconv/tools/roiextractors/roiextractors.py index cd253f057..be48037db 100644 --- a/src/nwb_conversion_tools/tools/roiextractors/roiextractors.py +++ b/src/neuroconv/tools/roiextractors/roiextractors.py @@ -25,7 +25,7 @@ from hdmf.backends.hdf5.h5_utils import H5DataIO from ..nwb_helpers import get_default_nwbfile_metadata, make_nwbfile_from_metadata, make_or_load_nwbfile -from nwb_conversion_tools.utils import ( +from ...utils import ( FilePathType, OptionalFilePathType, dict_deep_update, diff --git a/src/nwb_conversion_tools/tools/spikeinterface/__init__.py b/src/neuroconv/tools/spikeinterface/__init__.py similarity index 100% rename from src/nwb_conversion_tools/tools/spikeinterface/__init__.py rename to src/neuroconv/tools/spikeinterface/__init__.py diff --git a/src/nwb_conversion_tools/tools/spikeinterface/spikeinterface.py b/src/neuroconv/tools/spikeinterface/spikeinterface.py similarity index 100% rename from src/nwb_conversion_tools/tools/spikeinterface/spikeinterface.py rename to src/neuroconv/tools/spikeinterface/spikeinterface.py diff --git a/src/nwb_conversion_tools/tools/spikeinterface/spikeinterfacerecordingdatachunkiterator.py b/src/neuroconv/tools/spikeinterface/spikeinterfacerecordingdatachunkiterator.py similarity index 100% rename from src/nwb_conversion_tools/tools/spikeinterface/spikeinterfacerecordingdatachunkiterator.py rename to src/neuroconv/tools/spikeinterface/spikeinterfacerecordingdatachunkiterator.py diff --git a/src/nwb_conversion_tools/tools/yaml_conversion_specification/__init__.py b/src/neuroconv/tools/yaml_conversion_specification/__init__.py similarity index 100% rename from src/nwb_conversion_tools/tools/yaml_conversion_specification/__init__.py rename to src/neuroconv/tools/yaml_conversion_specification/__init__.py diff --git a/src/nwb_conversion_tools/tools/yaml_conversion_specification/yaml_conversion_specification.py b/src/neuroconv/tools/yaml_conversion_specification/yaml_conversion_specification.py similarity index 100% rename from src/nwb_conversion_tools/tools/yaml_conversion_specification/yaml_conversion_specification.py rename to src/neuroconv/tools/yaml_conversion_specification/yaml_conversion_specification.py diff --git a/src/nwb_conversion_tools/utils/__init__.py b/src/neuroconv/utils/__init__.py similarity index 100% rename from src/nwb_conversion_tools/utils/__init__.py rename to src/neuroconv/utils/__init__.py diff --git a/src/nwb_conversion_tools/utils/checks.py b/src/neuroconv/utils/checks.py similarity index 100% rename from src/nwb_conversion_tools/utils/checks.py rename to src/neuroconv/utils/checks.py diff --git a/src/nwb_conversion_tools/utils/dict.py b/src/neuroconv/utils/dict.py similarity index 100% rename from src/nwb_conversion_tools/utils/dict.py rename to src/neuroconv/utils/dict.py diff --git a/src/nwb_conversion_tools/utils/globbing.py b/src/neuroconv/utils/globbing.py similarity index 100% rename from src/nwb_conversion_tools/utils/globbing.py rename to src/neuroconv/utils/globbing.py diff --git a/src/nwb_conversion_tools/utils/json_schema.py b/src/neuroconv/utils/json_schema.py similarity index 100% rename from src/nwb_conversion_tools/utils/json_schema.py rename to src/neuroconv/utils/json_schema.py diff --git a/src/nwb_conversion_tools/utils/types.py b/src/neuroconv/utils/types.py similarity index 100% rename from src/nwb_conversion_tools/utils/types.py rename to src/neuroconv/utils/types.py diff --git a/src/nwb_conversion_tools/schemas/metadata_schema.json b/src/nwb_conversion_tools/schemas/metadata_schema.json deleted file mode 100644 index 1057901b2..000000000 --- a/src/nwb_conversion_tools/schemas/metadata_schema.json +++ /dev/null @@ -1,267 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "metafile.schema.json", - "title": "Schema for the metafile", - "description": "Schema for the metafile", - "version": "0.1.0", - "type": "object", - "required": ["NWBFile"], - "additionalProperties": false, - "properties": { - "NWBFile": { - "type": "object", - "additionalProperties": false, - "required": [], - "properties": { - "keywords": { - "description": "Terms to search over", - "type": "array", - "items": {"title": "keyword", "type": "string"} - }, - "experiment_description": {"type": "string", "description": "general description of the experiment"}, - "session_id": {"type": "string", "description": "lab-specific ID for the session"}, - "experimenter": { - "description": "Name of person/people who performed experiment", - "type": "array", - "items": {"type": "string", "title": "experimenter"} - }, - "identifier": {"type": "string", "description": "A unique text identifier for the file. If one is not provided it will be randomly assigned"}, - "institution": {"type": "string", "description": "Institution(s) where experiment is performed"}, - "lab": {"type": "string", "description": "Lab where experiment was performed"}, - "session_description": {"type": "string", "description": "A description of the session where this data was generated"}, - "session_start_time": {"type": "string", "format": "date-time", "description": "The start date and time of the recording session"}, - "surgery": {"type": "string", "description": "Narrative description about surgery/surgeries, including date(s) and who performed surgery."}, - "pharmacology": { - "type": "string", - "description": "Description of drugs used, including how and when they were administered. Anesthesia(s), painkiller(s), etc., plus dosage, concentration, etc." - }, - "protocol": { - "type": "string", - "description": "Experimental protocol, if applicable. E.g., include IACUC protocol" - }, - "related_publications": { - "type": "array", - "items": {"title": "related publication", "type": "string"} - }, - "notes": {"type": "string", "description": "Notes about the experiment."}, - "virus": {"type": "string", "description": "Narrative description about surgery/surgeries, including date(s) and who performed surgery."} - } - }, - "Subject": { - "type": "object", - "required": ["subject_id"], - "properties": { - "description": {"type": "string", "default": "no description", "description": "Description of subject and where subject came from (e.g., breeder, if animal)."}, - "genotype": {"type": "string", "description": "Genetic strain. If absent, assume Wild Type (WT)"}, - "sex": {"type": "string", "enum": ["M", "F", "U", "O"], "default": "U"}, - "species": {"type": "string", "description": "Species of subject. Use latin name."}, - "subject_id": {"type": "string", "description": "ID of animal/person used/participating in experiment (lab convention)"}, - "weight": {"type": "string", "description": "Weight at time of experiment, at time of surgery and at other important times."}, - "date_of_birth": {"type": "string", "format": "date-time", "description": "Date of birth of subject. Can be supplied instead of 'age'."} - } - }, - "Behavior": { - "type": "object", - "properties": { - "Position": { - "type": "object", - "properties": { - "name": {"type": "string", "default": "Position"}, - "spatial_series": { - "type": "array", - "items": { - "type": "object", - "title": "SpatialSeries", - "allOf": [ - {"$ref": "#/definitions/TimeSeries"} - ], - "properties": { - "reference_frame": {"type": "string"} - } - } - } - } - }, - "BehavioralEvents": { - "type": "object", - "properties": { - "name": {"type": "string", "default": "BehavioralEvents"}, - "time_series": { - "type": "array", - "items": { - "type": "object", - "title": "BehavioralTimeSeries", - "allOf": [ - {"$ref": "#/definitions/TimeSeries"} - ], - "properties": { - "unit": {"type": "string", "default": "m"} - } - } - } - } - } - } - }, - "Ecephys": { - "type": "object", - "properties": { - "Devices": {"$ref": "#/definitions/Devices"}, - "ElectricalSeries": { - "type": "array", - "items": { - "title": "Electrical Series", - "type": "object", - "required": ["name", "description"], - "properties": { - "name": {"type": "string", "default": "ElectricalSeries"}, - "description": {"type": "string"} - } - } - }, - "ElectrodeGroups": { - "type": "array", - "items": { - "title": "Electrode Group", - "type": "object", - "required": ["name", "description", "location", "device"], - "properties": { - "name": {"type": "string", "default": "ElectrodeGroup"}, - "description": {"type": "string"}, - "location": {"type": "string"}, - "device": {"type": "string"}, - "tag": {"type": "string"} - } - } - } - } - }, - "Ophys": { - "type": "object", - "required": ["Devices"], - "properties": { - "Devices": {"$ref": "#/definitions/Devices"}, - "DFOverF": { - "type": "object", - "required": ["name"], - "properties": { - "name": {"type": "string", "default": "DfOverF"}, - "roi_response_series": { - "type": "array", - "title": "ROI response series", - "items": {"$ref": "#/definitions/RoiResponseSeries"} - } - } - }, - "Fluorescence": { - "type": "object", - "required": ["name"], - "properties": { - "name": {"type": "string", "default": "Fluorescence"}, - "roi_response_series": { - "type": "array", - "title": "ROI response series", - "items": {"$ref": "#/definitions/RoiResponseSeries"} - } - } - }, - "ImageSegmentation": { - "type": "object", - "required": ["name", "plane_segmentation"], - "properties": { - "name": {"type": "string"}, - "PlaneSegmentations": { - "type": "array", - "items": { - "title": "PlaneSegmentation", - "type": "object", - "required": ["name", "description"], - "properties": { - "name": {"type": "string", "default": "PlaneSegmentation"}, - "description": {"type": "string", "default": "Segmented ROIs"}, - "imaging_plane": {"type": "string", "description": "name or tag of corresponding ImagingPlane"}, - "tag": {"type": "string", "description": "optional tag to be used to link to this PlaneSegmentation"} - } - } - } - } - }, - "ImagingPlanes": { - "type": "array", - "items": { - "title": "ImagingPlane", - "type": "object", - "required": ["name", "description"], - "properties": { - "name": {"type": "string", "default": "ImagingPlane"}, - "description": {"type": "string", "description": "An area in the brain where imaging was done"}, - "device": {"type": "string"}, - "excitation_lambda": {"type": "number"}, - "imaging_rate": {"type": "number"}, - "indicator": {"type": "string"}, - "location": {"type": "string"}, - "optical_channels": { - "type": "array", - "items": { - "title": "OpticalChannel", - "type": "object", - "properties": { - "name": {"type": "string", "default": "OpticalChannel"}, - "description": {"type": "string"}, - "emission_lambda": {"type": "number"}, - "tag": {"type": "string"} - } - } - } - } - } - }, - "TwoPhotonSeries": { - "type": "array", - "items": { - "title": "TwoPhotonSeries", - "type": "object", - "required": ["name", "description"], - "properties": { - "name": {"type": "string", "default": "TwoPhotonSeries"}, - "description": {"type": "string"}, - "imaging_plane": {"type": "string"} - } - } - } - } - } - }, - "definitions": { - "TimeSeries": { - "type": "object", - "required": ["name", "description"], - "properties": { - "name": {"type": "string"}, - "description": {"type": "string"}, - "conversion": {"type": "number", "default": 1.0}, - "tag": {"type": "string"} - } - }, - "Devices": { - "type": "array", - "items": { - "title": "Device", - "type": "object", - "required": ["name"], - "properties": { - "name": {"type": "string", "default": "Device"}, - "tag": {"type": "string"} - } - } - }, - "RoiResponseSeries": { - "title": "RoiResponseSeries", - "type": "object", - "allOf": [{"$ref": "#/definitions/TimeSeries"}], - "properties": { - "rois": {"type": "string", "description": "Name of a PlaneSegmentation"} - } - } - } -} diff --git a/src/nwb_conversion_tools/schemas/source_example.json b/src/nwb_conversion_tools/schemas/source_example.json deleted file mode 100644 index 7a9d00d89..000000000 --- a/src/nwb_conversion_tools/schemas/source_example.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "source_data": { - "raw_data": "path/to/file", - "processed_data": "path/to/dir", - "ref_image": "path/to/file" - }, - "conversion_options":{ - "add_raw": true, - "add_processed": true, - "add_behavior": true - } -} diff --git a/src/nwb_conversion_tools/schemas/source_schema.json b/src/nwb_conversion_tools/schemas/source_schema.json deleted file mode 100644 index 73b1a7f83..000000000 --- a/src/nwb_conversion_tools/schemas/source_schema.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "source.schema.json", - "title": "Source data and conversion options", - "description": "Schema for the source data and conversion options", - "version": "0.1.0", - "type": "object", - "additionalProperties": false, - "properties": { - - "source_data": { - "title": "Source Files", - "type": "object", - "required": [ - "raw_data", - "processed_data" - ], - "properties": { - "raw_data": { - "type": "string", - "format": "file", - "description": "path to raw data file" - }, - "processed_data": { - "type": "string", - "format": "directory", - "description": "path to directory containing processed data files" - }, - "ref_image": { - "type": "string", - "format": "file", - "description": "path to reference image file" - } - } - }, - - "conversion_options": { - "title": "Conversion Options", - "type": "object", - "properties": { - "add_raw": { - "type": "boolean", - "default": true - }, - "add_processed": { - "type": "boolean", - "default": true - }, - "add_behavior": { - "type": "boolean", - "default": true - } - } - } - } -} diff --git a/src/nwb_conversion_tools/schemas/yaml_conversion_specification_schema.json b/src/nwb_conversion_tools/schemas/yaml_conversion_specification_schema.json deleted file mode 100644 index 796aac19b..000000000 --- a/src/nwb_conversion_tools/schemas/yaml_conversion_specification_schema.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "yaml_conversion_specification_schema.json", - "title": "YAML conversion specification schema", - "description": "Schema for a NWB conversion specified by a YAML file.", - "version": "0.1.0", - "type": "object", - "allOf": [{"$ref": "#/$defs/level"}], - "required": ["experiments"], - "properties": { - "experiments": { - "type": "object", - "additionalProperties": { - "type": "object", - "allOf": [{"$ref": "#/$defs/level"}], - "required": ["sessions"], - "properties": { - "sessions": { - "type": "array", - "items": { - "title": "Single-session specification", - "type": "object", - "required": ["source_data"], - "allOf": [{"$ref": "#/$defs/level"}], - "properties": { - "nwbfile_name": {"type": "string"}, - "source_data": {"type": "object"} - } - } - } - } - } - } - }, - "$defs": { - "level": { - "type": "object", - "properties": { - "metadata": {"$ref": "./metadata_schema.json#"}, - "conversion_options": {"type": "object"}, - "data_interfaces": { - "type": "array", - "items": { - "title": "DataInterface", - "type": "string" - } - } - } - } - } -} diff --git a/tests/test_internals/test_converter.py b/tests/test_internals/test_converter.py index dc5593419..d607bd2f0 100644 --- a/tests/test_internals/test_converter.py +++ b/tests/test_internals/test_converter.py @@ -5,14 +5,15 @@ from pynwb import NWBFile +from neuroconv import NWBConverter +from neuroconv.basedatainterface import BaseDataInterface + try: from ndx_events import LabeledEvents HAVE_NDX_EVENTS = True except ImportError: HAVE_NDX_EVENTS = False -from nwb_conversion_tools import NWBConverter -from nwb_conversion_tools.basedatainterface import BaseDataInterface def test_converter(): diff --git a/tests/test_internals/test_globbing_utils.py b/tests/test_internals/test_globbing_utils.py index c9f466d49..9c306203d 100644 --- a/tests/test_internals/test_globbing_utils.py +++ b/tests/test_internals/test_globbing_utils.py @@ -1,6 +1,6 @@ from hdmf.testing import TestCase -from nwb_conversion_tools.utils import decompose_f_string, parse_f_string +from neuroconv.utils import decompose_f_string, parse_f_string class TestGlobbingAssertions(TestCase): diff --git a/tests/test_internals/test_hdmf.py b/tests/test_internals/test_hdmf.py index 11d579ce0..14894664d 100644 --- a/tests/test_internals/test_hdmf.py +++ b/tests/test_internals/test_hdmf.py @@ -1,7 +1,7 @@ import numpy as np from hdmf.testing import TestCase -from nwb_conversion_tools.tools.hdmf import SliceableDataChunkIterator +from neuroconv.tools.hdmf import SliceableDataChunkIterator class TestIteratorAssertions(TestCase): diff --git a/tests/test_internals/test_interfaces.py b/tests/test_internals/test_interfaces.py index baa74fe7c..4f488ddc0 100644 --- a/tests/test_internals/test_interfaces.py +++ b/tests/test_internals/test_interfaces.py @@ -5,13 +5,15 @@ from tempfile import mkdtemp from pathlib import Path from datetime import datetime + import numpy as np import pytest import spikeextractors as se from spikeextractors.testing import check_recordings_equal, check_sortings_equal from hdmf.testing import TestCase from pynwb import NWBHDF5IO -from nwb_conversion_tools import ( + +from neuroconv import ( NWBConverter, RecordingTutorialInterface, SortingTutorialInterface, @@ -19,7 +21,7 @@ SIPickleSortingExtractorInterface, CEDRecordingInterface, ) -from nwb_conversion_tools.datainterfaces.ecephys.basesortingextractorinterface import BaseSortingExtractorInterface +from neuroconv.datainterfaces.ecephys.basesortingextractorinterface import BaseSortingExtractorInterface class TestAssertions(TestCase): diff --git a/tests/test_internals/test_json_schema_utils.py b/tests/test_internals/test_json_schema_utils.py index 86f801553..cdbe46ee2 100644 --- a/tests/test_internals/test_json_schema_utils.py +++ b/tests/test_internals/test_json_schema_utils.py @@ -4,7 +4,7 @@ from typing import Union from copy import deepcopy -from nwb_conversion_tools.utils import ( +from neuroconv.utils import ( get_schema_from_method_signature, dict_deep_update, fill_defaults, diff --git a/tests/test_internals/test_movie_interface.py b/tests/test_internals/test_movie_interface.py index 115d96554..3777c9c01 100644 --- a/tests/test_internals/test_movie_interface.py +++ b/tests/test_internals/test_movie_interface.py @@ -8,7 +8,7 @@ import numpy as np from pynwb import NWBHDF5IO -from nwb_conversion_tools import NWBConverter, MovieInterface +from neuroconv import NWBConverter, MovieInterface try: import cv2 diff --git a/tests/test_internals/test_movie_utils.py b/tests/test_internals/test_movie_utils.py index 40802b20c..777527b57 100644 --- a/tests/test_internals/test_movie_utils.py +++ b/tests/test_internals/test_movie_utils.py @@ -9,8 +9,8 @@ from datetime import datetime from hdmf.backends.hdf5.h5_utils import H5DataIO -from nwb_conversion_tools.datainterfaces.behavior.movie.movie_utils import VideoCaptureContext, MovieDataChunkIterator -from nwb_conversion_tools.tools.nwb_helpers import make_nwbfile_from_metadata +from neuroconv.datainterfaces.behavior.movie.movie_utils import VideoCaptureContext, MovieDataChunkIterator +from neuroconv.tools.nwb_helpers import make_nwbfile_from_metadata try: import cv2 diff --git a/tests/test_internals/test_roi_extractors_module.py b/tests/test_internals/test_roi_extractors_module.py index 83b8da3a9..4a25c56ec 100644 --- a/tests/test_internals/test_roi_extractors_module.py +++ b/tests/test_internals/test_roi_extractors_module.py @@ -9,7 +9,7 @@ from pynwb.device import Device from roiextractors.testing import generate_dummy_imaging_extractor -from nwb_conversion_tools.tools.roiextractors import add_devices, add_two_photon_series +from neuroconv.tools.roiextractors import add_devices, add_two_photon_series class TestAddDevices(unittest.TestCase): diff --git a/tests/test_internals/test_schemas.py b/tests/test_internals/test_schemas.py index 00e97a342..467e22948 100644 --- a/tests/test_internals/test_schemas.py +++ b/tests/test_internals/test_schemas.py @@ -3,8 +3,8 @@ import pytest -from nwb_conversion_tools import interface_list -from nwb_conversion_tools.utils import load_dict_from_file +from neuroconv import interface_list +from neuroconv.utils import load_dict_from_file @pytest.mark.parametrize("data_interface", interface_list) @@ -23,7 +23,7 @@ def test_yaml_specification_schema(): schema = load_dict_from_file( file_path=Path(__file__).parent.parent.parent / "src" - / "nwb_conversion_tools" + / "neuroconv" / "schemas" / "yaml_conversion_specification_schema.json" ) diff --git a/tests/test_internals/test_si.py b/tests/test_internals/test_si.py index e7fe0b143..876a62f90 100644 --- a/tests/test_internals/test_si.py +++ b/tests/test_internals/test_si.py @@ -2,7 +2,6 @@ import tempfile import unittest from pathlib import Path -from collections import defaultdict from datetime import datetime import numpy as np @@ -20,19 +19,19 @@ get_default_nwbfile_metadata, ) -from nwb_conversion_tools import spikeinterface # testing aliased import -from nwb_conversion_tools.tools.spikeinterface import ( +from neuroconv import spikeinterface # testing aliased import +from neuroconv.tools.spikeinterface import ( get_nwb_metadata, write_recording, write_sorting, add_electrodes, add_units_table, ) -from nwb_conversion_tools.tools.spikeinterface.spikeinterfacerecordingdatachunkiterator import ( +from neuroconv.tools.spikeinterface.spikeinterfacerecordingdatachunkiterator import ( SpikeInterfaceRecordingDataChunkIterator, ) -from nwb_conversion_tools.utils import FilePathType -from nwb_conversion_tools.tools.nwb_helpers import get_module +from neuroconv.utils import FilePathType +from neuroconv.tools.nwb_helpers import get_module testing_session_time = datetime.now().astimezone() diff --git a/tests/test_internals/test_tools.py b/tests/test_internals/test_tools.py index 72387eb7c..ce26153bc 100644 --- a/tests/test_internals/test_tools.py +++ b/tests/test_internals/test_tools.py @@ -9,13 +9,13 @@ from pynwb import NWBHDF5IO, ProcessingModule, TimeSeries from hdmf.testing import TestCase -from nwb_conversion_tools.tools.nwb_helpers import ( +from neuroconv.tools.nwb_helpers import ( get_module, make_nwbfile_from_metadata, get_default_nwbfile_metadata, make_or_load_nwbfile, ) -from nwb_conversion_tools.tools.data_transfers import ( +from neuroconv.tools.data_transfers import ( get_globus_dataset_content_sizes, estimate_s3_conversion_cost, estimate_total_conversion_runtime, diff --git a/tests/test_internals/test_tools/test_hdmf.py b/tests/test_internals/test_tools/test_hdmf.py index 99c7b1c30..b82220313 100644 --- a/tests/test_internals/test_tools/test_hdmf.py +++ b/tests/test_internals/test_tools/test_hdmf.py @@ -1,7 +1,7 @@ import numpy as np from numpy.testing import assert_array_equal -from nwb_conversion_tools.tools.hdmf import SliceableDataChunkIterator +from neuroconv.tools.hdmf import SliceableDataChunkIterator def test_sliceable_data_chunk_iterator(): diff --git a/tests/test_internals/test_utils.py b/tests/test_internals/test_utils.py index 49e9ecbde..5f6b48100 100644 --- a/tests/test_internals/test_utils.py +++ b/tests/test_internals/test_utils.py @@ -1,4 +1,4 @@ -from nwb_conversion_tools.utils import calculate_regular_series_rate +from neuroconv.utils import calculate_regular_series_rate def test_check_regular_series(): diff --git a/tests/test_on_data/setup_paths.py b/tests/test_on_data/setup_paths.py index 2830dbbd8..433179fbb 100644 --- a/tests/test_on_data/setup_paths.py +++ b/tests/test_on_data/setup_paths.py @@ -4,7 +4,7 @@ import pytest -from nwb_conversion_tools.utils import load_dict_from_file +from neuroconv.utils import load_dict_from_file # Load the configuration for the data tests diff --git a/tests/test_on_data/test_gin_behavior.py b/tests/test_on_data/test_gin_behavior.py index 0fdf2c026..acdd65873 100644 --- a/tests/test_on_data/test_gin_behavior.py +++ b/tests/test_on_data/test_gin_behavior.py @@ -1,10 +1,8 @@ import unittest -import os from datetime import datetime -import numpy as np from pynwb import NWBHDF5IO -from nwb_conversion_tools import NWBConverter, MovieInterface +from neuroconv import NWBConverter, MovieInterface from .setup_paths import OUTPUT_PATH, BEHAVIOR_DATA_PATH diff --git a/tests/test_on_data/test_gin_ecephys.py b/tests/test_on_data/test_gin_ecephys.py index 2af73e413..9840f5837 100644 --- a/tests/test_on_data/test_gin_ecephys.py +++ b/tests/test_on_data/test_gin_ecephys.py @@ -18,7 +18,7 @@ from pynwb import NWBHDF5IO -from nwb_conversion_tools import ( +from neuroconv import ( NWBConverter, CellExplorerSortingInterface, CEDRecordingInterface, diff --git a/tests/test_on_data/test_gin_icephys.py b/tests/test_on_data/test_gin_icephys.py index ad5b8302a..8d9ca8bfc 100644 --- a/tests/test_on_data/test_gin_icephys.py +++ b/tests/test_on_data/test_gin_icephys.py @@ -4,13 +4,13 @@ from pathlib import Path from datetime import datetime +import neo import pytest import numpy.testing as npt from pynwb import NWBHDF5IO -from nwb_conversion_tools import NWBConverter, AbfInterface -from nwb_conversion_tools import neo -from nwb_conversion_tools.utils import load_dict_from_file +from neuroconv import NWBConverter, AbfInterface +from neuroconv.utils import load_dict_from_file try: from parameterized import parameterized, param diff --git a/tests/test_on_data/test_gin_ophys.py b/tests/test_on_data/test_gin_ophys.py index 2a0a6fecc..1200a9230 100644 --- a/tests/test_on_data/test_gin_ophys.py +++ b/tests/test_on_data/test_gin_ophys.py @@ -5,7 +5,7 @@ from roiextractors import NwbImagingExtractor, NwbSegmentationExtractor from roiextractors.testing import check_imaging_equal, check_segmentations_equal -from nwb_conversion_tools import ( +from neuroconv import ( NWBConverter, ScanImageImagingInterface, TiffImagingInterface, diff --git a/tests/test_on_data/test_metadata/test_neuralynx_metadata.py b/tests/test_on_data/test_metadata/test_neuralynx_metadata.py index 7010d9309..3c3ca52c2 100644 --- a/tests/test_on_data/test_metadata/test_neuralynx_metadata.py +++ b/tests/test_on_data/test_metadata/test_neuralynx_metadata.py @@ -1,7 +1,7 @@ from pathlib import Path import datetime -from nwb_conversion_tools.datainterfaces.ecephys.neuralynx.neuralynxdatainterface import ( +from neuroconv.datainterfaces.ecephys.neuralynx.neuralynxdatainterface import ( get_metadata, get_filtering, NeuralynxRecordingInterface, diff --git a/tests/test_on_data/test_metadata/test_neuroscope_metadata.py b/tests/test_on_data/test_metadata/test_neuroscope_metadata.py index 08f40d9f4..640d95efd 100644 --- a/tests/test_on_data/test_metadata/test_neuroscope_metadata.py +++ b/tests/test_on_data/test_metadata/test_neuroscope_metadata.py @@ -1,7 +1,7 @@ import datetime -from nwb_conversion_tools.datainterfaces.ecephys.neuroscope.neuroscope_utils import get_session_start_time -from nwb_conversion_tools.datainterfaces.ecephys.neuroscope.neuroscopedatainterface import NeuroscopeSortingInterface +from neuroconv.datainterfaces.ecephys.neuroscope.neuroscope_utils import get_session_start_time +from neuroconv.datainterfaces.ecephys.neuroscope.neuroscopedatainterface import NeuroscopeSortingInterface from ..setup_paths import ECEPHY_DATA_PATH diff --git a/tests/test_on_data/test_metadata/test_scanimage_metadata.py b/tests/test_on_data/test_metadata/test_scanimage_metadata.py index 8e11c8bc2..fadc396e8 100644 --- a/tests/test_on_data/test_metadata/test_scanimage_metadata.py +++ b/tests/test_on_data/test_metadata/test_scanimage_metadata.py @@ -1,7 +1,7 @@ from datetime import datetime -from nwb_conversion_tools.datainterfaces.ophys.scanimage.scanimageimaginginterface import ScanImageImagingInterface +from neuroconv.datainterfaces.ophys.scanimage.scanimageimaginginterface import ScanImageImagingInterface from ..setup_paths import OPHYS_DATA_PATH diff --git a/tests/test_on_data/test_metadata/test_spikeglx_metadata.py b/tests/test_on_data/test_metadata/test_spikeglx_metadata.py index 2e864e325..17a6647e4 100644 --- a/tests/test_on_data/test_metadata/test_spikeglx_metadata.py +++ b/tests/test_on_data/test_metadata/test_spikeglx_metadata.py @@ -5,8 +5,8 @@ import probeinterface as pi from spikeinterface.extractors import SpikeGLXRecordingExtractor -from nwb_conversion_tools.datainterfaces.ecephys.spikeglx.spikeglx_utils import get_session_start_time -from nwb_conversion_tools import SpikeGLXLFPInterface, SpikeGLXRecordingInterface +from neuroconv.datainterfaces.ecephys.spikeglx.spikeglx_utils import get_session_start_time +from neuroconv import SpikeGLXLFPInterface, SpikeGLXRecordingInterface from ..setup_paths import ECEPHY_DATA_PATH diff --git a/tests/test_on_data/test_metadata_combinations.py b/tests/test_on_data/test_metadata_combinations.py index d929ac6e4..e3a93b380 100644 --- a/tests/test_on_data/test_metadata_combinations.py +++ b/tests/test_on_data/test_metadata_combinations.py @@ -3,8 +3,8 @@ from parameterized import parameterized, param -from nwb_conversion_tools import Suite2pSegmentationInterface, TiffImagingInterface -from nwb_conversion_tools import NWBConverter +from neuroconv import Suite2pSegmentationInterface, TiffImagingInterface +from neuroconv import NWBConverter from .setup_paths import OPHYS_DATA_PATH diff --git a/tests/test_on_data/test_yaml_conversion_specification.py b/tests/test_on_data/test_yaml_conversion_specification.py index 240c91c1a..05d4f0e06 100644 --- a/tests/test_on_data/test_yaml_conversion_specification.py +++ b/tests/test_on_data/test_yaml_conversion_specification.py @@ -7,8 +7,8 @@ from hdmf.testing import TestCase from pynwb import NWBHDF5IO -from nwb_conversion_tools import run_conversion_from_yaml -from nwb_conversion_tools.utils import load_dict_from_file +from neuroconv import run_conversion_from_yaml +from neuroconv.utils import load_dict_from_file from .setup_paths import ECEPHY_DATA_PATH as DATA_PATH from .setup_paths import OUTPUT_PATH diff --git a/tests/test_on_data/test_yaml_conversion_specification_cli.py b/tests/test_on_data/test_yaml_conversion_specification_cli.py index 7deddc77e..fa07f7fef 100644 --- a/tests/test_on_data/test_yaml_conversion_specification_cli.py +++ b/tests/test_on_data/test_yaml_conversion_specification_cli.py @@ -5,7 +5,7 @@ from hdmf.testing import TestCase from pynwb import NWBHDF5IO -from nwb_conversion_tools.tools.data_transfers import deploy_process +from neuroconv.tools.data_transfers import deploy_process from .setup_paths import ECEPHY_DATA_PATH as DATA_PATH from .setup_paths import OUTPUT_PATH From 10b59491ebaadad3cac0236808d002b8be689516 Mon Sep 17 00:00:00 2001 From: Cody Baker <51133164+CodyCBakerPhD@users.noreply.github.com> Date: Thu, 21 Jul 2022 08:51:33 -0400 Subject: [PATCH 04/11] Create schemas --- src/neuroconv/schemas | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/neuroconv/schemas diff --git a/src/neuroconv/schemas b/src/neuroconv/schemas new file mode 100644 index 000000000..789819226 --- /dev/null +++ b/src/neuroconv/schemas @@ -0,0 +1 @@ +a From 868f376b83394bbc081ed263aaaf2d2993e83afd Mon Sep 17 00:00:00 2001 From: Cody Baker <51133164+CodyCBakerPhD@users.noreply.github.com> Date: Thu, 21 Jul 2022 08:53:02 -0400 Subject: [PATCH 05/11] Delete schemas --- src/neuroconv/schemas | 1 - 1 file changed, 1 deletion(-) delete mode 100644 src/neuroconv/schemas diff --git a/src/neuroconv/schemas b/src/neuroconv/schemas deleted file mode 100644 index 789819226..000000000 --- a/src/neuroconv/schemas +++ /dev/null @@ -1 +0,0 @@ -a From e92e01c7f5519b9bc68a6ac8cf23bd6b4d4f487f Mon Sep 17 00:00:00 2001 From: Cody Baker <51133164+CodyCBakerPhD@users.noreply.github.com> Date: Thu, 21 Jul 2022 08:53:17 -0400 Subject: [PATCH 06/11] Create metadata_schema.json --- src/neuroconv/schemas/metadata_schema.json | 267 +++++++++++++++++++++ 1 file changed, 267 insertions(+) create mode 100644 src/neuroconv/schemas/metadata_schema.json diff --git a/src/neuroconv/schemas/metadata_schema.json b/src/neuroconv/schemas/metadata_schema.json new file mode 100644 index 000000000..1057901b2 --- /dev/null +++ b/src/neuroconv/schemas/metadata_schema.json @@ -0,0 +1,267 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "metafile.schema.json", + "title": "Schema for the metafile", + "description": "Schema for the metafile", + "version": "0.1.0", + "type": "object", + "required": ["NWBFile"], + "additionalProperties": false, + "properties": { + "NWBFile": { + "type": "object", + "additionalProperties": false, + "required": [], + "properties": { + "keywords": { + "description": "Terms to search over", + "type": "array", + "items": {"title": "keyword", "type": "string"} + }, + "experiment_description": {"type": "string", "description": "general description of the experiment"}, + "session_id": {"type": "string", "description": "lab-specific ID for the session"}, + "experimenter": { + "description": "Name of person/people who performed experiment", + "type": "array", + "items": {"type": "string", "title": "experimenter"} + }, + "identifier": {"type": "string", "description": "A unique text identifier for the file. If one is not provided it will be randomly assigned"}, + "institution": {"type": "string", "description": "Institution(s) where experiment is performed"}, + "lab": {"type": "string", "description": "Lab where experiment was performed"}, + "session_description": {"type": "string", "description": "A description of the session where this data was generated"}, + "session_start_time": {"type": "string", "format": "date-time", "description": "The start date and time of the recording session"}, + "surgery": {"type": "string", "description": "Narrative description about surgery/surgeries, including date(s) and who performed surgery."}, + "pharmacology": { + "type": "string", + "description": "Description of drugs used, including how and when they were administered. Anesthesia(s), painkiller(s), etc., plus dosage, concentration, etc." + }, + "protocol": { + "type": "string", + "description": "Experimental protocol, if applicable. E.g., include IACUC protocol" + }, + "related_publications": { + "type": "array", + "items": {"title": "related publication", "type": "string"} + }, + "notes": {"type": "string", "description": "Notes about the experiment."}, + "virus": {"type": "string", "description": "Narrative description about surgery/surgeries, including date(s) and who performed surgery."} + } + }, + "Subject": { + "type": "object", + "required": ["subject_id"], + "properties": { + "description": {"type": "string", "default": "no description", "description": "Description of subject and where subject came from (e.g., breeder, if animal)."}, + "genotype": {"type": "string", "description": "Genetic strain. If absent, assume Wild Type (WT)"}, + "sex": {"type": "string", "enum": ["M", "F", "U", "O"], "default": "U"}, + "species": {"type": "string", "description": "Species of subject. Use latin name."}, + "subject_id": {"type": "string", "description": "ID of animal/person used/participating in experiment (lab convention)"}, + "weight": {"type": "string", "description": "Weight at time of experiment, at time of surgery and at other important times."}, + "date_of_birth": {"type": "string", "format": "date-time", "description": "Date of birth of subject. Can be supplied instead of 'age'."} + } + }, + "Behavior": { + "type": "object", + "properties": { + "Position": { + "type": "object", + "properties": { + "name": {"type": "string", "default": "Position"}, + "spatial_series": { + "type": "array", + "items": { + "type": "object", + "title": "SpatialSeries", + "allOf": [ + {"$ref": "#/definitions/TimeSeries"} + ], + "properties": { + "reference_frame": {"type": "string"} + } + } + } + } + }, + "BehavioralEvents": { + "type": "object", + "properties": { + "name": {"type": "string", "default": "BehavioralEvents"}, + "time_series": { + "type": "array", + "items": { + "type": "object", + "title": "BehavioralTimeSeries", + "allOf": [ + {"$ref": "#/definitions/TimeSeries"} + ], + "properties": { + "unit": {"type": "string", "default": "m"} + } + } + } + } + } + } + }, + "Ecephys": { + "type": "object", + "properties": { + "Devices": {"$ref": "#/definitions/Devices"}, + "ElectricalSeries": { + "type": "array", + "items": { + "title": "Electrical Series", + "type": "object", + "required": ["name", "description"], + "properties": { + "name": {"type": "string", "default": "ElectricalSeries"}, + "description": {"type": "string"} + } + } + }, + "ElectrodeGroups": { + "type": "array", + "items": { + "title": "Electrode Group", + "type": "object", + "required": ["name", "description", "location", "device"], + "properties": { + "name": {"type": "string", "default": "ElectrodeGroup"}, + "description": {"type": "string"}, + "location": {"type": "string"}, + "device": {"type": "string"}, + "tag": {"type": "string"} + } + } + } + } + }, + "Ophys": { + "type": "object", + "required": ["Devices"], + "properties": { + "Devices": {"$ref": "#/definitions/Devices"}, + "DFOverF": { + "type": "object", + "required": ["name"], + "properties": { + "name": {"type": "string", "default": "DfOverF"}, + "roi_response_series": { + "type": "array", + "title": "ROI response series", + "items": {"$ref": "#/definitions/RoiResponseSeries"} + } + } + }, + "Fluorescence": { + "type": "object", + "required": ["name"], + "properties": { + "name": {"type": "string", "default": "Fluorescence"}, + "roi_response_series": { + "type": "array", + "title": "ROI response series", + "items": {"$ref": "#/definitions/RoiResponseSeries"} + } + } + }, + "ImageSegmentation": { + "type": "object", + "required": ["name", "plane_segmentation"], + "properties": { + "name": {"type": "string"}, + "PlaneSegmentations": { + "type": "array", + "items": { + "title": "PlaneSegmentation", + "type": "object", + "required": ["name", "description"], + "properties": { + "name": {"type": "string", "default": "PlaneSegmentation"}, + "description": {"type": "string", "default": "Segmented ROIs"}, + "imaging_plane": {"type": "string", "description": "name or tag of corresponding ImagingPlane"}, + "tag": {"type": "string", "description": "optional tag to be used to link to this PlaneSegmentation"} + } + } + } + } + }, + "ImagingPlanes": { + "type": "array", + "items": { + "title": "ImagingPlane", + "type": "object", + "required": ["name", "description"], + "properties": { + "name": {"type": "string", "default": "ImagingPlane"}, + "description": {"type": "string", "description": "An area in the brain where imaging was done"}, + "device": {"type": "string"}, + "excitation_lambda": {"type": "number"}, + "imaging_rate": {"type": "number"}, + "indicator": {"type": "string"}, + "location": {"type": "string"}, + "optical_channels": { + "type": "array", + "items": { + "title": "OpticalChannel", + "type": "object", + "properties": { + "name": {"type": "string", "default": "OpticalChannel"}, + "description": {"type": "string"}, + "emission_lambda": {"type": "number"}, + "tag": {"type": "string"} + } + } + } + } + } + }, + "TwoPhotonSeries": { + "type": "array", + "items": { + "title": "TwoPhotonSeries", + "type": "object", + "required": ["name", "description"], + "properties": { + "name": {"type": "string", "default": "TwoPhotonSeries"}, + "description": {"type": "string"}, + "imaging_plane": {"type": "string"} + } + } + } + } + } + }, + "definitions": { + "TimeSeries": { + "type": "object", + "required": ["name", "description"], + "properties": { + "name": {"type": "string"}, + "description": {"type": "string"}, + "conversion": {"type": "number", "default": 1.0}, + "tag": {"type": "string"} + } + }, + "Devices": { + "type": "array", + "items": { + "title": "Device", + "type": "object", + "required": ["name"], + "properties": { + "name": {"type": "string", "default": "Device"}, + "tag": {"type": "string"} + } + } + }, + "RoiResponseSeries": { + "title": "RoiResponseSeries", + "type": "object", + "allOf": [{"$ref": "#/definitions/TimeSeries"}], + "properties": { + "rois": {"type": "string", "description": "Name of a PlaneSegmentation"} + } + } + } +} From 419c7ca86c5e007cfda4965149ce4eb030e2e953 Mon Sep 17 00:00:00 2001 From: Cody Baker <51133164+CodyCBakerPhD@users.noreply.github.com> Date: Thu, 21 Jul 2022 08:54:02 -0400 Subject: [PATCH 07/11] Create source_schema.json --- src/neuroconv/schemas/source_schema.json | 56 ++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 src/neuroconv/schemas/source_schema.json diff --git a/src/neuroconv/schemas/source_schema.json b/src/neuroconv/schemas/source_schema.json new file mode 100644 index 000000000..73b1a7f83 --- /dev/null +++ b/src/neuroconv/schemas/source_schema.json @@ -0,0 +1,56 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "source.schema.json", + "title": "Source data and conversion options", + "description": "Schema for the source data and conversion options", + "version": "0.1.0", + "type": "object", + "additionalProperties": false, + "properties": { + + "source_data": { + "title": "Source Files", + "type": "object", + "required": [ + "raw_data", + "processed_data" + ], + "properties": { + "raw_data": { + "type": "string", + "format": "file", + "description": "path to raw data file" + }, + "processed_data": { + "type": "string", + "format": "directory", + "description": "path to directory containing processed data files" + }, + "ref_image": { + "type": "string", + "format": "file", + "description": "path to reference image file" + } + } + }, + + "conversion_options": { + "title": "Conversion Options", + "type": "object", + "properties": { + "add_raw": { + "type": "boolean", + "default": true + }, + "add_processed": { + "type": "boolean", + "default": true + }, + "add_behavior": { + "type": "boolean", + "default": true + } + } + } + } +} From 68a41a5a8f96885b482904d2e35e7df93801d8a6 Mon Sep 17 00:00:00 2001 From: Cody Baker <51133164+CodyCBakerPhD@users.noreply.github.com> Date: Thu, 21 Jul 2022 08:54:22 -0400 Subject: [PATCH 08/11] Create yaml_conversion_specification_schema.json --- .../yaml_conversion_specification_schema.json | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 src/neuroconv/schemas/yaml_conversion_specification_schema.json diff --git a/src/neuroconv/schemas/yaml_conversion_specification_schema.json b/src/neuroconv/schemas/yaml_conversion_specification_schema.json new file mode 100644 index 000000000..796aac19b --- /dev/null +++ b/src/neuroconv/schemas/yaml_conversion_specification_schema.json @@ -0,0 +1,51 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "yaml_conversion_specification_schema.json", + "title": "YAML conversion specification schema", + "description": "Schema for a NWB conversion specified by a YAML file.", + "version": "0.1.0", + "type": "object", + "allOf": [{"$ref": "#/$defs/level"}], + "required": ["experiments"], + "properties": { + "experiments": { + "type": "object", + "additionalProperties": { + "type": "object", + "allOf": [{"$ref": "#/$defs/level"}], + "required": ["sessions"], + "properties": { + "sessions": { + "type": "array", + "items": { + "title": "Single-session specification", + "type": "object", + "required": ["source_data"], + "allOf": [{"$ref": "#/$defs/level"}], + "properties": { + "nwbfile_name": {"type": "string"}, + "source_data": {"type": "object"} + } + } + } + } + } + } + }, + "$defs": { + "level": { + "type": "object", + "properties": { + "metadata": {"$ref": "./metadata_schema.json#"}, + "conversion_options": {"type": "object"}, + "data_interfaces": { + "type": "array", + "items": { + "title": "DataInterface", + "type": "string" + } + } + } + } + } +} From d09aee6b287e5e9d86ee1b9064406cd4a651f234 Mon Sep 17 00:00:00 2001 From: CodyCBakerPhD Date: Thu, 21 Jul 2022 13:11:45 +0000 Subject: [PATCH 09/11] debug full --- .../yaml_conversion_specification.py | 2 +- tests/test_on_data/test_gin_icephys.py | 6 +++--- tests/test_on_data/test_yaml_conversion_specification.py | 2 +- .../test_on_data/test_yaml_conversion_specification_cli.py | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/neuroconv/tools/yaml_conversion_specification/yaml_conversion_specification.py b/src/neuroconv/tools/yaml_conversion_specification/yaml_conversion_specification.py index f7fef36d8..3b1665aab 100644 --- a/src/neuroconv/tools/yaml_conversion_specification/yaml_conversion_specification.py +++ b/src/neuroconv/tools/yaml_conversion_specification/yaml_conversion_specification.py @@ -112,7 +112,7 @@ def run_conversion_from_yaml( global_data_interfaces = specification.get("data_interfaces") nwb_conversion_tools = import_module( name=".", - package="nwb_conversion_tools", # relative import, but named and referenced as if it were absolute + package="neuroconv", # relative import, but named and referenced as if it were absolute ) file_counter = 0 for experiment in specification["experiments"].values(): diff --git a/tests/test_on_data/test_gin_icephys.py b/tests/test_on_data/test_gin_icephys.py index 8d9ca8bfc..844424975 100644 --- a/tests/test_on_data/test_gin_icephys.py +++ b/tests/test_on_data/test_gin_icephys.py @@ -4,13 +4,13 @@ from pathlib import Path from datetime import datetime -import neo import pytest import numpy.testing as npt from pynwb import NWBHDF5IO from neuroconv import NWBConverter, AbfInterface from neuroconv.utils import load_dict_from_file +from neuroconv.tools.neo import get_number_of_segments, get_number_of_electrodes try: from parameterized import parameterized, param @@ -67,8 +67,8 @@ def test_convert_abf_to_nwb(self, data_interface, interface_kwargs): from neo import AxonIO neo_reader = AxonIO(filename=interface_kwargs["file_paths"][0]) - n_segments = neo.get_number_of_segments(neo_reader, block=0) - n_electrodes = neo.get_number_of_electrodes(neo_reader) + n_segments = get_number_of_segments(neo_reader, block=0) + n_electrodes = get_number_of_electrodes(neo_reader) nwbfile_path = str(self.savedir / f"{data_interface.__name__}.nwb") diff --git a/tests/test_on_data/test_yaml_conversion_specification.py b/tests/test_on_data/test_yaml_conversion_specification.py index 05d4f0e06..93a37470a 100644 --- a/tests/test_on_data/test_yaml_conversion_specification.py +++ b/tests/test_on_data/test_yaml_conversion_specification.py @@ -20,7 +20,7 @@ class TestYAMLConversionSpecification(TestCase): def test_validate_example_specification(self): path_to_test_yml_files = Path(__file__).parent / "conversion_specifications" yaml_file_path = path_to_test_yml_files / "GIN_conversion_specification.yml" - schema_folder = path_to_test_yml_files.parent.parent.parent / "src" / "nwb_conversion_tools" / "schemas" + schema_folder = path_to_test_yml_files.parent.parent.parent / "src" / "neuroconv" / "schemas" specification_schema = load_dict_from_file( file_path=schema_folder / "yaml_conversion_specification_schema.json" ) diff --git a/tests/test_on_data/test_yaml_conversion_specification_cli.py b/tests/test_on_data/test_yaml_conversion_specification_cli.py index fa07f7fef..3eefffbd5 100644 --- a/tests/test_on_data/test_yaml_conversion_specification_cli.py +++ b/tests/test_on_data/test_yaml_conversion_specification_cli.py @@ -19,7 +19,7 @@ def test_run_conversion_from_yaml_cli(self): yaml_file_path = path_to_test_yml_files / "GIN_conversion_specification.yml" deploy_process( command=( - f"nwbct-run-conversion {yaml_file_path} " + f"neuroconv {yaml_file_path} " f"--data-folder-path {DATA_PATH} --output-folder-path {self.test_folder} --overwrite" ) ) @@ -55,7 +55,7 @@ def test_run_conversion_from_yaml_default_nwbfile_name(self): yaml_file_path = path_to_test_yml_files / "GIN_conversion_specification_missing_nwbfile_names.yml" deploy_process( command=( - f"nwbct-run-conversion {yaml_file_path} " + f"neuroconv {yaml_file_path} " f"--data-folder-path {DATA_PATH} --output-folder-path {self.test_folder} --overwrite" ) ) From 335dec16cf4bec5ea26fbc1c9cc99d8eef8002eb Mon Sep 17 00:00:00 2001 From: Cody Baker <51133164+CodyCBakerPhD@users.noreply.github.com> Date: Thu, 21 Jul 2022 09:25:48 -0400 Subject: [PATCH 10/11] fix windows datalad --- .github/workflows/testing.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 44ae63886..c04e44b0b 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -74,6 +74,9 @@ jobs: uses: crazy-max/ghaction-chocolatey@v1.6.0 with: args: install git-annex --ignore-checksums + - if: ${{ (steps.cache-ecephys-datasets.outputs.cache-hit == false || steps.cache-ophys-datasets.outputs.cache-hit == false || steps.cache-behavior-datasets.outputs.cache-hit == false) && matrix.os == 'windows-latest' }} + name: Get datalad - Windows + run: pip install datalad==0.16.3 - if: steps.cache-ecephys-datasets.outputs.cache-hit == false && (matrix.os == 'ubuntu-latest' || matrix.os == 'windows-latest') name: "Force GIN: ecephys download" From fdb488784ec492a0c464bd458e97813ddcce8a18 Mon Sep 17 00:00:00 2001 From: CodyCBakerPhD Date: Thu, 21 Jul 2022 14:00:41 +0000 Subject: [PATCH 11/11] fix doctests --- docs/conversion_examples_gallery/imaging/hdf5imaging.rst | 2 +- docs/conversion_examples_gallery/imaging/scanbox.rst | 2 +- docs/conversion_examples_gallery/imaging/scanimage.rst | 2 +- docs/conversion_examples_gallery/imaging/tiff.rst | 2 +- docs/conversion_examples_gallery/recording/axona.rst | 2 +- docs/conversion_examples_gallery/recording/blackrock.rst | 2 +- docs/conversion_examples_gallery/recording/intan.rst | 2 +- docs/conversion_examples_gallery/recording/neuralynx.rst | 2 +- docs/conversion_examples_gallery/recording/neuroscope.rst | 2 +- docs/conversion_examples_gallery/recording/openephys.rst | 2 +- docs/conversion_examples_gallery/recording/spikegadgets.rst | 2 +- docs/conversion_examples_gallery/recording/spikeglx.rst | 2 +- docs/conversion_examples_gallery/sorting/cellexplorer.rst | 2 +- docs/conversion_examples_gallery/sorting/kilosort.rst | 2 +- docs/conversion_examples_gallery/sorting/neuroscope.rst | 2 +- docs/conversion_examples_gallery/sorting/phy.rst | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/docs/conversion_examples_gallery/imaging/hdf5imaging.rst b/docs/conversion_examples_gallery/imaging/hdf5imaging.rst index 86667d250..7b058da8c 100644 --- a/docs/conversion_examples_gallery/imaging/hdf5imaging.rst +++ b/docs/conversion_examples_gallery/imaging/hdf5imaging.rst @@ -8,7 +8,7 @@ Convert HDF5 imaging data to NWB using :py:class:`~nwb_conversion_tools.datainte >>> from datetime import datetime >>> from dateutil import tz >>> from pathlib import Path - >>> from nwb_conversion_tools import Hdf5ImagingInterface + >>> from neuroconv import Hdf5ImagingInterface >>> >>> file_path = OPHYS_DATA_PATH / "imaging_datasets" / "hdf5" / "demoMovie.hdf5" >>> interface = Hdf5ImagingInterface(file_path=file_path, verbose=False) diff --git a/docs/conversion_examples_gallery/imaging/scanbox.rst b/docs/conversion_examples_gallery/imaging/scanbox.rst index 55625c6bc..e98b12360 100644 --- a/docs/conversion_examples_gallery/imaging/scanbox.rst +++ b/docs/conversion_examples_gallery/imaging/scanbox.rst @@ -8,7 +8,7 @@ Convert Scanbox imaging data to NWB using :py:class:`~nwb_conversion_tools.datai >>> from datetime import datetime >>> from dateutil import tz >>> from pathlib import Path - >>> from nwb_conversion_tools import SbxImagingInterface + >>> from neuroconv import SbxImagingInterface >>> >>> file_path = OPHYS_DATA_PATH / "imaging_datasets" / "Scanbox" / "sample.sbx" >>> interface = SbxImagingInterface(file_path=file_path, verbose=False) diff --git a/docs/conversion_examples_gallery/imaging/scanimage.rst b/docs/conversion_examples_gallery/imaging/scanimage.rst index 96d121757..cc7038cb2 100644 --- a/docs/conversion_examples_gallery/imaging/scanimage.rst +++ b/docs/conversion_examples_gallery/imaging/scanimage.rst @@ -8,7 +8,7 @@ Convert ScanImage imaging data to NWB using :py:class:`~nwb_conversion_tools.dat >>> from datetime import datetime >>> from dateutil import tz >>> from pathlib import Path - >>> from nwb_conversion_tools import ScanImageImagingInterface + >>> from neuroconv import ScanImageImagingInterface >>> >>> file_path = OPHYS_DATA_PATH / "imaging_datasets" / "Tif" / "sample_scanimage.tiff" >>> interface = ScanImageImagingInterface(file_path=file_path, verbose=False) diff --git a/docs/conversion_examples_gallery/imaging/tiff.rst b/docs/conversion_examples_gallery/imaging/tiff.rst index 0b8ea4080..bd79eaf60 100644 --- a/docs/conversion_examples_gallery/imaging/tiff.rst +++ b/docs/conversion_examples_gallery/imaging/tiff.rst @@ -8,7 +8,7 @@ Convert Tiff imaging data to NWB using :py:class:`~nwb_conversion_tools.datainte >>> from datetime import datetime >>> from dateutil import tz >>> from pathlib import Path - >>> from nwb_conversion_tools import TiffImagingInterface + >>> from neuroconv import TiffImagingInterface >>> >>> file_path = OPHYS_DATA_PATH / "imaging_datasets" / "Tif" / "demoMovie.tif" >>> interface = TiffImagingInterface(file_path=file_path, sampling_frequency=15.0, verbose=False) diff --git a/docs/conversion_examples_gallery/recording/axona.rst b/docs/conversion_examples_gallery/recording/axona.rst index f0b89b018..622492559 100644 --- a/docs/conversion_examples_gallery/recording/axona.rst +++ b/docs/conversion_examples_gallery/recording/axona.rst @@ -8,7 +8,7 @@ Convert axona data to NWB using :py:class:`~nwb_conversion_tools.datainterfaces. >>> from datetime import datetime >>> from dateutil import tz >>> from pathlib import Path - >>> from nwb_conversion_tools import AxonaRecordingExtractorInterface + >>> from neuroconv import AxonaRecordingExtractorInterface >>> >>> # For this interface we need to pass the location of the ``.bin`` file >>> file_path = f"{ECEPHY_DATA_PATH}/axona/axona_raw.bin" diff --git a/docs/conversion_examples_gallery/recording/blackrock.rst b/docs/conversion_examples_gallery/recording/blackrock.rst index 1842ead68..621bd56bd 100644 --- a/docs/conversion_examples_gallery/recording/blackrock.rst +++ b/docs/conversion_examples_gallery/recording/blackrock.rst @@ -8,7 +8,7 @@ Convert Blackrock data to NWB using :py:class:`~nwb_conversion_tools.datainterfa >>> from datetime import datetime >>> from dateutil import tz >>> from pathlib import Path - >>> from nwb_conversion_tools import BlackrockRecordingExtractorInterface + >>> from neuroconv import BlackrockRecordingExtractorInterface >>> >>> # For this interface we need to pass the location of the ``.ns5`` file >>> file_path = f"{ECEPHY_DATA_PATH}/blackrock/FileSpec2.3001.ns5" diff --git a/docs/conversion_examples_gallery/recording/intan.rst b/docs/conversion_examples_gallery/recording/intan.rst index 111e87d94..97c3a3272 100644 --- a/docs/conversion_examples_gallery/recording/intan.rst +++ b/docs/conversion_examples_gallery/recording/intan.rst @@ -7,7 +7,7 @@ Convert Intan data to NWB using :py:class:`~nwb_conversion_tools.datainterfaces. >>> from datetime import datetime >>> from dateutil import tz >>> from pathlib import Path - >>> from nwb_conversion_tools import IntanRecordingInterface + >>> from neuroconv import IntanRecordingInterface >>> >>> # For this data interface we need to pass the location of the `.rhd` file >>> suffix = "rhd" # This can also be rhs diff --git a/docs/conversion_examples_gallery/recording/neuralynx.rst b/docs/conversion_examples_gallery/recording/neuralynx.rst index f00e9ee18..82fab4ca1 100644 --- a/docs/conversion_examples_gallery/recording/neuralynx.rst +++ b/docs/conversion_examples_gallery/recording/neuralynx.rst @@ -8,7 +8,7 @@ Convert Neuralynx data to NWB using :py:class:`~.nwb_conversion_tools.datainterf >>> from datetime import datetime >>> from dateutil import tz >>> from pathlib import Path - >>> from nwb_conversion_tools import NeuralynxRecordingInterface + >>> from neuroconv import NeuralynxRecordingInterface >>> >>> # For this data interface we need to pass the folder where the data is >>> folder_path = f"{ECEPHY_DATA_PATH}/neuralynx/Cheetah_v5.7.4/original_data" diff --git a/docs/conversion_examples_gallery/recording/neuroscope.rst b/docs/conversion_examples_gallery/recording/neuroscope.rst index e09951239..8d7d254d0 100644 --- a/docs/conversion_examples_gallery/recording/neuroscope.rst +++ b/docs/conversion_examples_gallery/recording/neuroscope.rst @@ -8,7 +8,7 @@ Convert Neuroscope data to NWB using :py:class:`~nwb_conversion_tools.datainterf >>> from datetime import datetime >>> from dateutil import tz >>> from pathlib import Path - >>> from nwb_conversion_tools import NeuroscopeRecordingInterface + >>> from neuroconv import NeuroscopeRecordingInterface >>> >>> # For Neuroscope we need to pass the location of the `.dat` file >>> file_path = f"{ECEPHY_DATA_PATH}/neuroscope/test1/test1.dat" diff --git a/docs/conversion_examples_gallery/recording/openephys.rst b/docs/conversion_examples_gallery/recording/openephys.rst index af95b7685..f5f866122 100644 --- a/docs/conversion_examples_gallery/recording/openephys.rst +++ b/docs/conversion_examples_gallery/recording/openephys.rst @@ -9,7 +9,7 @@ Convert OpenEphys data to NWB using :py:class:`~nwb_conversion_tools.datainterfa >>> from dateutil import tz >>> from pathlib import Path >>> - >>> from nwb_conversion_tools import OpenEphysRecordingExtractorInterface + >>> from neuroconv import OpenEphysRecordingExtractorInterface >>> >>> folder_path = f"{ECEPHY_DATA_PATH}/openephysbinary/v0.4.4.1_with_video_tracking" >>> # Change the folder_path to the appropiate location in your system diff --git a/docs/conversion_examples_gallery/recording/spikegadgets.rst b/docs/conversion_examples_gallery/recording/spikegadgets.rst index f62ae0b62..a36bc381b 100644 --- a/docs/conversion_examples_gallery/recording/spikegadgets.rst +++ b/docs/conversion_examples_gallery/recording/spikegadgets.rst @@ -8,7 +8,7 @@ Convert spikegadgets data to NWB using :py:class:`~nwb_conversion_tools.datainte from datetime import datetime from dateutil import tz from pathlib import Path - from nwb_conversion_tools import SpikeGadgetsRecordingInterface + from neuroconv import SpikeGadgetsRecordingInterface # For this interface we need to pass the specific path to the files. file_path = f"{ECEPHY_DATA_PATH}/spikegadgets/20210225_em8_minirec2_ac.rec" diff --git a/docs/conversion_examples_gallery/recording/spikeglx.rst b/docs/conversion_examples_gallery/recording/spikeglx.rst index 12b319f98..6167a8e23 100644 --- a/docs/conversion_examples_gallery/recording/spikeglx.rst +++ b/docs/conversion_examples_gallery/recording/spikeglx.rst @@ -8,7 +8,7 @@ Convert spikeglx data to NWB using :py:class:`~nwb_conversion_tools.datainterfac >>> from datetime import datetime >>> from dateutil import tz >>> from pathlib import Path - >>> from nwb_conversion_tools import SpikeGLXRecordingInterface + >>> from neuroconv import SpikeGLXRecordingInterface >>> >>> # For this interface we need to pass the location of the ``.bin`` file >>> file_path = f"{ECEPHY_DATA_PATH}/spikeglx/Noise4Sam_g0/Noise4Sam_g0_imec0/Noise4Sam_g0_t0.imec0.ap.bin" diff --git a/docs/conversion_examples_gallery/sorting/cellexplorer.rst b/docs/conversion_examples_gallery/sorting/cellexplorer.rst index ef2dfe7ab..0548fd0ca 100644 --- a/docs/conversion_examples_gallery/sorting/cellexplorer.rst +++ b/docs/conversion_examples_gallery/sorting/cellexplorer.rst @@ -8,7 +8,7 @@ Convert cell explorer sorting data to NWB using :py:class:`~nwb_conversion_tools >>> from datetime import datetime >>> from dateutil import tz >>> from pathlib import Path - >>> from nwb_conversion_tools import CellExplorerSortingInterface + >>> from neuroconv import CellExplorerSortingInterface >>> >>> # For this interface we need to pass the location of the ``cellinfo.mat`` file >>> file_path = f"{ECEPHY_DATA_PATH}/cellexplorer/dataset_1/20170311_684um_2088um_170311_134350.spikes.cellinfo.mat" diff --git a/docs/conversion_examples_gallery/sorting/kilosort.rst b/docs/conversion_examples_gallery/sorting/kilosort.rst index 3acab629f..92739a499 100644 --- a/docs/conversion_examples_gallery/sorting/kilosort.rst +++ b/docs/conversion_examples_gallery/sorting/kilosort.rst @@ -9,7 +9,7 @@ Convert Kilosort data to NWB using :py:class:`~nwb_conversion_tools.datainterfac >>> from dateutil import tz >>> from pathlib import Path >>> - >>> from nwb_conversion_tools import KilosortSortingInterface + >>> from neuroconv import KilosortSortingInterface >>> >>> folder_path = f"{ECEPHY_DATA_PATH}/phy/phy_example_0" >>> # Change the file_path to the location of the data in your system diff --git a/docs/conversion_examples_gallery/sorting/neuroscope.rst b/docs/conversion_examples_gallery/sorting/neuroscope.rst index e2c7768dd..0c5d06a9d 100644 --- a/docs/conversion_examples_gallery/sorting/neuroscope.rst +++ b/docs/conversion_examples_gallery/sorting/neuroscope.rst @@ -8,7 +8,7 @@ Convert Neuroscope sorting data to NWB using :py:class:`~nwb_conversion_tools.da >>> from datetime import datetime >>> from dateutil import tz >>> from pathlib import Path - >>> from nwb_conversion_tools import NeuroscopeSortingInterface + >>> from neuroconv import NeuroscopeSortingInterface >>> >>> folder_path = f"{ECEPHY_DATA_PATH}/neuroscope/dataset_1" >>> xml_file_path = folder_path + "/YutaMouse42-151117.xml" diff --git a/docs/conversion_examples_gallery/sorting/phy.rst b/docs/conversion_examples_gallery/sorting/phy.rst index a80a96194..d89ef5b54 100644 --- a/docs/conversion_examples_gallery/sorting/phy.rst +++ b/docs/conversion_examples_gallery/sorting/phy.rst @@ -9,7 +9,7 @@ Convert Phy data to NWB using :py:class:`~.nwb_conversion_tools.datainterfaces.e >>> from dateutil import tz >>> from pathlib import Path >>> - >>> from nwb_conversion_tools import PhySortingInterface + >>> from neuroconv import PhySortingInterface >>> >>> folder_path = f"{ECEPHY_DATA_PATH}/phy/phy_example_0" >>> # Change the file_path to the location of the data in your system