Skip to content

Commit 17d5cbd

Browse files
authored
Merge branch 'master' into fix_axonarawio
2 parents ba44cb6 + 8e1b6ad commit 17d5cbd

30 files changed

+662
-166
lines changed

.github/workflows/core-test.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,13 @@ jobs:
2626
matrix:
2727
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
2828
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
29-
numpy-version: ['1.22.4', '1.23.5', '1.24.4', '1.25.1', '1.26.4', '2.0.2','2.1']
30-
# numpy 1.22: 3.10, 1.23: 3.11, 1.24: 3.11, 1.25: 3.11, 1.26: 3.12
29+
numpy-version: ['1.24.4', '1.25.1', '1.26.4', '2.0.2','2.1.3', '2.2.4']
30+
# 1.24: 3.11, 1.25: 3.11, 1.26: 3.12
3131
exclude:
3232
- python-version: '3.9'
33-
numpy-version: '2.1'
34-
- python-version: '3.11'
35-
numpy-version: '1.22.4'
36-
- python-version: '3.12'
37-
numpy-version: '1.22.4'
38-
- python-version: '3.12'
39-
numpy-version: '1.23.5'
33+
numpy-version: '2.1.3'
34+
- python-version: '3.9'
35+
numpy-version: '2.2.4'
4036
- python-version: '3.12'
4137
numpy-version: '1.24.4'
4238
- python-version: '3.12'

.github/workflows/io-test.yml

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -82,17 +82,11 @@ jobs:
8282

8383
- name: Install git-annex
8484
# this is the trick from the spikeinterface repo for getting git-annex to work with datalad
85+
# see https://github.com/SpikeInterface/spikeinterface/pull/3877 for more info
8586
shell: bash
8687
run: |
8788
pip install datalad-installer
88-
wget https://downloads.kitenet.net/git-annex/linux/current/git-annex-standalone-amd64.tar.gz
89-
mkdir /home/runner/work/installation
90-
mv git-annex-standalone-amd64.tar.gz /home/runner/work/installation/
91-
workdir=$(pwd)
92-
cd /home/runner/work/installation
93-
tar xvzf git-annex-standalone-amd64.tar.gz
94-
echo "$(pwd)/git-annex.linux" >> $GITHUB_PATH
95-
cd $workdir
89+
datalad-installer --sudo ok git-annex --method datalad/packages
9690
git config --global filter.annex.process "git-annex filter-process" # recommended for efficiency
9791
9892
- name: Configure git
@@ -120,13 +114,6 @@ jobs:
120114
# run: |
121115
# pip install --no-dependencies -e .
122116

123-
- name: Install wine
124-
run: |
125-
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
126-
sudo dpkg --add-architecture i386
127-
sudo apt-get update -qq
128-
sudo apt-get install -yqq --allow-downgrades libc6:i386 libgcc-s1:i386 libstdc++6:i386 wine
129-
130117
- name: Pip list
131118
run: |
132119
pip list
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
name: NeoPlexon2Test
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 12 * * 0" # weekly at noon UTC on Sundays
7+
8+
9+
jobs:
10+
build-and-test:
11+
name: Test on (${{ inputs.os }}) (${{ matrix.python-version}}) (${{ matrix.numpy-version }})
12+
runs-on: ${{ inputs.os }}
13+
strategy:
14+
fail-fast: true
15+
matrix:
16+
python-version: ['3.9', '3.12']
17+
numpy-version: ['1.26', '2.0']
18+
defaults:
19+
# by default run in bash mode (required for conda usage)
20+
run:
21+
shell: bash -l {0}
22+
steps:
23+
24+
- name: Checkout repository
25+
uses: actions/checkout@v4
26+
27+
- name: Get current year-month
28+
id: date
29+
run: echo "date=$(date +'%Y-%m')" >> $GITHUB_OUTPUT
30+
31+
- name: Get ephy_testing_data current head hash
32+
# the key depend on the last commit repo https://gin.g-node.org/NeuralEnsemble/ephy_testing_data.git
33+
id: ephy_testing_data
34+
run: |
35+
echo "dataset_hash=$(git ls-remote https://gin.g-node.org/NeuralEnsemble/ephy_testing_data.git HEAD | cut -f1)" >> $GITHUB_OUTPUT
36+
37+
- uses: actions/cache/restore@v4
38+
# Loading cache of ephys_testing_dataset
39+
id: cache-datasets
40+
with:
41+
path: ~/ephy_testing_data
42+
key: ${{ runner.os }}-datasets-${{ steps.ephy_testing_data.outputs.dataset_hash }}
43+
restore-keys: ${{ runner.os }}-datasets-
44+
45+
- uses: conda-incubator/setup-miniconda@v3
46+
with:
47+
activate-environment: neo-test-env-${{ matrix.python-version }}
48+
python-version: "${{ matrix.python-version }}"
49+
50+
- name: Install testing dependencies
51+
# testing environment is only created from yml if no cache was found
52+
# restore-key hits should result in `cache-hit` == 'false'
53+
#if: steps.cache-conda-env.outputs.cache-hit != 'true'
54+
run: |
55+
conda install pip numpy=${{ matrix.numpy-version }} -c conda-forge
56+
# this command is for updating cache. We are resting removal.
57+
# conda env update --name neo-test-env-${{ matrix.python-version }} --file environment_testing.yml --prune
58+
59+
- name: Install git-annex
60+
# this is the trick from the spikeinterface repo for getting git-annex to work with datalad
61+
# see https://github.com/SpikeInterface/spikeinterface/pull/3877 for more info
62+
shell: bash
63+
run: |
64+
pip install datalad-installer
65+
datalad-installer --sudo ok git-annex --method datalad/packages
66+
git config --global filter.annex.process "git-annex filter-process" # recommended for efficiency
67+
68+
- name: Configure git
69+
run: |
70+
git config --global user.email "neo_ci@fake_mail.com"
71+
git config --global user.name "neo CI"
72+
73+
- name: Python version
74+
run: |
75+
which python
76+
python --version
77+
78+
- name: Install neo including dependencies
79+
# installation with dependencies is only required if no cache was found
80+
# restore-key hits should result in `cache-hit` == 'false'
81+
# if: steps.cache-conda-env.outputs.cache-hit != 'true'
82+
run: |
83+
pip install --upgrade -e .
84+
pip install .[test]
85+
86+
87+
- name: Install wine
88+
run: |
89+
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
90+
sudo dpkg --add-architecture i386
91+
sudo apt-get update -qq
92+
sudo apt-get install -yqq --allow-downgrades libc6:i386 libgcc-s1:i386 libstdc++6:i386 wine
93+
94+
- name: Pip list
95+
run: |
96+
pip list
97+
98+
- name: Conda list
99+
run: |
100+
conda list
101+
102+
- name: Test with pytest
103+
env:
104+
HDF5_PLUGIN_PATH: ${{ github.workspace }}/hdf5_local_plugin_path
105+
PLEXON2_TEST: true
106+
run: |
107+
# only neo.rawio and neo.io
108+
pytest --cov=neo neo/test/rawiotest
109+
pytest --cov=neo neo/test/iotest

codemeta.json

Lines changed: 9 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": "2025-01-20",
8-
"downloadUrl": "https://files.pythonhosted.org/packages/3b/91/c3630d766b3b959f8e604d8d41580c78973ece5f1e070b13bd9755dba60b/neo-0.14.0.tar.gz",
7+
"dateModified": "2025-04-14",
8+
"downloadUrl": "https://files.pythonhosted.org/packages/f1/81/618538a70b0a7db16a174da9a7b5e8aec65462ebcd8f1120cd41b583a8dd/neo-0.14.1.tar.gz",
99
"issueTracker": "https://github.com/NeuralEnsemble/python-neo/issues",
1010
"name": "Neo",
11-
"version": "0.14.0",
11+
"version": "0.14.1",
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.14.0.html",
15+
"releaseNotes": "https://neo.readthedocs.io/en/latest/releases/0.14.1.html",
1616
"funding": "https://cordis.europa.eu/project/id/945539",
1717
"developmentStatus": "active",
1818
"referencePublication": "https://doi.org/10.3389/fninf.2014.00010",
@@ -114,6 +114,10 @@
114114
{ "@type": "Person", "givenName": "Anthony", "familyName": "Pinto"},
115115
{ "@type": "Person", "givenName": "Chris", "familyName": "Heydrick"},
116116
{"@type": "Person", "givenName": "Nikhil", "familyName": "Chandra"},
117-
{"@type": "Person", "givenName": "Luigi", "familyName": "Petrucco"}
117+
{"@type": "Person", "givenName": "Luigi", "familyName": "Petrucco"},
118+
{"@type": "Person", "givenName": "Tommaso", "familyName": "Lambresa"},
119+
{"@type": "Person", "givenName": "Rémi", "familyName": "Proville"},
120+
{"@type": "Person", "givenName": "Nina", "familyName": "Kudryashova"},
121+
{"@type": "Person", "givenName": "Paul", "familyName": "Adkisson"}
118122
]
119123
}

doc/source/authors.rst

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ and may not be the current affiliation of a contributor.
7171
* Daniel P. Crepeau [30]
7272
* Divyansh Gupta [31]
7373
* Nate Dolensek [3]
74-
* Philipp Hornauer [32]
75-
* Robert Wolff
74+
* Philipp Hornauer [32, 45]
75+
* Robert Wolff [42]
7676
* Jules Lebert [33]
7777
* Benjamin Heasly
7878
* Baptiste Grimaud [34]
@@ -93,7 +93,10 @@ and may not be the current affiliation of a contributor.
9393
* Tommaso Lambresa [43]
9494
* Nina Kudryashova [37]
9595
* Rémi Proville [44]
96-
* Letizia Signorelli [45]
96+
* Paul Adkisson [24]
97+
* Luiz Tauffer [24]
98+
* Akshaj Verma [46]
99+
* Letizia Signorelli [47]
97100

98101
1. Centre de Recherche en Neuroscience de Lyon, CNRS UMR5292 - INSERM U1028 - Université Claude Bernard Lyon 1
99102
2. Unité de Neuroscience, Information et Complexité, CNRS UPR 3293, Gif-sur-Yvette, France
@@ -136,10 +139,12 @@ and may not be the current affiliation of a contributor.
136139
39. Massachusetts General Hospital, Department of Molecular Biology
137140
40. Plexon Inc.
138141
41. Paris Brain Institute
139-
42. Istituto Italiano di Tecnologia (IIT), Italy
142+
42. Istituto Italiano di Tecnologia (IIT), Genoa, Italy
140143
43. University of Genoa, Italy
141144
44. AquiNeuro, SAS
142-
45. Centre for Molecular Medicine Norway (NCMM), University of Oslo, Norway
145+
45. Maxwell Biosystems AG
146+
46. Brain Center, University Medical Center Utrecht, Utrecht University, The Netherlands
147+
47. Centre for Molecular Medicine Norway (NCMM), University of Oslo, Norway
143148

144149

145150

doc/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060

6161
# General information about the project.
6262
project = "Neo"
63-
copyright = "2010-2024, " + AUTHORS
63+
copyright = "2010-2025, " + AUTHORS
6464

6565
# The version info for the project you're documenting, acts as replacement for
6666
# |version| and |release|, also used in various other places throughout the

doc/source/governance.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ The current maintainers are:
3838
- Julia Sprenger (`@JuliaSprenger`_)
3939
- Michael Denker (`@mdenker`_)
4040
- Alessio Buccino (`@alejoe91`_)
41+
- Zach McKenzie (`@zm711`_)
4142

4243

4344
.. _`Neo maintainers team`: https://github.com/orgs/NeuralEnsemble/teams/neo-maintainers
@@ -47,3 +48,4 @@ The current maintainers are:
4748
.. _`@JuliaSprenger`: https://github.com/JuliaSprenger
4849
.. _`@mdenker`: https://github.com/mdenker
4950
.. _`@alejoe91`: https://github.com/alejoe91
51+
.. _`@zm711`: https://github.com/zm711

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.1.rst
910
releases/0.14.0.rst
1011
releases/0.13.4.rst
1112
releases/0.13.3.rst

doc/source/releases/0.14.1.rst

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
========================
2+
Neo 0.14.1 release notes
3+
========================
4+
5+
14 April 25
6+
7+
This release of Neo includes many bug fixes in various IOs, a new HTML based repr, and fixes to the CI all with an eye toward our 1.0 release.
8+
9+
See all `pull requests`_ included in this release and the `list of closed issues`_.
10+
11+
12+
Updated dependencies
13+
--------------------
14+
15+
setuptools >= 78.0.2
16+
numpy >= 1.24.4
17+
18+
Import improvements
19+
-------------------
20+
21+
As part of our ongoing effort to improve the speed of importing Neo we have moved the library over to using :code:`importlib.util.find_spec`
22+
rather than eagerly importing packages in :code:`try-except` blocks.
23+
24+
CI Improvements
25+
---------------
26+
27+
The install for datalad/git-annex in the CI was fixed for our Python 3.12 tests allowing for all IOs to be tested on Python 3.9 and Python 3.12.
28+
The buidling of documentation was improved by fixing code style errors.
29+
30+
31+
HTML repr
32+
---------
33+
34+
Thanks to the work of Heberto Mayorquin Neo now supports an html based repr. To see an example check out `html repr`_.
35+
36+
37+
Bug fixes and improvements in IO modules
38+
----------------------------------------
39+
40+
Bug fixes and/or improvements have been made to :code:`BlackRockIO`, :code:`SpikeGLXIO`, :code:`MaxwellIO`, :code:`IntanIO`, :code:`TdtIO`,
41+
:code:`OpenEphysBinaryIO`, :code:`NeoMatlabIO`, :code:`EdfIO`, :code:`Neuralynx`, and :code:`SpikeGadgetsIO`.
42+
43+
44+
Acknowledgements
45+
----------------
46+
47+
Thanks to Heberto Mayorquin, Zach McKenzie, Andrew Davison, Alessio Buccino, Rémi Proville, Paul Adkisson, Baptiste Grimaud,
48+
Robert Wolff, Tommaso Lambresa, and Nina Kudryashova.
49+
50+
51+
52+
.. _`html repr` : https://github.com/NeuralEnsemble/python-neo/pull/1651
53+
54+
.. _`pull requests` : https://github.com/NeuralEnsemble/python-neo/pulls?q=is%3Apr+is%3Aclosed+milestone%3A0.14.1
55+
56+
.. _`list of closed issues` : https://github.com/NeuralEnsemble/python-neo/issues?q=is%3Aissue%20state%3Aclosed%20milestone%3A0.14.1

neo/core/spiketrainlist.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,11 @@ def __init__(self, items=None, parent=None):
113113
self._channel_id_array = None
114114
self._all_channel_ids = None
115115
self._spiketrain_metadata = {}
116-
if parent is not None and parent.__class__.__name__ != "Segment":
117-
raise AttributeError("The parent class must be a Segment")
116+
117+
from .segment import Segment # import here rather than at the top to avoid circular import
118+
119+
if parent is not None and not isinstance(parent, Segment):
120+
raise AttributeError("If provided, the parent class must be a Segment")
118121
self.segment = parent
119122

120123
@property

0 commit comments

Comments
 (0)