From a50e343db5d0fd2c42cc0884e6e8bcbd8d0507f8 Mon Sep 17 00:00:00 2001 From: zm711 <92116279+zm711@users.noreply.github.com> Date: Tue, 18 Jun 2024 09:04:33 -0400 Subject: [PATCH 01/30] update core tests-check numpy 2.0 --- .github/workflows/core-test.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/core-test.yml b/.github/workflows/core-test.yml index f654dcdc1..a06d29e7e 100644 --- a/.github/workflows/core-test.yml +++ b/.github/workflows/core-test.yml @@ -26,21 +26,12 @@ jobs: matrix: os: ["ubuntu-latest", "windows-latest"] # "macos-latest", - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] - numpy-version: ['1.20.3', '1.21.6', '1.22.4', '1.23.5', '1.24.1', '1.25.1', '1.26.4'] + python-version: ['3.9', '3.10', '3.11', '3.12'] + numpy-version: ['1.21.6', '1.22.4', '1.23.5', '1.24.1', '1.25.1', '1.26.4', '2.0'] exclude: - - python-version: '3.8' - numpy-version: '1.25.1' - - python-version: '3.8' - numpy-version: '1.26.4' - - python-version: '3.10' - numpy-version: '1.20.3' - - python-version: '3.11' - numpy-version: '1.20.3' - python-version: '3.11' numpy-version: '1.21.6' - python-version: '3.12' - numpy-version: '1.20.3' # python 3.12 only works on latest numpy - python-version: '3.12' numpy-version: '1.21.6' From 9f0c35e940342a23059d57e3f1367fa76a932899 Mon Sep 17 00:00:00 2001 From: zm711 <92116279+zm711@users.noreply.github.com> Date: Tue, 1 Oct 2024 14:16:31 -0400 Subject: [PATCH 02/30] add back in 2.0 test --- .github/workflows/core-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/core-test.yml b/.github/workflows/core-test.yml index 07ad95174..9a65d2ccf 100644 --- a/.github/workflows/core-test.yml +++ b/.github/workflows/core-test.yml @@ -27,7 +27,7 @@ jobs: os: ["ubuntu-latest", "windows-latest"] # "macos-latest", python-version: ['3.9', '3.10', '3.11', '3.12'] - numpy-version: ['1.22.4', '1.23.5', '1.24.1', '1.25.1', '1.26.4'] + numpy-version: ['1.22.4', '1.23.5', '1.24.1', '1.25.1', '1.26.4', '2.0'] exclude: - python-version: '3.12' numpy-version: '1.22.4' From dec766732660bf88f0c1a4b783680e93c74b8de8 Mon Sep 17 00:00:00 2001 From: zm711 <92116279+zm711@users.noreply.github.com> Date: Tue, 1 Oct 2024 14:19:51 -0400 Subject: [PATCH 03/30] change dependency for testing --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 40ff91a28..442cfb761 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,7 @@ classifiers = [ dependencies = [ "packaging", - "numpy>=1.22.4,<2.0.0", + "numpy>=1.22.4", "quantities>=0.14.1,<0.16.0" ] From 5b5c6c005cdc1ad8142856e0c107961242bc30b2 Mon Sep 17 00:00:00 2001 From: zm711 <92116279+zm711@users.noreply.github.com> Date: Thu, 17 Oct 2024 11:56:09 -0400 Subject: [PATCH 04/30] update exclusion list for 2.0 --- .github/workflows/core-test.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/core-test.yml b/.github/workflows/core-test.yml index 9a65d2ccf..9c15f4871 100644 --- a/.github/workflows/core-test.yml +++ b/.github/workflows/core-test.yml @@ -27,8 +27,20 @@ jobs: os: ["ubuntu-latest", "windows-latest"] # "macos-latest", python-version: ['3.9', '3.10', '3.11', '3.12'] - numpy-version: ['1.22.4', '1.23.5', '1.24.1', '1.25.1', '1.26.4', '2.0'] + numpy-version: ['1.22.4', '1.23.5', '1.24.1', '1.25.1', '1.26.4', '2.0', '2.1'] exclude: + - python-version: '3.9' + numpy-version: '2.0' + - python-version: '3.9' + numpy-version: '2.1' + - python-version: '3.10' + numpy-version: '2.0' + - python-version: '3.10' + numpy-version: '2.1' + - python-version: '3.11' + numpy-version: '2.0' + - python-version: '3.11' + numpy-version: '2.1' - python-version: '3.12' numpy-version: '1.22.4' - python-version: '3.12' @@ -37,6 +49,7 @@ jobs: numpy-version: '1.24.1' - python-version: '3.12' numpy-version: '1.25.1' + steps: - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 From 24f0e63ef30d8597ba2d2471b6fa99ae1edfda08 Mon Sep 17 00:00:00 2001 From: zm711 <92116279+zm711@users.noreply.github.com> Date: Thu, 17 Oct 2024 12:04:50 -0400 Subject: [PATCH 05/30] add python 3.13 --- .github/workflows/core-test.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/core-test.yml b/.github/workflows/core-test.yml index 9c15f4871..4ed4f831c 100644 --- a/.github/workflows/core-test.yml +++ b/.github/workflows/core-test.yml @@ -26,20 +26,10 @@ jobs: matrix: os: ["ubuntu-latest", "windows-latest"] # "macos-latest", - python-version: ['3.9', '3.10', '3.11', '3.12'] - numpy-version: ['1.22.4', '1.23.5', '1.24.1', '1.25.1', '1.26.4', '2.0', '2.1'] + python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] + numpy-version: ['1.22.4', '1.23.5', '1.24.4', '1.25.1', '1.26.4', '2.0', '2.1'] exclude: - python-version: '3.9' - numpy-version: '2.0' - - python-version: '3.9' - numpy-version: '2.1' - - python-version: '3.10' - numpy-version: '2.0' - - python-version: '3.10' - numpy-version: '2.1' - - python-version: '3.11' - numpy-version: '2.0' - - python-version: '3.11' numpy-version: '2.1' - python-version: '3.12' numpy-version: '1.22.4' @@ -49,6 +39,16 @@ jobs: numpy-version: '1.24.1' - python-version: '3.12' numpy-version: '1.25.1' + - python-version: '3.13' + numpy-version: '1.22.4' + - python-version: '3.13' + numpy-version: '1.23.5' + - python-version: '3.13' + numpy-version: '1.24.1' + - python-version: '3.13' + numpy-version: '1.25.1' + - python-version: '3.13' + numpy-version: '1.26.4' steps: - name: Set up Python ${{ matrix.python-version }} From 3bcbe1cb68e82347b277f2ba142ab0fab3bb6282 Mon Sep 17 00:00:00 2001 From: zm711 <92116279+zm711@users.noreply.github.com> Date: Thu, 17 Oct 2024 12:06:44 -0400 Subject: [PATCH 06/30] oops --- .github/workflows/core-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/core-test.yml b/.github/workflows/core-test.yml index 4ed4f831c..1fe361619 100644 --- a/.github/workflows/core-test.yml +++ b/.github/workflows/core-test.yml @@ -36,7 +36,7 @@ jobs: - python-version: '3.12' numpy-version: '1.23.5' - python-version: '3.12' - numpy-version: '1.24.1' + numpy-version: '1.24.4' - python-version: '3.12' numpy-version: '1.25.1' - python-version: '3.13' From a22c61b06cd42a36f551491f5f38df1efbb823ad Mon Sep 17 00:00:00 2001 From: zm711 <92116279+zm711@users.noreply.github.com> Date: Thu, 17 Oct 2024 12:09:26 -0400 Subject: [PATCH 07/30] no 2.1 for now --- .github/workflows/core-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/core-test.yml b/.github/workflows/core-test.yml index 1fe361619..b1b03dac3 100644 --- a/.github/workflows/core-test.yml +++ b/.github/workflows/core-test.yml @@ -27,7 +27,7 @@ jobs: os: ["ubuntu-latest", "windows-latest"] # "macos-latest", python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] - numpy-version: ['1.22.4', '1.23.5', '1.24.4', '1.25.1', '1.26.4', '2.0', '2.1'] + numpy-version: ['1.22.4', '1.23.5', '1.24.4', '1.25.1', '1.26.4', '2.0',] exclude: - python-version: '3.9' numpy-version: '2.1' From 5dc0dc8dd10291c9862e223d5ff93134eac6af22 Mon Sep 17 00:00:00 2001 From: zm711 <92116279+zm711@users.noreply.github.com> Date: Thu, 17 Oct 2024 12:11:38 -0400 Subject: [PATCH 08/30] fix 1.24.4 --- .github/workflows/core-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/core-test.yml b/.github/workflows/core-test.yml index b1b03dac3..630cc1a6c 100644 --- a/.github/workflows/core-test.yml +++ b/.github/workflows/core-test.yml @@ -44,7 +44,7 @@ jobs: - python-version: '3.13' numpy-version: '1.23.5' - python-version: '3.13' - numpy-version: '1.24.1' + numpy-version: '1.24.4' - python-version: '3.13' numpy-version: '1.25.1' - python-version: '3.13' From 119e715b2b8d5202701faaec57a7d1787825ef6f Mon Sep 17 00:00:00 2001 From: zm711 <92116279+zm711@users.noreply.github.com> Date: Thu, 17 Oct 2024 12:19:17 -0400 Subject: [PATCH 09/30] fix pyproject --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 716a1dd99..2d395ce78 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ classifiers = [ dependencies = [ "packaging", "numpy>=1.22.4", - "quantities>=0.14.1,<0.16.1" + "quantities>=16.1" ] [project.urls] From b27f88044f6ac8cadab65af97ca984a657c8b59c Mon Sep 17 00:00:00 2001 From: zm711 <92116279+zm711@users.noreply.github.com> Date: Thu, 17 Oct 2024 12:20:34 -0400 Subject: [PATCH 10/30] oops --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2d395ce78..45e85dbdc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ classifiers = [ dependencies = [ "packaging", "numpy>=1.22.4", - "quantities>=16.1" + "quantities>=0.16.1" ] [project.urls] From c9113f6e6e93cd246dd625122004017710912e43 Mon Sep 17 00:00:00 2001 From: zm711 <92116279+zm711@users.noreply.github.com> Date: Thu, 17 Oct 2024 12:25:54 -0400 Subject: [PATCH 11/30] fail-fast false --- .github/workflows/core-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/core-test.yml b/.github/workflows/core-test.yml index 630cc1a6c..62a7a8a70 100644 --- a/.github/workflows/core-test.yml +++ b/.github/workflows/core-test.yml @@ -22,7 +22,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: - fail-fast: true + fail-fast: false # change back before MERGE matrix: os: ["ubuntu-latest", "windows-latest"] # "macos-latest", From 11d9d7242adf2f852fbf87e79a9fe57463309d8b Mon Sep 17 00:00:00 2001 From: zm711 <92116279+zm711@users.noreply.github.com> Date: Thu, 17 Oct 2024 12:50:53 -0400 Subject: [PATCH 12/30] update io-test --- .github/workflows/core-test.yml | 4 +++- .github/workflows/io-test.yml | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/core-test.yml b/.github/workflows/core-test.yml index 62a7a8a70..1d14e9d86 100644 --- a/.github/workflows/core-test.yml +++ b/.github/workflows/core-test.yml @@ -27,7 +27,7 @@ jobs: os: ["ubuntu-latest", "windows-latest"] # "macos-latest", python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] - numpy-version: ['1.22.4', '1.23.5', '1.24.4', '1.25.1', '1.26.4', '2.0',] + numpy-version: ['1.22.4', '1.23.5', '1.24.4', '1.25.1', '1.26.4', '2.0.2',] exclude: - python-version: '3.9' numpy-version: '2.1' @@ -49,6 +49,8 @@ jobs: numpy-version: '1.25.1' - python-version: '3.13' numpy-version: '1.26.4' + - python-version: '3.13' + numpy-version: '2.0.2' steps: - name: Set up Python ${{ matrix.python-version }} diff --git a/.github/workflows/io-test.yml b/.github/workflows/io-test.yml index c609cc540..129f8c3f7 100644 --- a/.github/workflows/io-test.yml +++ b/.github/workflows/io-test.yml @@ -18,7 +18,13 @@ jobs: strategy: fail-fast: true matrix: - python-version: ['3.9', '3.11.9'] + python-version: ['3.9', '3.12'] + numpy-version: ['1.26.4', '2.0.2'] + exclude: + - python-version: '3.12' + numpy-version: '1.26.4' + - python-version: '3.9' + numpy-version: '2.0.2' defaults: # by default run in bash mode (required for conda usage) run: From 0160830332149030b239b99dd31920a503484b5d Mon Sep 17 00:00:00 2001 From: zm711 <92116279+zm711@users.noreply.github.com> Date: Thu, 17 Oct 2024 14:24:49 -0400 Subject: [PATCH 13/30] spiketrain set due to new numpy string --- neo/core/spiketrain.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neo/core/spiketrain.py b/neo/core/spiketrain.py index 20b318406..7a84df57c 100644 --- a/neo/core/spiketrain.py +++ b/neo/core/spiketrain.py @@ -975,7 +975,7 @@ def _merge_array_annotations(self, others, sorting=None): omitted_keys_other = [ key - for key in np.unique([key for other in others for key in other.array_annotations]) + for key in set([key for other in others for key in other.array_annotations]) if key not in self.array_annotations ] From 10605e3b788bc07d08f0b424b9431045d3232e84 Mon Sep 17 00:00:00 2001 From: zm711 <92116279+zm711@users.noreply.github.com> Date: Thu, 17 Oct 2024 17:59:55 -0400 Subject: [PATCH 14/30] fix the casting of times --- neo/test/coretest/test_spiketrain.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/neo/test/coretest/test_spiketrain.py b/neo/test/coretest/test_spiketrain.py index 8e5af92a7..6636c173f 100644 --- a/neo/test/coretest/test_spiketrain.py +++ b/neo/test/coretest/test_spiketrain.py @@ -315,6 +315,7 @@ def test__create_from_quantity_array(self): def test__create_from_quantity_array_with_dtype(self): times = np.arange(10, dtype="f4") * pq.ms + times = times.astype(dtype="f4") t_start = 0.0 * pq.s t_stop = 12.0 * pq.ms train1 = SpikeTrain(times, t_start=t_start, t_stop=t_stop) @@ -346,6 +347,10 @@ def test__create_from_quantity_array_no_start_stop_units(self): def test__create_from_quantity_array_no_start_stop_units_with_dtype(self): times = np.arange(10, dtype="f4") * pq.ms + # this step is required for NumPy 2.0 which now casts to float64 in the case either value/array + # is float64 even if not necessary + # https://numpy.org/devdocs/numpy_2_0_migration_guide.html + times = times.astype(dtype="f4") t_start = 0.0 t_stop = 12.0 train1 = SpikeTrain(times, t_start=t_start, t_stop=t_stop) @@ -1147,7 +1152,7 @@ def test_merge_multiple(self): expected *= time_unit sorting = np.argsort(expected) expected = expected[sorting] - np.testing.assert_array_equal(result.times, expected) + np.testing.assert_array_equal(result.times.magnitude, expected.magnitude) # Make sure array annotations are merged correctly self.assertTrue("label" not in result.array_annotations) From 559b7397c389a812b0d34a800e9848f75acb4d0c Mon Sep 17 00:00:00 2001 From: zm711 <92116279+zm711@users.noreply.github.com> Date: Thu, 17 Oct 2024 18:07:42 -0400 Subject: [PATCH 15/30] more tests for core --- .github/workflows/core-test.yml | 2 +- .github/workflows/io-test.yml | 7 +------ neo/test/coretest/test_spiketrain.py | 3 +++ 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/core-test.yml b/.github/workflows/core-test.yml index 1d14e9d86..1db158fc1 100644 --- a/.github/workflows/core-test.yml +++ b/.github/workflows/core-test.yml @@ -27,7 +27,7 @@ jobs: os: ["ubuntu-latest", "windows-latest"] # "macos-latest", python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] - numpy-version: ['1.22.4', '1.23.5', '1.24.4', '1.25.1', '1.26.4', '2.0.2',] + numpy-version: ['1.22.4', '1.23.5', '1.24.4', '1.25.1', '1.26.4', '2.0.2','2.1'] exclude: - python-version: '3.9' numpy-version: '2.1' diff --git a/.github/workflows/io-test.yml b/.github/workflows/io-test.yml index 129f8c3f7..5a4259a2a 100644 --- a/.github/workflows/io-test.yml +++ b/.github/workflows/io-test.yml @@ -19,12 +19,7 @@ jobs: fail-fast: true matrix: python-version: ['3.9', '3.12'] - numpy-version: ['1.26.4', '2.0.2'] - exclude: - - python-version: '3.12' - numpy-version: '1.26.4' - - python-version: '3.9' - numpy-version: '2.0.2' + numpy-version: ['1.26.4',] defaults: # by default run in bash mode (required for conda usage) run: diff --git a/neo/test/coretest/test_spiketrain.py b/neo/test/coretest/test_spiketrain.py index 6636c173f..3b63973af 100644 --- a/neo/test/coretest/test_spiketrain.py +++ b/neo/test/coretest/test_spiketrain.py @@ -315,6 +315,9 @@ def test__create_from_quantity_array(self): def test__create_from_quantity_array_with_dtype(self): times = np.arange(10, dtype="f4") * pq.ms + # this step is required for NumPy 2.0 which now casts to float64 in the case either value/array + # is float64 even if not necessary + # https://numpy.org/devdocs/numpy_2_0_migration_guide.html times = times.astype(dtype="f4") t_start = 0.0 * pq.s t_stop = 12.0 * pq.ms From 34771c7ec91d114eab6f305137391588acafe624 Mon Sep 17 00:00:00 2001 From: zm711 <92116279+zm711@users.noreply.github.com> Date: Thu, 17 Oct 2024 18:14:08 -0400 Subject: [PATCH 16/30] try another action trick --- .github/workflows/io-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/io-test.yml b/.github/workflows/io-test.yml index 5a4259a2a..e84e36b29 100644 --- a/.github/workflows/io-test.yml +++ b/.github/workflows/io-test.yml @@ -19,7 +19,7 @@ jobs: fail-fast: true matrix: python-version: ['3.9', '3.12'] - numpy-version: ['1.26.4',] + numpy-version: '1.26.4' defaults: # by default run in bash mode (required for conda usage) run: From 08d9a2eaef266dba3d11f906aeca298e1a41c093 Mon Sep 17 00:00:00 2001 From: zm711 <92116279+zm711@users.noreply.github.com> Date: Thu, 17 Oct 2024 18:22:37 -0400 Subject: [PATCH 17/30] fix matrix call --- .github/workflows/io-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/io-test.yml b/.github/workflows/io-test.yml index e84e36b29..41915ee74 100644 --- a/.github/workflows/io-test.yml +++ b/.github/workflows/io-test.yml @@ -19,7 +19,7 @@ jobs: fail-fast: true matrix: python-version: ['3.9', '3.12'] - numpy-version: '1.26.4' + numpy-version: ['1.26.4'] defaults: # by default run in bash mode (required for conda usage) run: From 18cf5ea09827537ec05134c8b37128f47dd197d8 Mon Sep 17 00:00:00 2001 From: zm711 <92116279+zm711@users.noreply.github.com> Date: Thu, 17 Oct 2024 18:28:46 -0400 Subject: [PATCH 18/30] try limiting to 1.26.4 during install --- .github/workflows/io-test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/io-test.yml b/.github/workflows/io-test.yml index 41915ee74..6d98911d9 100644 --- a/.github/workflows/io-test.yml +++ b/.github/workflows/io-test.yml @@ -19,7 +19,6 @@ jobs: fail-fast: true matrix: python-version: ['3.9', '3.12'] - numpy-version: ['1.26.4'] defaults: # by default run in bash mode (required for conda usage) run: @@ -91,9 +90,11 @@ jobs: - name: Install neo including dependencies # installation with dependencies is only required if no cache was found # restore-key hits should result in `cache-hit` == 'false' + # in the run we limit numpy for now. Change this in the next phase of numpy 2.0 support. if: steps.cache-conda-env.outputs.cache-hit != 'true' run: | pip install --upgrade -e . + pip install numpy==1.26.4 pip install .[test] - name: Install neo without dependencies From f36daa817fc4a751b68e3bbf293f8ededb1130d1 Mon Sep 17 00:00:00 2001 From: zm711 <92116279+zm711@users.noreply.github.com> Date: Thu, 17 Oct 2024 18:31:16 -0400 Subject: [PATCH 19/30] last attempt to get action working --- .github/workflows/io-test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/io-test.yml b/.github/workflows/io-test.yml index 6d98911d9..a09a22655 100644 --- a/.github/workflows/io-test.yml +++ b/.github/workflows/io-test.yml @@ -90,11 +90,11 @@ jobs: - name: Install neo including dependencies # installation with dependencies is only required if no cache was found # restore-key hits should result in `cache-hit` == 'false' - # in the run we limit numpy for now. Change this in the next phase of numpy 2.0 support. + # in the run we don't do upgrade to prevent forced numpy 2.0. when ready + # change to pip install --upgrade -e . instead. if: steps.cache-conda-env.outputs.cache-hit != 'true' run: | - pip install --upgrade -e . - pip install numpy==1.26.4 + pip install -e . pip install .[test] - name: Install neo without dependencies From 8e6c3d497dbac861ed99bf5d75ca0cf31591b4bb Mon Sep 17 00:00:00 2001 From: zm711 <92116279+zm711@users.noreply.github.com> Date: Thu, 17 Oct 2024 18:35:58 -0400 Subject: [PATCH 20/30] add numpy version there. --- .github/workflows/io-test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/io-test.yml b/.github/workflows/io-test.yml index a09a22655..291f85551 100644 --- a/.github/workflows/io-test.yml +++ b/.github/workflows/io-test.yml @@ -19,6 +19,7 @@ jobs: fail-fast: true matrix: python-version: ['3.9', '3.12'] + numpy-version: ["1.26.4"] defaults: # by default run in bash mode (required for conda usage) run: From b67684b7ab8257b236ef8193d18c2875056f8163 Mon Sep 17 00:00:00 2001 From: zm711 <92116279+zm711@users.noreply.github.com> Date: Thu, 17 Oct 2024 18:39:46 -0400 Subject: [PATCH 21/30] try the .yml env file --- environment_testing.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/environment_testing.yml b/environment_testing.yml index 8ff8bd984..64488e835 100644 --- a/environment_testing.yml +++ b/environment_testing.yml @@ -4,3 +4,6 @@ channels: dependencies: - datalad - pip + # temporary have this here for IO testing while we decide how to deal with + # external packages not 2.0 ready + - numpy=1.26.4 From 7154a187f56804618a77f1d7bf55e479694d4166 Mon Sep 17 00:00:00 2001 From: Zach McKenzie <92116279+zm711@users.noreply.github.com> Date: Fri, 18 Oct 2024 06:02:25 -0400 Subject: [PATCH 22/30] another attempt to get numpy to work. --- .github/workflows/io-test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/io-test.yml b/.github/workflows/io-test.yml index 291f85551..688ddea51 100644 --- a/.github/workflows/io-test.yml +++ b/.github/workflows/io-test.yml @@ -96,6 +96,8 @@ jobs: if: steps.cache-conda-env.outputs.cache-hit != 'true' run: | pip install -e . + pip uninstall numpy + pip install numpy==1.26.4 pip install .[test] - name: Install neo without dependencies From 8df5dae60e92156c73cb394ec1aa98ecc8d0525c Mon Sep 17 00:00:00 2001 From: Zach McKenzie <92116279+zm711@users.noreply.github.com> Date: Fri, 18 Oct 2024 06:08:13 -0400 Subject: [PATCH 23/30] add -y --- .github/workflows/io-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/io-test.yml b/.github/workflows/io-test.yml index 688ddea51..50384fa46 100644 --- a/.github/workflows/io-test.yml +++ b/.github/workflows/io-test.yml @@ -96,8 +96,8 @@ jobs: if: steps.cache-conda-env.outputs.cache-hit != 'true' run: | pip install -e . - pip uninstall numpy - pip install numpy==1.26.4 + pip uninstall numpy -y + pip install numpy==1.26.4 -y pip install .[test] - name: Install neo without dependencies From d360787d9522fa145a84a61042359e7027a90f23 Mon Sep 17 00:00:00 2001 From: Zach McKenzie <92116279+zm711@users.noreply.github.com> Date: Fri, 18 Oct 2024 06:13:26 -0400 Subject: [PATCH 24/30] remove - y --- .github/workflows/io-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/io-test.yml b/.github/workflows/io-test.yml index 50384fa46..4a487ee3f 100644 --- a/.github/workflows/io-test.yml +++ b/.github/workflows/io-test.yml @@ -97,7 +97,7 @@ jobs: run: | pip install -e . pip uninstall numpy -y - pip install numpy==1.26.4 -y + pip install numpy==1.26.4 pip install .[test] - name: Install neo without dependencies From 12cdec9143835ae7661702dbaa281ddb41eb926e Mon Sep 17 00:00:00 2001 From: zm711 <92116279+zm711@users.noreply.github.com> Date: Fri, 18 Oct 2024 07:12:59 -0400 Subject: [PATCH 25/30] try not to download dhn_med_py --- .github/workflows/io-test.yml | 7 +------ pyproject.toml | 4 ++-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/io-test.yml b/.github/workflows/io-test.yml index 4a487ee3f..24e9f478b 100644 --- a/.github/workflows/io-test.yml +++ b/.github/workflows/io-test.yml @@ -19,7 +19,6 @@ jobs: fail-fast: true matrix: python-version: ['3.9', '3.12'] - numpy-version: ["1.26.4"] defaults: # by default run in bash mode (required for conda usage) run: @@ -91,13 +90,9 @@ jobs: - name: Install neo including dependencies # installation with dependencies is only required if no cache was found # restore-key hits should result in `cache-hit` == 'false' - # in the run we don't do upgrade to prevent forced numpy 2.0. when ready - # change to pip install --upgrade -e . instead. if: steps.cache-conda-env.outputs.cache-hit != 'true' run: | - pip install -e . - pip uninstall numpy -y - pip install numpy==1.26.4 + pip install --upgrade -e . pip install .[test] - name: Install neo without dependencies diff --git a/pyproject.toml b/pyproject.toml index 45e85dbdc..170bfcc8b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,7 +45,7 @@ iocache = [ ] test = [ - "dhn_med_py<2.0", # ci failing with 2.0 test future version when stable + # "dhn_med_py<2.0", # ci failing with 2.0 test future version when stable "pytest", "pytest-cov", # datalad # this dependency is covered by conda (environment_testing.yml) @@ -106,7 +106,7 @@ plexon2 = ["zugbruecke>=0.2; sys_platform!='win32'", "wenv; sys_platform!='win32 all = [ "coverage", "coveralls", - "dhn_med_py<2.0", # ci failing with 2.0 test future version when stable + # "dhn_med_py<2.0", # ci failing with 2.0 test future version when stable "h5py", "igor2", "ipython", From b6d6bb85ea51694e29db806510d7836bd9477a38 Mon Sep 17 00:00:00 2001 From: zm711 <92116279+zm711@users.noreply.github.com> Date: Fri, 18 Oct 2024 08:47:36 -0400 Subject: [PATCH 26/30] update action version number --- .github/workflows/core-test.yml | 6 +++--- .github/workflows/io-test.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/core-test.yml b/.github/workflows/core-test.yml index 1db158fc1..e19634ba8 100644 --- a/.github/workflows/core-test.yml +++ b/.github/workflows/core-test.yml @@ -22,7 +22,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: - fail-fast: false # change back before MERGE + fail-fast: true matrix: os: ["ubuntu-latest", "windows-latest"] # "macos-latest", @@ -54,12 +54,12 @@ jobs: steps: - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install numpy ${{ matrix.numpy-version }} run: | diff --git a/.github/workflows/io-test.yml b/.github/workflows/io-test.yml index 24e9f478b..69b6ed98b 100644 --- a/.github/workflows/io-test.yml +++ b/.github/workflows/io-test.yml @@ -26,7 +26,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Get current year-month id: date @@ -38,7 +38,7 @@ jobs: run: | echo "dataset_hash=$(git ls-remote https://gin.g-node.org/NeuralEnsemble/ephy_testing_data.git HEAD | cut -f1)" >> $GITHUB_OUTPUT - - uses: actions/cache/restore@v3 + - uses: actions/cache/restore@v4 # Loading cache of ephys_testing_dataset id: cache-datasets with: @@ -46,7 +46,7 @@ jobs: key: ${{ runner.os }}-datasets-${{ steps.ephy_testing_data.outputs.dataset_hash }} restore-keys: ${{ runner.os }}-datasets- - - uses: conda-incubator/setup-miniconda@v3 + - uses: conda-incubator/setup-miniconda@v4 with: activate-environment: neo-test-env python-version: "${{ matrix.python-version }}" From a3b753bd25903e2825be53544530bb2b496acb33 Mon Sep 17 00:00:00 2001 From: zm711 <92116279+zm711@users.noreply.github.com> Date: Fri, 18 Oct 2024 08:49:38 -0400 Subject: [PATCH 27/30] don't update miniconda version --- .github/workflows/io-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/io-test.yml b/.github/workflows/io-test.yml index 69b6ed98b..e5e0cd3a5 100644 --- a/.github/workflows/io-test.yml +++ b/.github/workflows/io-test.yml @@ -46,7 +46,7 @@ jobs: key: ${{ runner.os }}-datasets-${{ steps.ephy_testing_data.outputs.dataset_hash }} restore-keys: ${{ runner.os }}-datasets- - - uses: conda-incubator/setup-miniconda@v4 + - uses: conda-incubator/setup-miniconda@v3 with: activate-environment: neo-test-env python-version: "${{ matrix.python-version }}" From f4545c2e059a0ba3bfcca471a13a592b9019701c Mon Sep 17 00:00:00 2001 From: zm711 <92116279+zm711@users.noreply.github.com> Date: Fri, 18 Oct 2024 09:56:43 -0400 Subject: [PATCH 28/30] update rtd yaml --- .readthedocs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 211f42ae3..0f3efcc66 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -3,7 +3,7 @@ version: 2 build: os: ubuntu-22.04 tools: - python: "3.11" + python: "3.12" sphinx: configuration: doc/source/conf.py From 4b0fc8ecf99c51a9ca2be81eec36c6a475e4ad26 Mon Sep 17 00:00:00 2001 From: zm711 <92116279+zm711@users.noreply.github.com> Date: Fri, 18 Oct 2024 10:21:28 -0400 Subject: [PATCH 29/30] revert to 3.11, errors with 3.12 --- .readthedocs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 0f3efcc66..211f42ae3 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -3,7 +3,7 @@ version: 2 build: os: ubuntu-22.04 tools: - python: "3.12" + python: "3.11" sphinx: configuration: doc/source/conf.py From d8edd683efc9ed0de330f4b2100898f5e59b086e Mon Sep 17 00:00:00 2001 From: zm711 <92116279+zm711@users.noreply.github.com> Date: Mon, 21 Oct 2024 10:12:04 -0400 Subject: [PATCH 30/30] fix pyproject after release --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 65e276ebe..04c6f1c3c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ version = "0.13.4" authors = [{name = "Neo authors and contributors"}] description = "Neo is a package for representing electrophysiology data in Python, together with support for reading a wide range of neurophysiology file formats" readme = "README.rst" -requires-python = ">=3.9,<3.13" # 3.13 will require NumPy > 2.0 (Windows issue in CI) +requires-python = ">=3.9" license = {text = "BSD 3-Clause License"} classifiers = [ "Development Status :: 4 - Beta",