Skip to content

Commit fa33982

Browse files
committed
Merge branch 'main' of github.com:SpikeInterface/probeinterface into update-get-probe
2 parents f1defdb + 44baa04 commit fa33982

24 files changed

+3497
-166
lines changed

.github/workflows/codespell.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Codespell configuration is within pyproject.toml
2+
---
3+
name: Codespell
4+
5+
on:
6+
push:
7+
branches: [main]
8+
pull_request:
9+
branches: [main]
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
codespell:
16+
name: Check for spelling errors
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
- name: Annotate locations with typos
23+
uses: codespell-project/codespell-problem-matcher@v1
24+
- name: Codespell
25+
uses: codespell-project/actions-codespell@v2

.github/workflows/full_tests.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Test on Ubuntu
1+
name: Complete tests
22

33
on:
44
pull_request:
@@ -12,8 +12,13 @@ on:
1212
jobs:
1313
build-and-test:
1414

15-
runs-on: ubuntu-latest
16-
15+
name: ${{ matrix.os }} Python ${{ matrix.python-version }}
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
python-version: ["3.9", "3.14"] # Lower and higher versions we support
21+
os: [macos-latest, windows-latest, ubuntu-latest]
1722
steps:
1823
- uses: actions/checkout@v4
1924
- name: Set up Python
@@ -26,9 +31,4 @@ jobs:
2631
pip install .[test]
2732
- name: Pytest
2833
run: |
29-
pytest --cov=probeinterface --cov-report xml:./coverage.xml
30-
- uses: codecov/codecov-action@v4
31-
with:
32-
token: ${{ secrets.CODECOV_TOKEN }}
33-
fail_ci_if_error: true
34-
file: ./coverage.xml
34+
pytest -v
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Test with Codecov
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 12 * * *" # Daily at noon UTC
7+
8+
9+
jobs:
10+
build-and-test:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Set up Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: "3.11"
20+
- name: Install package
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install .[test]
24+
- name: Pytest
25+
run: |
26+
pytest --cov=probeinterface --cov-report xml:./coverage.xml
27+
- uses: codecov/codecov-action@v4
28+
with:
29+
token: ${{ secrets.CODECOV_TOKEN }}
30+
fail_ci_if_error: true
31+
file: ./coverage.xml

.pre-commit-config.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,16 @@ repos:
55
- id: check-yaml
66
- id: end-of-file-fixer
77
- id: trailing-whitespace
8-
- repo: https://github.com/psf/black
8+
- repo: https://github.com/psf/black-pre-commit-mirror
99
rev: 25.9.0
1010
hooks:
1111
- id: black
1212
files: ^src/|^tests/
13+
- repo: https://github.com/codespell-project/codespell
14+
# Configuration for codespell is in .pre-commit-config.yaml
15+
rev: v2.4.1
16+
hooks:
17+
- id: codespell
18+
additional_dependencies:
19+
- tomli # for python_version < '3.11'
20+
exclude: ^doc/releases/.*\.rst

pyproject.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ authors = [
88

99
description = "Python package to handle probe layout, geometry and wiring to device."
1010
readme = "README.md"
11-
requires-python = ">=3.8"
11+
requires-python = ">=3.9"
1212
classifiers = [
1313
"Programming Language :: Python :: 3",
1414
"License :: OSI Approved :: MIT License",
@@ -66,3 +66,10 @@ omit = [
6666

6767
[tool.black]
6868
line-length = 120
69+
70+
[tool.codespell]
71+
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
72+
skip = '.git*,*.pdf,*.svg,data,./doc/releases'
73+
check-hidden = true
74+
# ignore-regex = ''
75+
ignore-words-list = 'compiletime'

resources/generate_cambridgeneurotech_libray.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
The script have been modified by Smauel Garcia (samuel.garcia@cnrs.fr):
99
* more pytonic
1010
* improve code readability
11-
* not more channel_device_index the order is the conatct index
11+
* not more channel_device_index the order is the contact index
1212
* simpler function for plotting.
1313
1414
2021-04-02
@@ -72,7 +72,7 @@
7272

7373
def convert_probe_shape(listCoord):
7474
'''
75-
This is to convert reference point probe shape inputed in excel
75+
This is to convert reference point probe shape inputted in excel
7676
as string 'x y x y x y that outline the shape of one shanck
7777
and can be converted to an array to draw the porbe
7878
'''
@@ -95,7 +95,7 @@ def get_contact_order(connector, probe_type):
9595
This will help to re-order the probe contact later on.
9696
"""
9797

98-
# first part of the function to opne the proper connector based on connector name
98+
# first part of the function to open the proper connector based on connector name
9999

100100
# header [0,1] is used to create a mutliindex
101101
df = pd.read_excel(probe_map_file, sheet_name=connector, header=[0,1])
@@ -188,7 +188,7 @@ def generate_CN_multi_shank(probe_info):
188188

189189
def create_CN_figure(probe_name, probe):
190190
"""
191-
Create custum figire for CN with custum colors + logo
191+
Create custom figire for CN with custom colors + logo
192192
"""
193193
fig, ax = plt.subplots()
194194
fig.set_size_inches(18.5, 10.5)

resources/generate_neuropixels_library.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def generate_all_npx():
5151

5252
probe = _make_npx_probe_from_description(pt_metadata, model_name, elec_ids, shank_ids)
5353

54-
# ploting
54+
# plotting
5555
fig, axs = plt.subplots(ncols=2)
5656

5757
ax = axs[0]

src/probeinterface/io.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ def read_csv(file: str | Path):
728728

729729
def write_csv(file, probe):
730730
"""
731-
Write contact postions into a 2 or 3 columns csv file
731+
Write contact positions into a 2 or 3 columns csv file
732732
"""
733733

734734
raise NotImplementedError

0 commit comments

Comments
 (0)