Skip to content

Commit 3c64280

Browse files
authored
Merge branch 'master' into micromed_segments
2 parents 56d9ed7 + af7c53c commit 3c64280

File tree

14 files changed

+370
-230
lines changed

14 files changed

+370
-230
lines changed

.github/workflows/core-test.yml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,28 +25,43 @@ jobs:
2525
fail-fast: true
2626
matrix:
2727
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
28-
python-version: ['3.9', '3.10', '3.11', '3.12']
29-
numpy-version: ['1.22.4', '1.23.5', '1.24.1', '1.25.1', '1.26.4']
28+
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']
3030
# numpy 1.22: 3.10, 1.23: 3.11, 1.24: 3.11, 1.25: 3.11, 1.26: 3.12
3131
exclude:
32+
- python-version: '3.9'
33+
numpy-version: '2.1'
3234
- python-version: '3.11'
3335
numpy-version: '1.22.4'
3436
- python-version: '3.12'
3537
numpy-version: '1.22.4'
3638
- python-version: '3.12'
3739
numpy-version: '1.23.5'
3840
- python-version: '3.12'
39-
numpy-version: '1.24.1'
41+
numpy-version: '1.24.4'
4042
- python-version: '3.12'
4143
numpy-version: '1.25.1'
44+
- python-version: '3.13'
45+
numpy-version: '1.22.4'
46+
- python-version: '3.13'
47+
numpy-version: '1.23.5'
48+
- python-version: '3.13'
49+
numpy-version: '1.24.4'
50+
- python-version: '3.13'
51+
numpy-version: '1.25.1'
52+
- python-version: '3.13'
53+
numpy-version: '1.26.4'
54+
- python-version: '3.13'
55+
numpy-version: '2.0.2'
56+
4257
steps:
4358
- name: Set up Python ${{ matrix.python-version }}
44-
uses: actions/setup-python@v4
59+
uses: actions/setup-python@v5
4560
with:
4661
python-version: ${{ matrix.python-version }}
4762

4863
- name: Checkout repository
49-
uses: actions/checkout@v3
64+
uses: actions/checkout@v4
5065

5166
- name: Install numpy ${{ matrix.numpy-version }}
5267
run: |

.github/workflows/io-test.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ jobs:
1818
strategy:
1919
fail-fast: true
2020
matrix:
21-
python-version: ['3.9', '3.11.9']
21+
python-version: ['3.9', '3.12']
2222
defaults:
2323
# by default run in bash mode (required for conda usage)
2424
run:
2525
shell: bash -l {0}
2626
steps:
2727

2828
- name: Checkout repository
29-
uses: actions/checkout@v3
29+
uses: actions/checkout@v4
3030

3131
- name: Get current year-month
3232
id: date
@@ -38,7 +38,7 @@ jobs:
3838
run: |
3939
echo "dataset_hash=$(git ls-remote https://gin.g-node.org/NeuralEnsemble/ephy_testing_data.git HEAD | cut -f1)" >> $GITHUB_OUTPUT
4040
41-
- uses: actions/cache/restore@v3
41+
- uses: actions/cache/restore@v4
4242
# Loading cache of ephys_testing_dataset
4343
id: cache-datasets
4444
with:
@@ -48,7 +48,7 @@ jobs:
4848

4949
- uses: conda-incubator/setup-miniconda@v3
5050
with:
51-
activate-environment: neo-test-env
51+
activate-environment: neo-test-env-${{ matrix.python-version }}
5252
python-version: "${{ matrix.python-version }}"
5353

5454
- name: Get current dependencies hash
@@ -62,7 +62,7 @@ jobs:
6262
# * when package dependencies change
6363
id: cache-conda-env
6464
with:
65-
path: /usr/share/miniconda/envs/neo-test-env
65+
path: /usr/share/miniconda/envs/neo-test-env-${{ matrix.python-version }}
6666
key: ${{ runner.os }}-conda-env-${{ steps.dependencies.outputs.hash }}-${{ steps.date.outputs.date }}
6767
# restore-keys match any key that starts with the restore-key
6868
restore-keys: |
@@ -74,8 +74,7 @@ jobs:
7474
# restore-key hits should result in `cache-hit` == 'false'
7575
if: steps.cache-conda-env.outputs.cache-hit != 'true'
7676
run: |
77-
conda env update --name neo-test-env --file environment_testing.yml --prune
78-
conda install python=${{ matrix.python-version }}
77+
conda env update --name neo-test-env-${{ matrix.python-version }} --file environment_testing.yml --prune
7978
8079
- name: Configure git
8180
run: |

README.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,13 @@ A project with similar aims but for neuroimaging file formats is `NiBabel`_.
3131
Code status
3232
-----------
3333

34+
.. image:: https://img.shields.io/pypi/v/neo.svg
35+
:target: https://pypi.python.org/pypi/neo
36+
:alt: PyPI Release Version
3437
.. image:: https://github.com/NeuralEnsemble/python-neo/actions/workflows/core-test.yml/badge.svg?event=push&branch=master
3538
:target: https://github.com/NeuralEnsemble/python-neo/actions?query=event%3Apush+branch%3Amaster
3639
:alt: Core Test Status (Github Actions)
37-
.. image:: https://github.com/NeuralEnsemble/python-neo/actions/workflows/io-test.yml/badge.svg?event=push&branch=master
40+
.. image:: https://github.com/NeuralEnsemble/python-neo/actions/workflows/io-test_trigger.yml/badge.svg?event=push&branch=master
3841
:target: https://github.com/NeuralEnsemble/python-neo/actions?query=event%3Apush+branch%3Amaster
3942
:alt: IO Test Status (Github Actions)
4043
.. image:: https://coveralls.io/repos/NeuralEnsemble/python-neo/badge.png

environment_testing.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@ 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

neo/core/spiketrain.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -979,7 +979,7 @@ def _merge_array_annotations(self, others, sorting=None):
979979

980980
omitted_keys_other = [
981981
key
982-
for key in np.unique([key for other in others for key in other.array_annotations])
982+
for key in set([key for other in others for key in other.array_annotations])
983983
if key not in self.array_annotations
984984
]
985985

neo/io/nwbio.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ def _write_block(self, block):
495495
if segment.block is not block:
496496
raise TypeError(f"segment.block must be block it is {segment.block}")
497497
if not segment.name:
498-
segment.name = f"{block.name} : segment{i}"
498+
segment.name = f"{block.name} segment{i}"
499499
self._write_segment(self._nwbfile, segment, electrodes)
500500
self.blocks_written += 1
501501

@@ -529,14 +529,14 @@ def _write_segment(self, nwbfile, segment, electrodes):
529529
signal.name = f"{segment.name} {signal.name} {i}"
530530
logging.warning(f"Warning signal name exists. New name: {signal.name}")
531531
else:
532-
signal.name = f"{segment.name} : analogsignal{signal.name} {i}"
532+
signal.name = f"{segment.name} analogsignal{signal.name} {i}"
533533
self._write_signal(self._nwbfile, signal, electrodes)
534534

535535
for i, train in enumerate(segment.spiketrains):
536536
if train.segment is not segment:
537537
raise TypeError(f"train.segment must be segment and is {train.segment}")
538538
if not train.name:
539-
train.name = f"{segment.name} : spiketrain{i}"
539+
train.name = f"{segment.name} spiketrain{i}"
540540
self._write_spiketrain(self._nwbfile, train)
541541

542542
for i, event in enumerate(segment.events):
@@ -546,12 +546,12 @@ def _write_segment(self, nwbfile, segment, electrodes):
546546
event.name = f"{segment.name} {event.name} {i}"
547547
logging.warning(f"Warning event name exists. New name: {event.name}")
548548
else:
549-
event.name = f"{segment.name} : event{event.name} {i}"
549+
event.name = f"{segment.name} event{event.name} {i}"
550550
self._write_event(self._nwbfile, event)
551551

552552
for i, epoch in enumerate(segment.epochs):
553553
if not epoch.name:
554-
epoch.name = f"{segment.name} : epoch{i}"
554+
epoch.name = f"{segment.name} epoch{i}"
555555
self._write_epoch(self._nwbfile, epoch)
556556

557557
def _write_signal(self, nwbfile, signal, electrodes):

neo/rawio/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* :attr:`MicromedRawIO`
3030
* :attr:`NeuralynxRawIO`
3131
* :attr:`NeuroExplorerRawIO`
32-
* :attr:`NeuroNexusRawIO
32+
* :attr:`NeuroNexusRawIO`
3333
* :attr:`NeuroScopeRawIO`
3434
* :attr:`NIXRawIO`
3535
* :attr:`OpenEphysRawIO`

0 commit comments

Comments
 (0)