Skip to content
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

Add initial extension #1

Merged
merged 46 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from 40 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
13ebfce
Add initial extension without tests or custom api
rly Apr 19, 2024
8b1c0a8
Merge branch 'main' into initial-extension
CodyCBakerPhD Apr 19, 2024
eb86335
Update README.md
CodyCBakerPhD Apr 19, 2024
d08b2cb
Add tests, small updates to spec
rly Apr 21, 2024
2a0d0ff
Add "in_mm", add example usage, update tests
rly Apr 21, 2024
912dcf3
Add comments
rly Apr 30, 2024
f1069e5
Delete notebooks/example.ipynb
rly Jun 1, 2024
3615ce6
Remove references to tetrodeseries
rly Jun 1, 2024
0dc40d7
Update spec/ndx-extracellular-channels.extensions.yaml
rly Jun 1, 2024
243ae09
Clarify planar_contour
rly Jun 1, 2024
58e51c6
Minor refactor, support probeinterface IO
rly Jun 1, 2024
e543220
Fix lint
rly Jun 1, 2024
952f574
Add probeinterface to dev env
rly Jun 1, 2024
8366145
Fix probeinterface import
rly Jun 1, 2024
bf90877
Add back ProbeModel.model, remove 1D contour case
rly Jun 4, 2024
b75e0dd
Update ruff config to latest recommended usage
rly Jun 4, 2024
a9bc351
Change name of device_channel
rly Jun 29, 2024
055e9f5
Rename actual_x to confirmed_x
rly Jun 29, 2024
1868478
Restructure position fields
rly Jun 30, 2024
d0d3ecc
Rearrange spec, update readme
rly Jun 30, 2024
6df9d51
Update probeinterface test
rly Jun 30, 2024
a2ec469
Apply black
rly Jun 30, 2024
89a147d
Update docstring
rly Jun 30, 2024
a87500b
Update comments
rly Jun 30, 2024
8783ed4
Update doc
rly Jun 30, 2024
bcf792c
Add asserts to test all
rly Jul 2, 2024
efa76fe
Fix probeinterface converter shape keys
rly Jul 11, 2024
7888afd
Remove print
rly Jul 11, 2024
4369cdc
Apply black, ruff, isort
rly Jul 11, 2024
80dd349
Make contact required, minor other fixes
rly Jul 12, 2024
b294ba2
Improve eseries api for unit, fix value to microvolts
rly Jul 12, 2024
62a3ae5
Make plane_axes realistic
rly Jul 12, 2024
c8da35f
Fix
rly Jul 12, 2024
e45e439
Fix mermaid typo
rly Jul 12, 2024
7559c91
Fix mermaid typo
rly Jul 12, 2024
6b50524
Apply suggestions from code review
rly Jul 19, 2024
55eb79a
"reference_mode" -> "electrical_reference_mode"
rly Jul 19, 2024
93d3385
Add "ground", rename "electrical_reference_description"
rly Jul 19, 2024
ec02359
Remove "device_channel" from ContactsTable
rly Jul 19, 2024
cbce216
Apply black
rly Jul 19, 2024
590bc05
fix name
h-mayorquin Jul 20, 2024
1a73df3
Update doc for "reference_contact" and angles
rly Jul 22, 2024
1b0b9bb
Move ProbeInsertion from ChannelsTable to Probe
rly Jul 22, 2024
fd700a6
Update mermaid diagram for probe_insertion move
rly Jul 22, 2024
3151258
Fix relative_position_in_mm should be in um
rly Jul 22, 2024
b8b29e2
Remove ContactsTable.relative_position_in_um.reference
rly Jul 22, 2024
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
32 changes: 32 additions & 0 deletions .github/workflows/check_external_links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Check Sphinx external links
on:
push:
schedule:
- cron: '0 5 * * 0' # once every Sunday at midnight ET
workflow_dispatch:

jobs:
check-external-links:
name: Check for broken Sphinx external links
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0 # tags are required to determine the version

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install Sphinx dependencies and package
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-dev.txt
python -m pip install .

- name: Check Sphinx external links
run: |
cd docs # run_doc_autogen assumes spec is found in ../spec/
sphinx-build -b linkcheck ./source ./test_build
14 changes: 14 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Codespell
on:
push:
workflow_dispatch:

jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Codespell
uses: codespell-project/actions-codespell@v2
14 changes: 14 additions & 0 deletions .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Ruff
on:
push:
workflow_dispatch:

jobs:
ruff:
name: Check for style errors and common problems
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Ruff
uses: chartboost/ruff-action@v1
178 changes: 178 additions & 0 deletions .github/workflows/run_all_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
name: Run all tests
on:
push:
schedule:
- cron: '0 5 * * 0' # once every Sunday at midnight ET
workflow_dispatch:

jobs:
run-all-tests:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.name }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
include:
- { name: linux-python3.8-minimum , requirements: minimum , python-ver: "3.8" , os: ubuntu-latest }
- { name: linux-python3.8 , requirements: pinned , python-ver: "3.8" , os: ubuntu-latest }
- { name: linux-python3.9 , requirements: pinned , python-ver: "3.9" , os: ubuntu-latest }
- { name: linux-python3.10 , requirements: pinned , python-ver: "3.10", os: ubuntu-latest }
- { name: linux-python3.11 , requirements: pinned , python-ver: "3.11", os: ubuntu-latest }
- { name: linux-python3.12 , requirements: pinned , python-ver: "3.12", os: ubuntu-latest }
- { name: linux-python3.12-upgraded , requirements: upgraded , python-ver: "3.12", os: ubuntu-latest }
- { name: windows-python3.8-minimum , requirements: minimum , python-ver: "3.8" , os: windows-latest }
- { name: windows-python3.8 , requirements: pinned , python-ver: "3.8" , os: windows-latest }
- { name: windows-python3.9 , requirements: pinned , python-ver: "3.9" , os: windows-latest }
- { name: windows-python3.10 , requirements: pinned , python-ver: "3.10", os: windows-latest }
- { name: windows-python3.11 , requirements: pinned , python-ver: "3.11", os: windows-latest }
- { name: windows-python3.12 , requirements: pinned , python-ver: "3.12", os: windows-latest }
- { name: windows-python3.12-upgraded , requirements: upgraded , python-ver: "3.12", os: windows-latest }
- { name: macos-python3.8-minimum , requirements: minimum , python-ver: "3.8" , os: macos-latest }
- { name: macos-python3.8 , requirements: pinned , python-ver: "3.8" , os: macos-latest }
- { name: macos-python3.9 , requirements: pinned , python-ver: "3.9" , os: macos-latest }
- { name: macos-python3.10 , requirements: pinned , python-ver: "3.10", os: macos-latest }
- { name: macos-python3.11 , requirements: pinned , python-ver: "3.11", os: macos-latest }
- { name: macos-python3.12 , requirements: pinned , python-ver: "3.12", os: macos-latest }
- { name: macos-python3.12-upgraded , requirements: upgraded , python-ver: "3.12", os: macos-latest }
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0 # tags are required to determine the version

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-ver }}

- name: Install build dependencies
run: |
python -m pip install --upgrade pip
python -m pip list
python -m pip check

- name: Install run requirements (minimum)
if: ${{ matrix.requirements == 'minimum' }}
run: |
python -m pip install -r requirements-min.txt -r requirements-dev.txt
python -m pip install -e .

- name: Install run requirements (pinned)
if: ${{ matrix.requirements == 'pinned' }}
run: |
python -m pip install -r requirements-dev.txt
python -m pip install -e .

- name: Install run requirements (upgraded)
if: ${{ matrix.requirements == 'upgraded' }}
run: |
python -m pip install -r requirements-dev.txt
python -m pip install -U -e .

- name: Run tests
run: |
pytest -v

- name: Build wheel and source distribution
run: |
python -m pip install --upgrade build
python -m build
ls -1 dist

- name: Test installation from a wheel (POSIX)
if: ${{ matrix.os != 'windows-latest' }}
run: |
python -m venv test-wheel-env
source test-wheel-env/bin/activate
python -m pip install dist/*-none-any.whl
python -c "import ndx_extracellular_channels"

- name: Test installation from a wheel (windows)
if: ${{ matrix.os == 'windows-latest' }}
run: |
python -m venv test-wheel-env
test-wheel-env/Scripts/activate.bat
python -m pip install dist/*-none-any.whl
python -c "import ndx_extracellular_channels"

run-all-tests-on-conda:
name: ${{ matrix.name }}
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0} # needed for conda environment to work
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.name }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
include:
- { name: conda-linux-python3.8-minimum , requirements: minimum , python-ver: "3.8" , os: ubuntu-latest }
- { name: conda-linux-python3.8 , requirements: pinned , python-ver: "3.8" , os: ubuntu-latest }
- { name: conda-linux-python3.9 , requirements: pinned , python-ver: "3.9" , os: ubuntu-latest }
- { name: conda-linux-python3.10 , requirements: pinned , python-ver: "3.10", os: ubuntu-latest }
- { name: conda-linux-python3.11 , requirements: pinned , python-ver: "3.11", os: ubuntu-latest }
- { name: conda-linux-python3.12 , requirements: pinned , python-ver: "3.12", os: ubuntu-latest }
- { name: conda-linux-python3.12-upgraded , requirements: upgraded , python-ver: "3.12", os: ubuntu-latest }
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0 # tags are required to determine the version

- name: Set up Conda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
auto-activate-base: true
activate-environment: true
python-version: ${{ matrix.python-ver }}

- name: Install build dependencies
run: |
conda config --set always_yes yes --set changeps1 no
conda info
conda config --show-sources
conda list --show-channel-urls

- name: Install run requirements (minimum)
if: ${{ matrix.requirements == 'minimum' }}
run: |
python -m pip install -r requirements-min.txt -r requirements-dev.txt
python -m pip install -e .

- name: Install run requirements (pinned)
if: ${{ matrix.requirements == 'pinned' }}
run: |
python -m pip install -r requirements-dev.txt
python -m pip install -e .

- name: Install run requirements (upgraded)
if: ${{ matrix.requirements == 'upgraded' }}
run: |
python -m pip install -r requirements-dev.txt
python -m pip install -U -e .

- name: Run tests
run: |
pytest -v

- name: Build wheel and source distribution
run: |
python -m pip install --upgrade build
python -m build
ls -1 dist

- name: Test installation from a wheel (POSIX)
run: |
python -m venv test-wheel-env
source test-wheel-env/bin/activate
python -m pip install dist/*-none-any.whl
python -c "import ndx_extracellular_channels"
56 changes: 56 additions & 0 deletions .github/workflows/run_coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Run code coverage
on:
push:
workflow_dispatch:

jobs:
run-coverage:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
# TODO handle forks
# run pipeline on either a push event or a PR event on a fork
# if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}
cancel-in-progress: true
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
env: # used by codecov-action
OS: ${{ matrix.os }}
PYTHON: '3.12'
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0 # tags are required to determine the version

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-dev.txt

- name: Install package
run: |
python -m pip install -e . # must install in editable mode for coverage to find sources
python -m pip list

- name: Run tests and generate coverage report
run: |
pytest --cov
python -m coverage xml # codecov uploader requires xml format
python -m coverage report -m

# TODO uncomment after setting up repo on codecov.io
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v3
# with:
# fail_ci_if_error: true
Loading
Loading