-
Notifications
You must be signed in to change notification settings - Fork 47
Improve interaction with probeinterface-library #364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
alejoe91
wants to merge
13
commits into
SpikeInterface:main
Choose a base branch
from
alejoe91:update-get-probe
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+342
−39
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
b064adc
Improve interaction with probeinterface-library
alejoe91 fc4d1bf
Add requests as requirement
alejoe91 11ddb96
Add tests
alejoe91 ddabe5c
remove unused function
alejoe91 4f9315d
Add tag to get_probe and cache and use GITHUB_TOKEN
alejoe91 03f93f9
Add latest_commit.txt
alejoe91 81968b8
Fix tests
alejoe91 965ccb0
Remove latest_commit mechanism and add cache_full_library
alejoe91 9f0f893
Move remove_from_cache to tests
alejoe91 d786a00
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] a98629b
Clean up docs and add list_all_probes function
alejoe91 b8f56c8
Merge branch 'update-get-probe' of github.com:alejoe91/probeinterface…
alejoe91 f1defdb
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ classifiers = [ | |
dependencies = [ | ||
"numpy", | ||
"packaging", | ||
"requests" | ||
] | ||
|
||
[project.urls] | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.