Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/full_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,8 @@ jobs:
pip install .[test]
- name: Pytest
run: |
pytest -v
pytest -m "not library" -v
- name: Pytest library tests
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
pytest -m library -v
55 changes: 43 additions & 12 deletions doc/library.rst
Original file line number Diff line number Diff line change
@@ -1,27 +1,58 @@
Probeinterface public library
=============================

Probeinterface also handles a collection of probe descriptions on the
`GitHub platform <https://github.com/SpikeInterface/probeinterface_library>`_
Probeinterface also handles a collection of probe descriptions in the
`ProbeInterface library <https://github.com/SpikeInterface/probeinterface_library>`_

The python module has a simple function to download and cache locally by using `get_probe(...)` ::
The python module has a simple function to download and cache locally by using ``get_probe(...)``:


.. code-block:: python

from probeinterface import get_probe
probe = get_probe(manufacturer='neuronexus',
probe_name='A1x32-Poly3-10mm-50-177')
probe = get_probe(
manufacturer='neuronexus',
probe_name='A1x32-Poly3-10mm-50-177'
)


Once a probe is downloaded, it is cached locally for future use.

There are several helper functions to explore the library:

.. code-block:: python

from probeinterface.library import (
list_manufacturers,
list_probes_by_manufacturer,
list_all_probes
)

# List all manufacturers
manufacturers = list_manufacturers()

# List all probes for a given manufacturer
probes = list_probes_by_manufacturer('neuronexus')

# List all probes in the library
all_probes = list_all_probes()

# Cache all probes locally
cache_full_library()


Each function has an optional ``tag`` argument to specify a git tag/branch/commit to get a specific version of the library.

We expect to build rapidly commonly used probes in this public repository.

How to contribute
-----------------
How to contribute to the library
--------------------------------

TODO: explain with more details
Each probe in the library is represented by a JSON file and an image.
To contribute a new probe to the library, follow these steps:

1. Generate the JSON file with probeinterface (or directly
with another language)
1. Generate the JSON file with probeinterface (or directly with another language)
2. Generate an image of the probe with the `plot_probe` function in probeinterface
3. Clone the `probeinterface_library repo <https://github.com/SpikeInterface/probeinterface_library>`_
4. Put the JSON file and image into the correct folder or make a new folder (following the format of the repo)
4. Put the JSON file and image into the correct folder: ``probeinterface_library/<manufacturer>/<model_name>/```
5. Push to one of your branches with a git client
6. Make a pull request to the main repo
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ classifiers = [
dependencies = [
"numpy",
"packaging",
"requests"
]

[project.urls]
Expand Down Expand Up @@ -57,6 +58,11 @@ docs = [
"pandas",
]

[tool.pytest.ini_options]
markers = [
"library",
]

[tool.coverage.run]
omit = [
"tests/*",
Expand Down
10 changes: 9 additions & 1 deletion src/probeinterface/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,13 @@
generate_multi_columns_probe,
generate_multi_shank,
)
from .library import get_probe
from .library import (
get_probe,
list_manufacturers,
list_probes_by_manufacturer,
list_all_probes,
get_tags_in_library,
cache_full_library,
clear_cache,
)
from .wiring import get_available_pathways
Loading