diff --git a/doc/development/development.rst b/doc/development/development.rst index 1638c41243..7e6cbc059f 100644 --- a/doc/development/development.rst +++ b/doc/development/development.rst @@ -61,7 +61,7 @@ for the :code:`spikeinterface.extractors` module, you can use the following comm The markers are located in the :code:`pyproject.toml` file in the root of the repository. -Note that you should install the package before running the tests. You can do this by running the following command: +Note that you should install spikeinterface before running the tests. You can do this by running the following command: .. code-block:: bash @@ -72,7 +72,7 @@ You can change the :code:`[test,extractors,full]` to install only the dependenci The specific environment for the CI is specified in the :code:`.github/actions/build-test-environment/action.yml` and you can find the full tests in the :code:`.github/workflows/full_test.yml` file. -The extractor tests require datalad for some of the tests. Here are instructions for installing datalad: +Some of the extractor tests require datalad. Here are instructions for installing datalad: Installing Datalad ------------------ @@ -87,13 +87,13 @@ Stylistic conventions SpikeInterface maintains a consistent coding style across the project. This helps to ensure readability and maintainability of the code, making it easier for contributors to collaborate. To facilitate code style -for the developer we use the follwing tools and conventions: +for the developer we use the following tools and conventions: Install Black and pre-commit ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -We use the python formatter Black, with defaults set in the :code:`pyproject.toml`. This allows for +We use the Python formatter Black, with defaults set in the :code:`pyproject.toml`. This allows for easy local formatting of code. To install Black, you can use pip, the Python package installer. Run the following command in your terminal: @@ -218,7 +218,7 @@ Adding new documentation Documentation can be added as a `sphinx-gallery `_ -python file ('tutorials') +Python file ('tutorials') or a `sphinx rst `_ file (all other sections). @@ -242,7 +242,7 @@ To run code coverage locally, you can use the following command: This will run the tests and generate a report in the :code:`htmlcov` folder. You can open the :code:`index.html` file in your browser to see the report. -Note, however, that the running time of the command above will be slow. If you want to run the tests for a specific module, you can use the following command: +Note, however, that the running time of the command above will be quite long. If you want to run the tests for a specific module, you can use the following command: .. code-block:: bash @@ -252,7 +252,7 @@ Implement a new extractor ------------------------- SpikeInterface already supports over 30 file formats, but the acquisition system you use might not be among the -supported formats list (***ref***). Most of the extractors rely on the `NEO `_ +supported formats list (****ref****). Most of the extractors rely on the `NEO `_ package to read information from files. Therefore, to implement a new extractor to handle the unsupported format, we recommend making a new :code:`neo.rawio.BaseRawIO` class (see `example `_). Once that is done, the new class can be easily wrapped into SpikeInterface as an extension of the @@ -260,13 +260,13 @@ Once that is done, the new class can be easily wrapped into SpikeInterface as an (for :py:class:`~spikeinterface.core.BaseRecording` objects) or :py:class:`~spikeinterface.extractors.neoextractors.neobaseextractors.NeoBaseRecordingExtractor` (for :py:class:`~spikeinterface.core.BaseSorting` objects) or with a few lines of -code (e.g., see reader for `SpikeGLX `_ -or `Neuralynx `_). +code (e.g., see reader for `SpikeGLX `_ +or `Neuralynx `_). -**NOTE:** implementing a `neo.rawio` Class is not required, but recommended. Several extractors (especially) for :code:`Sorting` +**NOTE:** implementing a `neo.rawio` class is not required, but recommended. Several extractors (especially) for :code:`Sorting` objects are implemented directly in SpikeInterface and inherit from the base classes. -As examples, see the `CompressedBinaryIblExtractor `_ -for a :py:class:`~spikeinterface.core.BaseRecording` object, or the `SpykingCircusSortingExtractor `_ +As examples, see the `IblRecordingExtractor `_ +for a :py:class:`~spikeinterface.core.BaseRecording` object, or the `SpykingCircusSortingExtractor `_ for a a :py:class:`~spikeinterface.core.BaseSorting` object. @@ -309,7 +309,7 @@ Then, you can start creating a new class: class MySpikeSorter(BaseSorter): """ - Brief description (optional) + Brief description """ sorter_name = 'myspikesorter' @@ -367,7 +367,7 @@ Now you can start filling out the required methods: def _check_apply_filter_in_params(cls, params): return False - #  optional + # optional # can be implemented in subclass to check if the filter will be applied @@ -388,10 +388,12 @@ Now you can start filling out the required methods: return sorting When your spike sorter class is implemented, you have to add it to the list of available spike sorters in the -`sorterlist.py`. Then you need to write a test in **tests/test_myspikesorter.py**. In order to be tested, you can -install the required packages by changing the **pyproject.toml**. Note that MATLAB based tests cannot be run at the moment, -but we recommend testing the implementation locally. +`sorterlist.py `_ . +Then you need to write a test in **tests/test_myspikesorter.py**. In order to be tested, you can +install the required packages by changing the `pyproject.toml `_. +Note that MATLAB based tests cannot be run at the moment,but we recommend testing the implementation locally. -After this you need to add a block in **doc/sorters_info.rst** to describe your sorter. +After this you need to add a block in `Install Sorters `_ +to describe your sorter. Finally, make a pull request so we can review the code and incorporate into the sorters module of SpikeInterface!