From 16de46bcedb5ac5c75d2645409458a846997875d Mon Sep 17 00:00:00 2001 From: Heberto Mayorquin Date: Wed, 21 Feb 2024 18:14:58 -0600 Subject: [PATCH] Add support for python 3.12 (#626) Co-authored-by: Cody Baker <51133164+CodyCBakerPhD@users.noreply.github.com> Co-authored-by: Ben Dichter --- .github/workflows/dev-testing.yml | 2 +- .github/workflows/doctests.yml | 2 +- .github/workflows/live-service-testing.yml | 2 +- .github/workflows/testing.yml | 2 +- CHANGELOG.md | 1 + requirements-minimal.txt | 3 ++- src/neuroconv/datainterfaces/ecephys/edf/requirements.txt | 3 +-- src/neuroconv/datainterfaces/ecephys/maxwell/requirements.txt | 1 - .../datainterfaces/ecephys/spike2/spike2datainterface.py | 2 +- .../test_models/test_dataset_io_configuration_model.py | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) delete mode 100644 src/neuroconv/datainterfaces/ecephys/maxwell/requirements.txt diff --git a/.github/workflows/dev-testing.yml b/.github/workflows/dev-testing.yml index 1485d212c..082fee45f 100644 --- a/.github/workflows/dev-testing.yml +++ b/.github/workflows/dev-testing.yml @@ -23,7 +23,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 - run: git fetch --prune --unshallow --tags diff --git a/.github/workflows/doctests.yml b/.github/workflows/doctests.yml index 5c2a0932a..1507d82e7 100644 --- a/.github/workflows/doctests.yml +++ b/.github/workflows/doctests.yml @@ -9,7 +9,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] os: [ubuntu-latest, macos-latest, windows-latest] steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/live-service-testing.yml b/.github/workflows/live-service-testing.yml index e362b55a3..76b610012 100644 --- a/.github/workflows/live-service-testing.yml +++ b/.github/workflows/live-service-testing.yml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] os: [ubuntu-latest, macos-latest, windows-latest] steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 7d7d8ee7b..b0c43900e 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -21,7 +21,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] os: [ubuntu-latest, macos-latest, windows-latest] steps: - uses: actions/checkout@v4 diff --git a/CHANGELOG.md b/CHANGELOG.md index 20a4e80f3..0d44c3f82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -68,6 +68,7 @@ * The `CEDRecordingInterface` has now been removed; use the `Spike2RecordingInterface` instead. [PR #602](https://github.com/catalystneuro/neuroconv/pull/602) ### Features +* Added support for python 3.12 [PR #626](https://github.com/catalystneuro/neuroconv/pull/626) * Added `session_start_time` extraction to `FicTracDataInterface`. [PR #598](https://github.com/catalystneuro/neuroconv/pull/598) * Added `imaging_plane_name` keyword argument to `add_imaging_plane` function to determine which imaging plane to add from the metadata by name instead of `imaging_plane_index`. * Added reference for `imaging_plane` to default plane segmentation metadata. [PR #594](https://github.com/catalystneuro/neuroconv/pull/594) diff --git a/requirements-minimal.txt b/requirements-minimal.txt index 4a2c2a44d..dfd7e9619 100644 --- a/requirements-minimal.txt +++ b/requirements-minimal.txt @@ -1,4 +1,5 @@ -numpy>=1.22.0 +numpy>=1.22.0; python_version<='3.11' +numpy>=1.26.0; python_version>='3.12' jsonschema>=3.2.0 PyYAML>=5.4 scipy>=1.4.1 diff --git a/src/neuroconv/datainterfaces/ecephys/edf/requirements.txt b/src/neuroconv/datainterfaces/ecephys/edf/requirements.txt index 6f166a274..2ca43feaa 100644 --- a/src/neuroconv/datainterfaces/ecephys/edf/requirements.txt +++ b/src/neuroconv/datainterfaces/ecephys/edf/requirements.txt @@ -1,2 +1 @@ -pyedflib>=0.1.30 -numpy<1.25.0;python_version>="3.11" +pyedflib>=0.1.36 diff --git a/src/neuroconv/datainterfaces/ecephys/maxwell/requirements.txt b/src/neuroconv/datainterfaces/ecephys/maxwell/requirements.txt deleted file mode 100644 index d7b53e65f..000000000 --- a/src/neuroconv/datainterfaces/ecephys/maxwell/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -h5py<=3.9.0 diff --git a/src/neuroconv/datainterfaces/ecephys/spike2/spike2datainterface.py b/src/neuroconv/datainterfaces/ecephys/spike2/spike2datainterface.py index 1a4285290..44b4ab6d4 100644 --- a/src/neuroconv/datainterfaces/ecephys/spike2/spike2datainterface.py +++ b/src/neuroconv/datainterfaces/ecephys/spike2/spike2datainterface.py @@ -9,7 +9,7 @@ def _test_sonpy_installation() -> None: get_package( package_name="sonpy", excluded_python_versions=["3.10", "3.11"], - excluded_platforms_and_python_versions=dict(darwin=dict(arm=["3.8", "3.9", "3.10", "3.11"])), + excluded_platforms_and_python_versions=dict(darwin=dict(arm=["3.8", "3.9", "3.10", "3.11", "3.12"])), ) diff --git a/tests/test_minimal/test_tools/test_backend_and_dataset_configuration/test_models/test_dataset_io_configuration_model.py b/tests/test_minimal/test_tools/test_backend_and_dataset_configuration/test_models/test_dataset_io_configuration_model.py index b2587bd5a..b5fffa134 100644 --- a/tests/test_minimal/test_tools/test_backend_and_dataset_configuration/test_models/test_dataset_io_configuration_model.py +++ b/tests/test_minimal/test_tools/test_backend_and_dataset_configuration/test_models/test_dataset_io_configuration_model.py @@ -9,7 +9,7 @@ def test_get_data_io_kwargs_abstract_error(): with pytest.raises(TypeError) as error_info: DatasetIOConfiguration(dataset_info=mock_DatasetInfo(), chunk_shape=(78_125, 64), buffer_shape=(1_250_000, 384)) - assert "Can't instantiate abstract class DatasetIOConfiguration with abstract" in str(error_info.value) + assert "Can't instantiate abstract class DatasetIOConfiguration" in str(error_info.value) def test_get_data_io_kwargs_not_implemented():