diff --git a/LICENSE.txt b/LICENSE.txt index d110294fe..ea95cb501 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright (c) 2010-2022, Neo authors and contributors +Copyright (c) 2010-2024, Neo authors and contributors All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/README.rst b/README.rst index 983487779..006d57128 100644 --- a/README.rst +++ b/README.rst @@ -53,7 +53,7 @@ For installation instructions, see doc/source/install.rst To cite Neo in publications, see CITATION.txt -:copyright: Copyright 2010-2022 by the Neo team, see doc/source/authors.rst. +:copyright: Copyright 2010-2024 by the Neo team, see doc/source/authors.rst. :license: 3-Clause Revised BSD License, see LICENSE.txt for details. Funding diff --git a/doc/old_stuffs/developers_guide.rst b/doc/old_stuffs/developers_guide.rst index cd42a364b..27befc2ed 100644 --- a/doc/old_stuffs/developers_guide.rst +++ b/doc/old_stuffs/developers_guide.rst @@ -248,7 +248,6 @@ The :doc:`governance` document describes how decisions about the project are tak .. _Python: https://www.python.org -.. _nose: https://nose.readthedocs.io/ .. _Setuptools: https://pypi.python.org/pypi/setuptools/ .. _tox: http://codespeak.net/tox/ .. _coverage: https://coverage.readthedocs.io/ diff --git a/doc/source/conf.py b/doc/source/conf.py index 33497a101..4abbdc257 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -55,7 +55,7 @@ # General information about the project. project = 'Neo' -copyright = '2010-2023, ' + AUTHORS +copyright = '2010-2024, ' + AUTHORS # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the diff --git a/doc/source/releases.rst b/doc/source/releases.rst index 1a299d195..d739a2c08 100644 --- a/doc/source/releases.rst +++ b/doc/source/releases.rst @@ -6,6 +6,7 @@ Release notes .. toctree:: :maxdepth: 1 + releases/0.13.0.rst releases/0.12.0.rst releases/0.11.1.rst releases/0.11.0.rst @@ -35,74 +36,75 @@ Release notes Version 0.4.0 ------------- - * added StimfitIO - * added KwikIO - * significant improvements to AxonIO, BlackrockIO, BrainwareSrcIO, NeuroshareIO, PlexonIO, Spike2IO, TdtIO, - * many test suite improvements - * Container base class +* added StimfitIO +* added KwikIO +* significant improvements to AxonIO, BlackrockIO, BrainwareSrcIO, NeuroshareIO, PlexonIO, Spike2IO, TdtIO, +* many test suite improvements +* Container base class Version 0.3.3 ------------- - * fix a bug in PlexonIO where some EventArrays only load 1 element. - * fix a bug in BrainwareSrcIo for segments with no spikes. +* fix a bug in PlexonIO where some EventArrays only load 1 element. +* fix a bug in BrainwareSrcIo for segments with no spikes. Version 0.3.2 ------------- - * cleanup of io test code, with additional helper functions and methods - * added BrainwareDamIo - * added BrainwareF32Io - * added BrainwareSrcIo +* cleanup of io test code, with additional helper functions and methods +* added BrainwareDamIo +* added BrainwareF32Io +* added BrainwareSrcIo Version 0.3.1 ------------- - * lazy/cascading improvement - * load_lazy_olbject() in neo.io added - * added NeuroscopeIO +* lazy/cascading improvement +* load_lazy_olbject() in neo.io added +* added NeuroscopeIO Version 0.3.0 ------------- - * various bug fixes in neo.io - * added ElphyIO - * SpikeTrain performance improved - * An IO class now can return a list of Block (see read_all_blocks in IOs) - * python3 compatibility improved +* various bug fixes in neo.io +* added ElphyIO +* SpikeTrain performance improved +* An IO class now can return a list of Block (see read_all_blocks in IOs) +* python3 compatibility improved Version 0.2.1 ------------- - * assorted bug fixes - * added :func:`time_slice()` method to the :class:`SpikeTrain` and :class:`AnalogSignalArray` classes. - * improvements to annotation data type handling - * added PickleIO, allowing saving Neo objects in the Python pickle format. - * added ElphyIO (see http://neuro-psi.cnrs.fr/spip.php?article943) - * added BrainVisionIO (see https://brainvision.com/) - * improvements to PlexonIO - * added :func:`merge()` method to the :class:`Block` and :class:`Segment` classes - * development was mostly moved to GitHub, although the issue tracker is still at neuralensemble.org/neo +* assorted bug fixes +* added :func:`time_slice()` method to the :class:`SpikeTrain` and :class:`AnalogSignalArray` classes. +* improvements to annotation data type handling +* added PickleIO, allowing saving Neo objects in the Python pickle format. +* added ElphyIO (see http://neuro-psi.cnrs.fr/spip.php?article943) +* added BrainVisionIO (see https://brainvision.com/) +* improvements to PlexonIO +* added :func:`merge()` method to the :class:`Block` and :class:`Segment` classes +* development was mostly moved to GitHub, although the issue tracker is still at neuralensemble.org/neo Version 0.2.0 ------------- -New features compared to neo 0.1: - * new schema more consistent. - * new objects: RecordingChannelGroup, EventArray, AnalogSignalArray, EpochArray - * Neuron is now Unit - * use the quantities_ module for everything that can have units. - * Some objects directly inherit from Quantity: SpikeTrain, AnalogSignal, AnalogSignalArray, instead of having an attribute for data. - * Attributes are classified in 3 categories: necessary, recommended, free. - * lazy and cascade keywords are added to all IOs - * Python 3 support - * better tests +New features compared to Neo 0.1: + +* new schema more consistent. +* new objects: RecordingChannelGroup, EventArray, AnalogSignalArray, EpochArray +* Neuron is now Unit +* use the quantities_ module for everything that can have units. +* Some objects directly inherit from Quantity: SpikeTrain, AnalogSignal, AnalogSignalArray, instead of having an attribute for data. +* Attributes are classified in 3 categories: necessary, recommended, free. +* lazy and cascade keywords are added to all IOs +* Python 3 support +* better tests diff --git a/doc/source/releases/0.12.0.rst b/doc/source/releases/0.12.0.rst index 5f2b5c926..f95e614f0 100644 --- a/doc/source/releases/0.12.0.rst +++ b/doc/source/releases/0.12.0.rst @@ -2,7 +2,7 @@ Neo 0.12.0 release notes ======================== -17th February 2022 +17th February 2023 .. currentmodule:: neo.io diff --git a/doc/source/releases/0.13.0.rst b/doc/source/releases/0.13.0.rst new file mode 100644 index 000000000..5ba6679f8 --- /dev/null +++ b/doc/source/releases/0.13.0.rst @@ -0,0 +1,141 @@ +======================== +Neo 0.13.0 release notes +======================== + +2nd February 2024 + + +This release of Neo sees a lot of changes and improvements, with a documentation rewrite, +final tweaks and refinements to the object model (in anticipation of a 1.0 release in the next few months), +a new approach to filtering objects of interest from complex datasets, +and a large number of bug fixes and performance improvements in IO modules. +23 people contributed to this release, which is a new record for Neo! + +See all `pull requests`_ included in this release and the `list of closed issues`_. + + +Refinements to the Neo object model +----------------------------------- + +In order to simplify the structure of Neo datasets, and make a clearer distinction between the Block-Segment-data +hierarchy and the more flexible data-grouping functionality, we no longer allow Groups to contain Segments. + +We have made the handling of RegionOfInterest subclasses consistent with :class:`ChannelView`, +i.e., just as a :class:`ChannelView` gives a view of a subset of the channels in a multi-channel :class:`AnalogSignal`, +so the :class:`RegionOfInterest`` subclasses give views of a subset of the pixels in an :class:`ImageSequence`. + +Neo now has automatic handling of relationships between objects. +In previous versions, the child-parent relationships between objects had to be handled manually, +for example when you added a :class:`SpikeTrain` to a :class:`Segment`, this created a parent-child relationship, +but the reverse child-parent relationship was not automatically created, leading to potential inconsistencies. +Now these relationships are created automatically, as the various child lists +(``Segment.spiketrains``, ``Segment.analogsignals``, ``Block.segments``, etc.) +are now represented by pseudo-list objects which take care of the book-keeping behind the scenes. + +As a convenience, all Neo containers (:class:`Block`, :class:`Segment`, :class:`Group`) +now have an :meth:`add()` method that automatically puts the object in the correct list, for example:: + + segment.add(signal1, event2, spiketrain3) + +instead of:: + + segment.analogsignals.append(signal1) + segment.events.append(event2) + segment.spiketrains.append(spiketrain3) + + +Documentation rewrite and new theme +----------------------------------- + +The Neo documentation has had a complete overhaul, +with a rewrite aimed at providing different entry points to the documentation for different_ user_ needs_, +using the Sphinx IPython extension to ensure code snippets are always up-to-date, +and a switch to the `PyData Sphinx theme`_. + +Improved filtering +------------------ + +For complex datasets, it is often necessary to extract subsets of the data from a Neo object tree by filtering +based on object types, names, and annotations. +Neo's filtering capabilities have been improved, with the addition of a new :mod:`filters` module. + +For example, suppose we have a dataset from an animal performing a behavioural task. +Our objective is to retain only the trials where the animal performed correctly, +for one of the four trial types in the experiment, and where the recordings met certain quality criteria. +Based on an annotated Neo dataset, we can extract the spike trains of interest in a single step, +without for loops or complex list comprehensions, as follows: + +.. code-block:: python + + import neo.core.filters as nf + + # ... load data, `trial` is a Segment object ... + + sua_spiketrains = trial.filter( + objects=neo.SpikeTrain, + targdict=[ + {"sua": True}, # only single-unit activity + {"electrode_reject_HFC": False}, # } exclude different types + {"electrode_reject_LFC": False}, # } of artefacts + {"electrode_reject_IFC": False}, # } or markers of poor-quality + {"noise": False}, # } recordings + {"spike_count": nf.FilterGreaterThan(10000)} # only use neurons with a sufficiently high firing rate + ] + ) + +New IO modules +-------------- + +Neo now supports MED_ format, with the new :class:`MedIO` and :class:`MedRawIO` classes. + + +Bug fixes and improvements in IO modules +---------------------------------------- + +Bug fixes and/or improvements have been made to :class:`AsciiSignalIO`, :class:`BCI2000IO`, :class:`BiocamIO`, +:class:`BlackrockIO`, :class:`IgorIO`, :class:`IntanIO`, :class:`KlustaKwikIO`, :class:`MaxwellIO`, :class:`MEArecIO`, +:class:`NeoMatlabIO`, :class:`NeuralynxIO`, :class:`NixIO`, :class:`NWBIO`, :class:`OpenEphysIO`, :class:`PlexonIO`, +:class:`Plexon2IO`, :class:`SpikeGLXIO`, and :class:`TdtIO`. + +Other changes +------------- + +- RawIO classes have a method :meth:`parse_header` that extracts all the information from the formats + and therefore is usually a computationally heavy process. + A flag ``is_header_parsed`` has now been added, to avoid re-extracting the header information + if it is already available. This can produce significant speed ups. + +- Type hints have been added to the :mod:`baseio`, :mod:`baserawio`, and :mod:`exampleio` modules, + with the aim of helping developers who wish to add a new IO module. + +- All of the code is now formatted with black_. + +- The continuous integration (CI) pipeline has been sped up. + + +Updated dependencies +-------------------- + +Neo now requires NumPy version >=1.20.3. + + +Acknowledgements +---------------- + +Thanks to Julia Sprenger, Andrew Davison, Zach McKenzie, Alessio Buccino, Moritz Alexander Kern, +Samuel Garcia, Heberto Mayorquin, Joscha Schmiedt, Daniel Crepeau, Divyansh Gupta, Nate Dolensek, +Peter N. Steinmetz, Philipp Hornauer, Robert Wolff, Jules Lebert, Kyle Johnsen, Benjamin Heasly, +Baptiste Grimaud, Cody Baker, Daniel P. Crepeau, Fernando J. Chaure, @Filipe, and Matthias Klumpp +for their contributions to this release. + +.. generated with git shortlog --since=2023-02-17 -sne then checking Github for PRs merged since the last release but with commits before then + +.. _`list of closed issues`: https://github.com/NeuralEnsemble/python-neo/issues?q=is%3Aissue+milestone%3A0.13.0+is%3Aclosed +.. _`pull requests`: https://github.com/NeuralEnsemble/python-neo/pulls?q=is%3Apr+is%3Aclosed+merged%3A%3E2023-02-17+milestone%3A0.13.0 +.. _`latest recommendations`: https://packaging.python.org/en/latest/ +.. _black: https://black.readthedocs.io +.. _`PyData Sphinx theme`: https://pydata-sphinx-theme.readthedocs.io +.. _MED: https://medformat.org +.. _different: https://neo.readthedocs.io/en/latest/read_and_analyze.html +.. _user: https://neo.readthedocs.io/en/latest/share_data.html +.. _needs: https://neo.readthedocs.io/en/latest/use_neo_as_dependency.html diff --git a/neo/test/README.txt b/neo/test/README.txt index 8b890e9a6..c0971ba69 100644 --- a/neo/test/README.txt +++ b/neo/test/README.txt @@ -2,18 +2,17 @@ To run all tests: $ python -m unittest discover -If you have nose installed: +If you have pytest installed: - $ nosetests + $ pytest To run tests from an individual file: $ python test_analogsignal.py - -(in all Python versions) +(in all Python versions) +For coverage: -For coverage -nosetests --with-coverage --cover-erase --cover-package=neo + $ pytest --cov=neo