Skip to content

Commit

Permalink
Merge pull request #191 from h-mayorquin/format_black
Browse files Browse the repository at this point in the history
Move to src structure and pre-commit format
  • Loading branch information
alejoe91 authored Jun 5, 2023
2 parents cedafaa + 60bdf3f commit 2dfc737
Show file tree
Hide file tree
Showing 53 changed files with 667 additions and 670 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/full_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
file: ./coverage.xml
file: ./coverage.xml
4 changes: 2 additions & 2 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: "3.10"
- name: Install Tools
run: |
python -m pip install --upgrade pip
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ doc/examples/*

dev_*
.coverage
cov.xml
cov.xml
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build:

sphinx:
configuration: doc/conf.py

python:
version: 3.8
install:
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,3 @@ Target users/projet :


Author: Samuel Garcia

29 changes: 14 additions & 15 deletions doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ Probe

.. autoclass:: probeinterface.Probe
:members:

ProbeGroup
----------

.. automodule:: probeinterface

.. autoclass:: probeinterface.ProbeGroup
:members:

Expand All @@ -27,19 +27,19 @@ Import/export to formats
.. autofunction:: read_probeinterface

.. autofunction:: write_probeinterface

.. autofunction:: read_prb

.. autofunction:: write_prb

.. autofunction:: read_csv

.. autofunction:: write_csv

.. autofunction:: read_spikeglx

.. autofunction:: read_mearec

.. autofunction:: read_nwb


Expand All @@ -49,13 +49,13 @@ Probe generators
.. automodule:: probeinterface.generator

.. autofunction:: generate_dummy_probe

.. autofunction:: generate_dummy_probe_group

.. autofunction:: generate_tetrode

.. autofunction:: generate_multi_columns_probe

.. autofunction:: generate_linear_probe

Plotting
Expand All @@ -64,7 +64,7 @@ Plotting
.. automodule:: probeinterface.plotting

.. autofunction:: plot_probe

.. autofunction:: plot_probe_group

Library
Expand All @@ -73,4 +73,3 @@ Library
.. automodule:: probeinterface.library

.. autofunction:: get_probe

8 changes: 4 additions & 4 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ The :code:`probeinterface` package also provides:
* basic plotting functions with matplotlib
* input/output functions to several formats (PRB, NWB, CSV, MEArec, SpikeGLX, ...)

Here is a schema for the naming used in the package:
Here is a schema for the naming used in the package:

.. image:: img/probeinterface_naming.png
:width: 400 px



.. include:: examples/index.rst

.. toctree::
:caption: Contents:
:maxdepth: 1

overview
examples/index.rst
format_spec
Expand Down
3 changes: 0 additions & 3 deletions doc/library.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,3 @@ TODO: explain with more details
5. Ask for an account
6. Push to a branch with gin client
7. Make a pull request on the gin portal (like a github PR)



2 changes: 1 addition & 1 deletion doc/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ This package also provide:
* generator functions to create user-defined probes


Goal 1
Goal 1
---------

This common interface could be used by several projects for spike sorting and electrophysiology analysis:
Expand Down
2 changes: 1 addition & 1 deletion doc/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Release notes

.. toctree::
:maxdepth: 1

releases/0.2.16.rst
releases/0.2.15.rst
releases/0.2.14.rst
Expand Down
1 change: 0 additions & 1 deletion doc/releases/0.1.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ probeinterface 0.1.0
11th jan 2021

Initial release.

1 change: 0 additions & 1 deletion doc/releases/0.2.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ probeinterface 0.2.0
March, 2 2021

Format improvement with all ids in str.

1 change: 0 additions & 1 deletion doc/releases/0.2.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ March, 24 2021
* to_numpy()/from_numpy()
* to_dataframe()/from_dataframe()
* read_mearec

2 changes: 1 addition & 1 deletion doc/releases/0.2.10.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ September, 1st 2022
* implement read_imro() / write_imro()
* Add new wiring : 'ASSY-77>Adpt.A64-Om32_2x-sm>two_RHD2132'
* Handle OpenEphys NPIX with multiple probes
* Add cross-checked ASSY-116>RHD2132 mapping
* Add cross-checked ASSY-116>RHD2132 mapping
8 changes: 4 additions & 4 deletions doc/releases/0.2.14.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ October, 27th 2022
* Fix a **important bug** in :code:`read_spikeglx()` / :code:`read_imro()` that was leading
to wrong contact locations when the Imec Readout Table (aka imRo)
was set with complex multi-bank patterns.
The bug was introduced with version **0.2.10**, released on September 1st 2022, and it is also present in these
The bug was introduced with version **0.2.10**, released on September 1st 2022, and it is also present in these
versions: **0.2.10**, **0.2.11**, **0.2.12**, and **0.2.13**.

**If you used spikeinterface/probeinterface with SpikeGLX data using one of these versions, we recommend you
to check your contact positions (if they are non-standard - using the probe tip) and re-run your spike-sorting
**If you used spikeinterface/probeinterface with SpikeGLX data using one of these versions, we recommend you
to check your contact positions (if they are non-standard - using the probe tip) and re-run your spike-sorting
analysis if they are wrong.**

A big thanks to Tom Bugnon and Graham Findlay for
A big thanks to Tom Bugnon and Graham Findlay for
`spotting the bug <https://github.com/SpikeInterface/probeinterface/issues/141>`_.
1 change: 0 additions & 1 deletion doc/releases/0.2.2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ April, 4 2021
* write_prb handle group_mode
* add wriring RDH2164
* doc improvement

2 changes: 0 additions & 2 deletions doc/releases/0.2.3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ May, 21 2021
* add a pathway
* show_channel_on_click
* debug read_mearec()


1 change: 0 additions & 1 deletion doc/releases/0.2.4.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ July, 30 2021
* expose read_maxwell function
* vector annotations
* changes to BIDS format

1 change: 0 additions & 1 deletion doc/releases/0.2.5.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ September, 14 2021

* vector annotations added to numpy representation
* add "electrode" to annotations from read_maxwell

2 changes: 0 additions & 2 deletions doc/releases/0.2.6.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ November, 26 2021
* documention improvement
* spikeglx neuropixel2 integration
* plotting improvement


4 changes: 1 addition & 3 deletions doc/releases/0.2.7.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,4 @@ probeinterface 0.2.7
March, 1 2022

* add read_3brain to io
* annotate spikeGLX with probe version


* annotate spikeGLX with probe version
5 changes: 1 addition & 4 deletions doc/releases/0.2.8.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,4 @@ March, 23rd 2022
* expose function select_dimensions (2d>3d and 3d>2d)
* add to_dict/from_dict in ProbeGroup
* Add "text_on_contact" in plot_probe()
* Add read_openephys function for Neuropux-PXI plugin



* Add read_openephys function for Neuropux-PXI plugin
3 changes: 0 additions & 3 deletions examples/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,3 @@ Examples
---------------

Start here with a tutorial showing probeinterface.



2 changes: 1 addition & 1 deletion examples/ex_02_probe_2d_probe_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

##############################################################################
# Let's transform it into a 3d probe.
#
#
# Here the axes are 'xz' so y will be 0 for all contacts.
# The shape of probe_3d.contact_positions is now (n_elec, 3)

Expand Down
2 changes: 1 addition & 1 deletion examples/ex_03_generate_probe_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

##############################################################################
# Generate 2 dummy `Probe` objects with the utils function:
#
#

probe0 = generate_dummy_probe(elec_shapes='square')
probe1 = generate_dummy_probe(elec_shapes='circle')
Expand Down
2 changes: 1 addition & 1 deletion examples/ex_06_import_export_to_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* PRB (.prb) : used by klusta/spyking-circus/tridesclous
* CSV (.csv): 2 or 3 columns locations in text file
* mearec (.h5) : mearec handles the geometry
* mearec (.h5) : mearec handles the geometry
* spikeglx (.meta) : spikeglx also handles the geometry
"""
Expand Down
8 changes: 4 additions & 4 deletions examples/ex_07_probe_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

##############################################################################
# Generate 4 tetrodes:
#
#

from probeinterface import generate_tetrode

Expand All @@ -39,7 +39,7 @@

##############################################################################
# Generate a linear probe:
#
#

from probeinterface import generate_linear_probe

Expand All @@ -48,7 +48,7 @@

##############################################################################
# Generate a multi-column probe:
#
#

from probeinterface import generate_multi_columns_probe

Expand All @@ -61,7 +61,7 @@

##############################################################################
# Generate a square probe:
#
#

square_probe = generate_multi_columns_probe(num_columns=12,
num_contact_per_column=12,
Expand Down
4 changes: 2 additions & 2 deletions examples/ex_11_automatic_wiring.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
##############################################################################
# We can "wire" this probe to a recording device.
# Imagine we connect this Neuronexus probe with an Omnetic to an Intan RHD headstage.
#
#
# Using the wiring documentation from these two sites:
# https://neuronexus.com/wp-content/uploads/2018/09/Wiring_H32.pdf
# http://intantech.com/RHD_headstages.html?tabSelect=RHD32ch&yPos=0
#
#
# After a long headache we can figure out the wiring to the device manually and set it
# using the `probe.set_device_channel_indices()` function:

Expand Down
22 changes: 0 additions & 22 deletions probeinterface/__init__.py

This file was deleted.

8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ build-backend = "setuptools.build_meta"

[tool.setuptools]
packages = ["probeinterface"]
package-dir = {"probeinterface" = "probeinterface"}
package-dir = {"probeinterface" = "src/probeinterface"}


[project.optional-dependencies]
Expand All @@ -58,4 +58,8 @@ docs = [
[tool.coverage.run]
omit = [
"tests/*",
]
]


[tool.black]
line-length = 120
Loading

0 comments on commit 2dfc737

Please sign in to comment.