Skip to content

Commit 22f5d76

Browse files
authored
Merge branch 'NeuralEnsemble:master' into resolve_plexon2rawio_symlink
2 parents 643acae + 43f2c36 commit 22f5d76

Some content is hidden

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

45 files changed

+1361
-352
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/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: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,19 @@ jobs:
7676
# restore-key hits should result in `cache-hit` == 'false'
7777
#if: steps.cache-conda-env.outputs.cache-hit != 'true'
7878
run: |
79-
conda install datalad pip numpy=${{ matrix.numpy-version }} -c conda-forge
79+
conda install pip numpy=${{ matrix.numpy-version }} -c conda-forge
8080
# this command is for updating cache. We are resting removal.
8181
# conda env update --name neo-test-env-${{ matrix.python-version }} --file environment_testing.yml --prune
8282

83+
- name: Install git-annex
84+
# 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
86+
shell: bash
87+
run: |
88+
pip install datalad-installer
89+
datalad-installer --sudo ok git-annex --method datalad/packages
90+
git config --global filter.annex.process "git-annex filter-process" # recommended for efficiency
91+
8392
- name: Configure git
8493
run: |
8594
git config --global user.email "neo_ci@fake_mail.com"

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 & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ and may not be the current affiliation of a contributor.
7272
* Divyansh Gupta [31]
7373
* Nate Dolensek [3]
7474
* Philipp Hornauer [32]
75-
* Robert Wolff
75+
* Robert Wolff [42]
7676
* Jules Lebert [33]
7777
* Benjamin Heasly
7878
* Baptiste Grimaud [34]
@@ -90,8 +90,13 @@ and may not be the current affiliation of a contributor.
9090
* Xin Niu
9191
* Nikhil Chandra [40]
9292
* Luigi Petrucco [42]
93+
* Tommaso Lambresa [43]
94+
* Nina Kudryashova [37]
95+
* Rémi Proville [44]
96+
* Paul Adkisson [24]
97+
* Luiz Tauffer [24]
9398

94-
1. Centre de Recherche en Neuroscience de Lyon, CNRS UMR5292 - INSERM U1028 - Universite Claude Bernard Lyon 1
99+
1. Centre de Recherche en Neuroscience de Lyon, CNRS UMR5292 - INSERM U1028 - Université Claude Bernard Lyon 1
95100
2. Unité de Neuroscience, Information et Complexité, CNRS UPR 3293, Gif-sur-Yvette, France
96101
3. University of California, Berkeley
97102
4. Laboratoire de Neurosciences Intégratives et Adaptatives, CNRS UMR 6149 - Université de Provence, Marseille, France
@@ -132,7 +137,9 @@ and may not be the current affiliation of a contributor.
132137
39. Massachusetts General Hospital, Department of Molecular Biology
133138
40. Plexon Inc.
134139
41. Paris Brain Institute
135-
42. Istituto Italiano di Tecnologia (IIT), Italy
140+
42. Istituto Italiano di Tecnologia (IIT), Genoa, Italy
141+
43. University of Genoa, Italy
142+
44. AquiNeuro, SAS
136143

137144

138145

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/io/__init__.py

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@
167167
.. autoclass:: neo.io.MaxwellIO
168168
169169
.. autoattribute:: extensions
170-
170+
171171
.. autoclass:: neo.io.MedIO
172172
173173
.. autoattribute:: extensions
@@ -280,24 +280,17 @@
280280

281281
import pathlib
282282
from collections import Counter
283+
import importlib.util
283284

284-
# try to import the neuroshare library.
285+
# check if neuroshare library exists
285286
# if it is present, use the neuroshareapiio to load neuroshare files
286287
# if it is not present, use the neurosharectypesio to load files
287-
try:
288-
import neuroshare as ns
289-
except ModuleNotFoundError as err:
290-
from neo.io.neurosharectypesio import NeurosharectypesIO as NeuroshareIO
291288

292-
# print("\n neuroshare library not found, loading data with ctypes" )
293-
# print("\n to use the API be sure to install the library found at:")
294-
# print("\n www.http://pythonhosted.org/neuroshare/")
295-
296-
else:
289+
neuroshare_spec = importlib.util.find_spec("neuroshare")
290+
if neuroshare_spec is not None:
297291
from neo.io.neuroshareapiio import NeuroshareapiIO as NeuroshareIO
298-
299-
# print("neuroshare library successfully imported")
300-
# print("\n loading with API...")
292+
else:
293+
from neo.io.neurosharectypesio import NeurosharectypesIO as NeuroshareIO
301294

302295
from neo.io.alphaomegaio import AlphaOmegaIO
303296
from neo.io.asciiimageio import AsciiImageIO

0 commit comments

Comments
 (0)