Skip to content

Commit 44d1e91

Browse files
authored
Merge branch 'master' into tiffio-fix
2 parents 977ba7b + 976c4aa commit 44d1e91

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+722
-336
lines changed

.github/workflows/caches_cron_job.yml

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -10,57 +10,57 @@ on:
1010

1111
jobs:
1212

13-
create-conda-env-cache-if-missing:
14-
name: Caching conda env
15-
runs-on: "ubuntu-latest"
16-
strategy:
17-
fail-fast: true
18-
defaults:
19-
# by default run in bash mode (required for conda usage)
20-
run:
21-
shell: bash -l {0}
22-
steps:
23-
- uses: actions/checkout@v3
24-
25-
- name: Get current year-month
26-
id: date
27-
run: |
28-
echo "date=$(date +'%Y-%m')" >> $GITHUB_OUTPUT
29-
30-
- name: Get current dependencies hash
31-
id: dependencies
32-
run: |
33-
echo "hash=${{hashFiles('**/pyproject.toml', '**/environment_testing.yml')}}" >> $GITHUB_OUTPUT
34-
35-
- uses: actions/cache@v3
36-
# the cache for python package is reset:
37-
# * every month
38-
# * when package dependencies change
39-
id: cache-conda-env
40-
with:
41-
path: /usr/share/miniconda/envs/neo-test-env
42-
key: ${{ runner.os }}-conda-env-${{ steps.dependencies.outputs.hash }}-${{ steps.date.outputs.date }}
43-
44-
- name: Cache found?
45-
run: echo "Cache-hit == ${{steps.cache-conda-env.outputs.cache-hit == 'true'}}"
46-
47-
# activate environment if not restored from cache
48-
- uses: conda-incubator/[email protected]
49-
if: steps.cache-conda-env.outputs.cache-hit != 'true'
50-
with:
51-
activate-environment: neo-test-env
52-
environment-file: environment_testing.yml
53-
python-version: 3.9
54-
55-
- name: Create the conda environment to be cached
56-
if: steps.cache-conda-env.outputs.cache-hit != 'true'
57-
# create conda env, configure git and install pip, neo and test dependencies from master
58-
# for PRs that change dependencies, this environment will be updated in the test workflow
59-
run: |
60-
git config --global user.email "neo_ci@fake_mail.com"
61-
git config --global user.name "neo CI"
62-
python -m pip install -U pip # Official recommended way
63-
pip install --upgrade -e .[test]
13+
# create-conda-env-cache-if-missing:
14+
# name: Caching conda env
15+
# runs-on: "ubuntu-latest"
16+
# strategy:
17+
# fail-fast: true
18+
# defaults:
19+
# # by default run in bash mode (required for conda usage)
20+
# run:
21+
# shell: bash -l {0}
22+
# steps:
23+
# - uses: actions/checkout@v3
24+
25+
# - name: Get current year-month
26+
# id: date
27+
# run: |
28+
# echo "date=$(date +'%Y-%m')" >> $GITHUB_OUTPUT
29+
30+
# - name: Get current dependencies hash
31+
# id: dependencies
32+
# run: |
33+
# echo "hash=${{hashFiles('**/pyproject.toml', '**/environment_testing.yml')}}" >> $GITHUB_OUTPUT
34+
35+
# - uses: actions/cache@v3
36+
# # the cache for python package is reset:
37+
# # * every month
38+
# # * when package dependencies change
39+
# id: cache-conda-env
40+
# with:
41+
# path: /usr/share/miniconda/envs/neo-test-env
42+
# key: ${{ runner.os }}-conda-env-${{ steps.dependencies.outputs.hash }}-${{ steps.date.outputs.date }}
43+
44+
# - name: Cache found?
45+
# run: echo "Cache-hit == ${{steps.cache-conda-env.outputs.cache-hit == 'true'}}"
46+
47+
# # activate environment if not restored from cache
48+
# - uses: conda-incubator/[email protected]
49+
# if: steps.cache-conda-env.outputs.cache-hit != 'true'
50+
# with:
51+
# activate-environment: neo-test-env
52+
# environment-file: environment_testing.yml
53+
# python-version: 3.9
54+
55+
# - name: Create the conda environment to be cached
56+
# if: steps.cache-conda-env.outputs.cache-hit != 'true'
57+
# # create conda env, configure git and install pip, neo and test dependencies from master
58+
# # for PRs that change dependencies, this environment will be updated in the test workflow
59+
# run: |
60+
# git config --global user.email "neo_ci@fake_mail.com"
61+
# git config --global user.name "neo CI"
62+
# python -m pip install -U pip # Official recommended way
63+
# pip install --upgrade -e .[test]
6464

6565
create-data-cache-if-missing:
6666
name: Caching data env

.github/workflows/io-test.yml

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@ concurrency: # Cancel previous workflows on the same pull request
1313

1414
jobs:
1515
build-and-test:
16-
name: Test on (${{ inputs.os }}) (${{ matrix.python-version}})
16+
name: Test on (${{ inputs.os }}) (${{ matrix.python-version}}) (${{ matrix.numpy-version }})
1717
runs-on: ${{ inputs.os }}
1818
strategy:
1919
fail-fast: true
2020
matrix:
2121
python-version: ['3.9', '3.12']
22+
numpy-version: ['1.26', '2.0']
2223
defaults:
2324
# by default run in bash mode (required for conda usage)
2425
run:
@@ -50,31 +51,34 @@ jobs:
5051
with:
5152
activate-environment: neo-test-env-${{ matrix.python-version }}
5253
python-version: "${{ matrix.python-version }}"
53-
54-
- name: Get current dependencies hash
55-
id: dependencies
56-
run: |
57-
echo "hash=${{hashFiles('**/pyproject.toml', '**/environment_testing.yml')}}" >> $GITHUB_OUTPUT
58-
59-
- uses: actions/cache/restore@v3
54+
55+
# TEST NOT USING CACHE
56+
#- name: Get current dependencies hash
57+
# id: dependencies
58+
# run: |
59+
# echo "hash=${{hashFiles('**/pyproject.toml', '**/environment_testing.yml')}}" >> $GITHUB_OUTPUT
60+
61+
#- uses: actions/cache/restore@v3
6062
# the cache for python package is reset:
6163
# * every month
6264
# * when package dependencies change
63-
id: cache-conda-env
64-
with:
65-
path: /usr/share/miniconda/envs/neo-test-env-${{ matrix.python-version }}
66-
key: ${{ runner.os }}-conda-env-${{ steps.dependencies.outputs.hash }}-${{ steps.date.outputs.date }}
65+
# id: cache-conda-env
66+
# with:
67+
# path: /usr/share/miniconda/envs/neo-test-env-${{ matrix.python-version }}
68+
# key: ${{ runner.os }}-conda-env-${{ steps.dependencies.outputs.hash }}-${{ steps.date.outputs.date }}
6769
# restore-keys match any key that starts with the restore-key
68-
restore-keys: |
69-
${{ runner.os }}-conda-env-${{ steps.dependencies.outputs.hash }}-
70-
${{ runner.os }}-conda-env-
70+
# restore-keys: |
71+
# ${{ runner.os }}-conda-env-${{ steps.dependencies.outputs.hash }}-
72+
# ${{ runner.os }}-conda-env-
7173

7274
- name: Install testing dependencies
7375
# testing environment is only created from yml if no cache was found
7476
# restore-key hits should result in `cache-hit` == 'false'
75-
if: steps.cache-conda-env.outputs.cache-hit != 'true'
77+
#if: steps.cache-conda-env.outputs.cache-hit != 'true'
7678
run: |
77-
conda env update --name neo-test-env-${{ matrix.python-version }} --file environment_testing.yml --prune
79+
conda install datalad pip numpy=${{ matrix.numpy-version }} -c conda-forge
80+
# this command is for updating cache. We are resting removal.
81+
# conda env update --name neo-test-env-${{ matrix.python-version }} --file environment_testing.yml --prune
7882

7983
- name: Configure git
8084
run: |
@@ -89,16 +93,17 @@ jobs:
8993
- name: Install neo including dependencies
9094
# installation with dependencies is only required if no cache was found
9195
# restore-key hits should result in `cache-hit` == 'false'
92-
if: steps.cache-conda-env.outputs.cache-hit != 'true'
96+
# if: steps.cache-conda-env.outputs.cache-hit != 'true'
9397
run: |
9498
pip install --upgrade -e .
9599
pip install .[test]
96100
97-
- name: Install neo without dependencies
101+
# TEST NOT USING CACHE
102+
#- name: Install neo without dependencies
98103
# only installing neo version to test as dependencies should be in cached conda env already
99-
if: steps.cache-conda-env.outputs.cache-hit == 'true'
100-
run: |
101-
pip install --no-dependencies -e .
104+
# if: steps.cache-conda-env.outputs.cache-hit == 'true'
105+
# run: |
106+
# pip install --no-dependencies -e .
102107

103108
- name: Install wine
104109
run: |

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2010-2024, Neo authors and contributors
1+
Copyright (c) 2010-2025, Neo authors and contributors
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ For installation instructions, see doc/source/install.rst
5656

5757
To cite Neo in publications, see CITATION.txt
5858

59-
:copyright: Copyright 2010-2024 by the Neo team, see doc/source/authors.rst.
59+
:copyright: Copyright 2010-2025 by the Neo team, see doc/source/authors.rst.
6060
:license: 3-Clause Revised BSD License, see LICENSE.txt for details.
6161

6262
Funding

codemeta.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
"license": "https://spdx.org/licenses/BSD-3-Clause",
55
"codeRepository": "https://github.com/NeuralEnsemble/python-neo",
66
"contIntegration": "https://github.com/NeuralEnsemble/python-neo/actions",
7-
"dateModified": "2024-10-14",
8-
"downloadUrl": "https://files.pythonhosted.org/packages/e0/0d/e973b7e8464b6f1d88022c46040f203d93c0b080af0e33702bb11873dbbb/neo-0.13.4.tar.gz",
7+
"dateModified": "2025-01-20",
8+
"downloadUrl": "https://files.pythonhosted.org/packages/3b/91/c3630d766b3b959f8e604d8d41580c78973ece5f1e070b13bd9755dba60b/neo-0.14.0.tar.gz",
99
"issueTracker": "https://github.com/NeuralEnsemble/python-neo/issues",
1010
"name": "Neo",
11-
"version": "0.13.4",
11+
"version": "0.14.0",
1212
"identifier": "RRID:SCR_000634",
1313
"description": "Neo is a Python package for working with electrophysiology data in Python, together with support for reading a wide range of neurophysiology file formats, including Spike2, NeuroExplorer, AlphaOmega, Axon, Blackrock, Plexon, Tdt, and support for writing to a subset of these formats plus non-proprietary formats including HDF5.\n\nThe goal of Neo is to improve interoperability between Python tools for analyzing, visualizing and generating electrophysiology data by providing a common, shared object model. In order to be as lightweight a dependency as possible, Neo is deliberately limited to represention of data, with no functions for data analysis or visualization.\n\nNeo is used by a number of other software tools, including SpykeViewer (data analysis and visualization), Elephant (data analysis), the G-node suite (databasing), PyNN (simulations), tridesclous_ (spike sorting) and ephyviewer (data visualization).\n\nNeo implements a hierarchical data model well adapted to intracellular and extracellular electrophysiology and EEG data with support for multi-electrodes (for example tetrodes). Neo's data objects build on the quantities package, which in turn builds on NumPy by adding support for physical dimensions. Thus Neo objects behave just like normal NumPy arrays, but with additional metadata, checks for dimensional consistency and automatic unit conversion.",
1414
"applicationCategory": "neuroscience",
15-
"releaseNotes": "https://neo.readthedocs.io/en/latest/releases/0.13.4.html",
15+
"releaseNotes": "https://neo.readthedocs.io/en/latest/releases/0.14.0.html",
1616
"funding": "https://cordis.europa.eu/project/id/945539",
1717
"developmentStatus": "active",
1818
"referencePublication": "https://doi.org/10.3389/fninf.2014.00010",
@@ -113,6 +113,7 @@
113113
{ "@type": "Person", "givenName": "Xin", "familyName": "Niu"},
114114
{ "@type": "Person", "givenName": "Anthony", "familyName": "Pinto"},
115115
{ "@type": "Person", "givenName": "Chris", "familyName": "Heydrick"},
116-
{"@type": "Person", "givenName": "Nikhil", "familyName": "Chandra"}
116+
{"@type": "Person", "givenName": "Nikhil", "familyName": "Chandra"},
117+
{"@type": "Person", "givenName": "Luigi", "familyName": "Petrucco"}
117118
]
118119
}

doc/source/authors.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,12 @@ and may not be the current affiliation of a contributor.
8989
* Anthony Pinto [41]
9090
* Xin Niu
9191
* Nikhil Chandra [40]
92+
* Luigi Petrucco [42]
93+
* Tommaso Lambresa [43]
94+
* Nina Kudryashova [37]
95+
* Rémi Proville [44]
9296

93-
1. Centre de Recherche en Neuroscience de Lyon, CNRS UMR5292 - INSERM U1028 - Universite Claude Bernard Lyon 1
97+
1. Centre de Recherche en Neuroscience de Lyon, CNRS UMR5292 - INSERM U1028 - Université Claude Bernard Lyon 1
9498
2. Unité de Neuroscience, Information et Complexité, CNRS UPR 3293, Gif-sur-Yvette, France
9599
3. University of California, Berkeley
96100
4. Laboratoire de Neurosciences Intégratives et Adaptatives, CNRS UMR 6149 - Université de Provence, Marseille, France
@@ -131,6 +135,9 @@ and may not be the current affiliation of a contributor.
131135
39. Massachusetts General Hospital, Department of Molecular Biology
132136
40. Plexon Inc.
133137
41. Paris Brain Institute
138+
42. Istituto Italiano di Tecnologia (IIT), Italy
139+
43. University of Genoa, Italy
140+
44. AquiNeuro, SAS
134141

135142

136143

doc/source/releases.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Release notes
66
.. toctree::
77
:maxdepth: 1
88

9+
releases/0.14.0.rst
910
releases/0.13.4.rst
1011
releases/0.13.3.rst
1112
releases/0.13.2.rst

doc/source/releases/0.14.0.rst

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
========================
2+
Neo 0.14.0 release notes
3+
========================
4+
5+
17 January 2025
6+
7+
This release of Neo is now compatible with NumPy 2.0 for core and IOs (with the exception of :class:`MedIO`) as well as Python 3.13,
8+
and includes IO bug fixes with an eye toward a 1.0 release.
9+
10+
See all `pull requests`_ included in this release and the `list of closed issues`_.
11+
12+
Updated dependencies
13+
--------------------
14+
15+
Neo now has a limit of NumPy >= 1.22.4
16+
17+
CI Improvements
18+
---------------
19+
20+
To ensure compatiblility between pre- and post- NumPy 2.0 the CI was changed to test on the lowest supported Python (3.9) and
21+
the highest supported Python (3.13) each with NumPy 1.26 as well as NumPy 2.0 for all :code:`RawIO` and :code:`IO` tests.
22+
23+
We also no longer use a cached conda env for testing as we see that there is no speed benefit to caching and we had some issues
24+
with the caches getting corrupted.
25+
26+
Testing of additional Python-NumPy combinations for core tests were added (NumPy 2.0 and 2.1 with their respective Python versions).
27+
28+
Bug fixes and improvements in IO modules
29+
----------------------------------------
30+
31+
Bug fixes and/or improvements have been made to :class:`NeuroNexusIO`, :class:`OpenEphysBinaryIO`, :class:`MicromedIO`, :class:`IntanIO` and :class:`SpikeGLX`.
32+
33+
Acknowledgements
34+
----------------
35+
36+
Thanks to Zach McKenzie, Heberto Mayorquin, Andrew Davison, Luigi Petrucco, Alessio Buccino, and Samuel Garcia.
37+
38+
.. _`pull requests` : https://github.com/NeuralEnsemble/python-neo/pulls?q=is%3Apr+is%3Aclosed+milestone%3A0.14.0
39+
40+
.. _`list of closed issues` : https://github.com/NeuralEnsemble/python-neo/issues?q=is%3Aissue%20state%3Aclosed%20milestone%3A0.14.0

environment_testing.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,3 @@ channels:
44
dependencies:
55
- datalad
66
- pip
7-
# temporary have this here for IO testing while we decide how to deal with
8-
# external packages not 2.0 ready
9-
- numpy=1.26.4

examples/plot_igorio.py

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
2-
IgorProIO Demo
3-
===========================
2+
IgorProIO Demo (BROKEN)
3+
=======================
44
55
"""
66

@@ -17,25 +17,25 @@
1717
# Downloaded from Human Brain Project Collaboratory
1818
# Digital Reconstruction of Neocortical Microcircuitry (nmc-portal)
1919
# http://microcircuits.epfl.ch/#/animal/8ecde7d1-b2d2-11e4-b949-6003088da632
20-
21-
22-
datafile_url = "https://microcircuits.epfl.ch/data/released_data/B95.zip"
23-
filename_zip = "B95.zip"
24-
filename = "grouped_ephys/B95/B95_Ch0_IDRest_107.ibw"
25-
urlretrieve(datafile_url, filename_zip)
26-
27-
zip_ref = zipfile.ZipFile(filename_zip) # create zipfile object
28-
zip_ref.extract(path=".", member=filename) # extract file to dir
29-
zip_ref.close()
30-
31-
######################################################
32-
# Once we have our data we can use `get_io` to find an
33-
# io (Igor in this case). Then we read the analogsignals
34-
# Finally we will make some nice plots
35-
reader = get_io(filename)
36-
signal = reader.read_analogsignal()
37-
plt.plot(signal.times, signal)
38-
plt.xlabel(signal.sampling_period.dimensionality)
39-
plt.ylabel(signal.dimensionality)
40-
41-
plt.show()
20+
# NOTE: this dataset is not found as the link is broken.
21+
22+
# datafile_url = "https://microcircuits.epfl.ch/data/released_data/B95.zip"
23+
# filename_zip = "B95.zip"
24+
# filename = "grouped_ephys/B95/B95_Ch0_IDRest_107.ibw"
25+
# urlretrieve(datafile_url, filename_zip)
26+
27+
# zip_ref = zipfile.ZipFile(filename_zip) # create zipfile object
28+
# zip_ref.extract(path=".", member=filename) # extract file to dir
29+
# zip_ref.close()
30+
31+
# ######################################################
32+
# # Once we have our data we can use `get_io` to find an
33+
# # io (Igor in this case). Then we read the analogsignals
34+
# # Finally we will make some nice plots
35+
# reader = get_io(filename)
36+
# signal = reader.read_analogsignal()
37+
# plt.plot(signal.times, signal)
38+
# plt.xlabel(signal.sampling_period.dimensionality)
39+
# plt.ylabel(signal.dimensionality)
40+
41+
# plt.show()

0 commit comments

Comments
 (0)