Skip to content

Commit 0734b31

Browse files
Merge branch 'master' into refactor_spikeglx
2 parents a10edc2 + f62bd73 commit 0734b31

Some content is hidden

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

64 files changed

+381
-316
lines changed

.github/workflows/core-test.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,20 @@ jobs:
1919
fail-fast: true
2020
matrix:
2121
os: ["ubuntu-latest", "windows-latest"]
22-
# "macos-latest",
23-
python-version: ['3.7', '3.8', '3.9']
24-
numpy-version: ['1.16.6', '1.17.5', '1.18.5', '1.19.5', '1.20.3', '1.21.5', '1.22.3']
22+
# "macos-latest",
23+
python-version: ['3.7', '3.8', '3.9', '3.10']
24+
numpy-version: ['1.18.5', '1.19.5', '1.20.3', '1.21.6', '1.22.4', '1.23.0']
2525
exclude:
2626
- python-version: '3.7'
27-
numpy-version: '1.22.3'
28-
27+
numpy-version: '1.22.4'
28+
- python-version: '3.7'
29+
numpy-version: '1.23.0'
30+
- python-version: '3.10'
31+
numpy-version: '1.18.5'
32+
- python-version: '3.10'
33+
numpy-version: '1.19.5'
34+
- python-version: '3.10'
35+
numpy-version: '1.20.3'
2936
steps:
3037
- name: Set up Python ${{ matrix.python-version }}
3138
uses: actions/setup-python@v2

README.rst

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

34-
.. image:: https://travis-ci.org/NeuralEnsemble/python-neo.png?branch=master
35-
:target: https://travis-ci.org/NeuralEnsemble/python-neo
36-
:alt: Core Unit Test Status (TravisCI)
37-
.. image:: https://github.com/NeuralEnsemble/python-neo/actions/workflows/full-test.yml/badge.svg?event=push&branch=master
34+
.. image:: https://github.com/NeuralEnsemble/python-neo/actions/workflows/core-test.yml/badge.svg?event=push&branch=master
3835
:target: https://github.com/NeuralEnsemble/python-neo/actions?query=event%3Apush+branch%3Amaster
39-
:alt: IO Unit Test Status (Github Actions)
36+
: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
38+
:target: https://github.com/NeuralEnsemble/python-neo/actions?query=event%3Apush+branch%3Amaster
39+
:alt: IO Test Status (Github Actions)
4040
.. image:: https://coveralls.io/repos/NeuralEnsemble/python-neo/badge.png
4141
:target: https://coveralls.io/r/NeuralEnsemble/python-neo
4242
:alt: Unit Test Coverage

doc/source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
import os
1515
import sys
1616

17-
from distutils.version import LooseVersion
17+
from packaging.version import Version
1818

1919
with open("../../neo/version.py") as fp:
2020
d = {}
2121
exec(fp.read(), d)
2222
neo_release = d['version']
2323

24-
neo_version = '.'.join(str(e) for e in LooseVersion(neo_release).version[:2])
24+
neo_version = '.'.join((str(e) for e in Version(neo_release).release[:2]))
2525

2626

2727
AUTHORS = 'Neo authors and contributors <[email protected]>'

doc/source/core.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Container objects
3131

3232
There is a simple hierarchy of containers:
3333

34-
* :py:class:`Segment`: A container for heterogeneous discrete or continous data sharing a common
34+
* :py:class:`Segment`: A container for heterogeneous discrete or continuous data sharing a common
3535
clock (time basis) but not necessarily the same sampling rate, start time or end time.
3636
A :py:class:`Segment` can be considered as equivalent to a "trial", "episode", "run",
3737
"recording", etc., depending on the experimental context.
@@ -165,7 +165,7 @@ the channels on which that neuron spiked::
165165
# ...
166166

167167

168-
Now each putative neuron is represented by a :class:`Group` containing the spiktrains of that neuron
168+
Now each putative neuron is represented by a :class:`Group` containing the spiketrains of that neuron
169169
and a view of the signal selecting only those channels from which the spikes were obtained.
170170

171171

doc/source/developers_guide.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ a GitHub account and then set to watch the repository at `GitHub Repository`_
3838
Requirements
3939
------------
4040

41-
* Python_ 3.5 or later
41+
* Python_ 3.7 or later
4242
* numpy_ >= 1.11.0
4343
* quantities_ >= 0.12.1
4444
* nose_ >= 1.1.2 (for running tests)
@@ -193,15 +193,15 @@ open a pull request on GitHub
193193
Python version
194194
--------------
195195

196-
Neo should work with Python 3.5 or newer. If you need support for Python 2.7,
196+
Neo should work with Python 3.7 or newer. If you need support for Python 2.7,
197197
use Neo v0.8.0 or earlier.
198198

199199

200200
Coding standards and style
201201
--------------------------
202202

203203
All code should conform as much as possible to `PEP 8`_, and should run with
204-
Python 3.5 or newer.
204+
Python 3.7 or newer.
205205

206206
You can use the `pep8`_ program to check the code for PEP 8 conformity.
207207
You can also use `flake8`_, which combines pep8 and pyflakes.

doc/source/grouping.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,5 +149,5 @@ Using :class:`ChannelView` and :class:`Group`::
149149
block.groups.extend(units)
150150

151151

152-
Now each putative neuron is represented by a :class:`Group` containing the spiktrains of that neuron
152+
Now each putative neuron is represented by a :class:`Group` containing the spiketrains of that neuron
153153
and a view of the signal selecting only those channels from which the spikes were obtained.

doc/source/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ writing to a subset of these formats plus non-proprietary formats including Kwik
1111
The goal of Neo is to improve interoperability between Python tools for
1212
analyzing, visualizing and generating electrophysiology data, by providing a common,
1313
shared object model. In order to be as lightweight a dependency as possible,
14-
Neo is deliberately limited to represention of data, with no functions for data
14+
Neo is deliberately limited to representation of data, with no functions for data
1515
analysis or visualization.
1616

1717
Neo is used by a number of other software tools, including
@@ -53,7 +53,7 @@ Documentation
5353
License
5454
-------
5555

56-
Neo is free software, distributed under a 3-clause Revised BSD licence (BSD-3-Clause).
56+
Neo is free software, distributed under a 3-clause Revised BSD license (BSD-3-Clause).
5757

5858

5959
Support

doc/source/install.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Dependencies
1212
------------
1313

1414
* Python_ >= 3.7
15-
* numpy_ >= 1.16.1
15+
* numpy_ >= 1.18.5
1616
* quantities_ >= 0.12.1
1717

1818
You can install the latest published version of Neo and its dependencies using::

doc/source/io.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ to a more standard format when you want to share/collaborate.
2525
Introduction
2626
============
2727

28-
There is an intrinsic structure in the different Neo objects, that could be seen as a hierachy with cross-links. See :doc:`core`.
28+
There is an intrinsic structure in the different Neo objects, that could be seen as a hierarchy with cross-links. See :doc:`core`.
2929
The highest level object is the :class:`Block` object, which is the high level container able to encapsulate all the others.
3030

3131
A :class:`Block` has therefore a list of :class:`Segment` objects, that can, in some file formats, be accessed individually.
3232
Depending on the file format, i.e. if it is streamable or not, the whole :class:`Block` may need to be loaded, but sometimes
3333
particular :class:`Segment` objects can be accessed individually.
34-
Within a :class:`Segment`, the same hierarchical organisation applies.
34+
Within a :class:`Segment`, the same hierarchical organization applies.
3535
A :class:`Segment` embeds several objects, such as :class:`SpikeTrain`,
3636
:class:`AnalogSignal`, :class:`IrregularlySampledSignal`, :class:`Epoch`, :class:`Event`
3737
(basically, all the different Neo objects).
@@ -63,7 +63,7 @@ An IO module can be based on a single file, a directory containing files, or a d
6363
This is described in the :attr:`mode` attribute of the IO class.
6464

6565
>>> from neo.io import MyFormatIO
66-
>>> print MyFormatIO.mode
66+
>>> print(MyFormatIO.mode)
6767
'file'
6868

6969

@@ -105,7 +105,7 @@ The first element of the previous list is the highest level for reading the file
105105
All IOs have a read() method that returns a list of :class:`Block` objects (representing the whole content of the file)::
106106

107107
>>> bl = reader.read()
108-
>>> print bl[0].segments[0]
108+
>>> print(bl[0].segments[0])
109109
neo.core.Segment
110110

111111

@@ -114,7 +114,7 @@ Read a time slice of Segment
114114

115115
Some objects support the ``time_slice`` argument in ``read_segment()``.
116116
This is useful to read only a subset of a dataset clipped in time.
117-
By default ``time_slice=None`` meaning load eveything.
117+
By default ``time_slice=None`` meaning load everything.
118118

119119
This reads everything::
120120

@@ -132,7 +132,7 @@ Lazy option and proxy objects
132132

133133
In some cases you may not want to load everything in memory because it could be too big.
134134
For this scenario, some IOs implement ``lazy=True/False``.
135-
Since neo 0.7, a new lazy sytem have been added for some IO modules (all IO classes that inherit from rawio).
135+
Since neo 0.7, a new lazy system has been added for some IO modules (all IO classes that inherit from rawio).
136136
To know if a class supports lazy mode use ``ClassIO.support_lazy``.
137137

138138
With ``lazy=True`` all data objects (AnalogSignal/SpikeTrain/Event/Epoch) are replaced by
@@ -197,7 +197,7 @@ The :mod:`neo.io` API is designed to be simple and intuitive:
197197
- each file format has an IO class (for example for Spike2 files you have a :class:`Spike2IO` class).
198198
- each IO class inherits from the :class:`BaseIO` class.
199199
- each IO class can read or write directly one or several Neo objects (for example :class:`Segment`, :class:`Block`, ...): see the :attr:`readable_objects` and :attr:`writable_objects` attributes of the IO class.
200-
- each IO class supports part of the :mod:`neo.core` hierachy, though not necessarily all of it (see :attr:`supported_objects`).
200+
- each IO class supports part of the :mod:`neo.core` hierarchy, though not necessarily all of it (see :attr:`supported_objects`).
201201
- each IO class has a :meth:`read()` method that returns a list of :class:`Block` objects. If the IO only supports :class:`Segment` reading, the list will contain one block with all segments from the file.
202202
- each IO class that supports writing has a :meth:`write()` method that takes as a parameter a list of blocks, a single block or a single segment, depending on the IO's :attr:`writable_objects`.
203203
- some IO are able to do a *lazy* load: all metadata (e.g. :attr:`sampling_rate`) are read, but not the actual numerical data.

doc/source/io_developers_guide.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Miscellaneous
3838
=============
3939

4040
* If your IO supports several versions of a format (like ABF1, ABF2), upload to the gin.g-node.org test file repository all file versions possible. (for test coverage).
41-
* :py:func:`neo.core.Block.create_many_to_one_relationship` offers a utility to complete the hierachy when all one-to-many relationships have been created.
41+
* :py:func:`neo.core.Block.create_many_to_one_relationship` offers a utility to complete the hierarchy when all one-to-many relationships have been created.
4242
* In the docstring, explain where you obtained the file format specification if it is a closed one.
4343
* If your IO is based on a database mapper, keep in mind that the returned object MUST be detached,
4444
because this object can be written to another url for copying.
@@ -51,7 +51,7 @@ Tests
5151
To use these you need to upload some sample data files at `gin-gnode`_. They will be publicly accessible for testing Neo.
5252
These tests:
5353

54-
* check the compliance with the schema: hierachy, attribute types, ...
54+
* check the compliance with the schema: hierarchy, attribute types, ...
5555
* For IO modules able to both write and read data, it compares a generated dataset with the same data after a write/read cycle.
5656

5757
The test scripts download all files from `gin-gnode`_ and stores them locally in ``/tmp/files_for_tests/``.

0 commit comments

Comments
 (0)