-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into add-Xulu-behavior
- Loading branch information
Showing
32 changed files
with
856 additions
and
96 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node: $Format:%H$ | ||
node-date: $Format:%cI$ | ||
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$ | ||
ref-names: $Format:%D$ |
This file contains 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
.git_archival.txt export-subst |
This file contains 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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Codespell | ||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
codespell: | ||
name: Check for spelling errors | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
- name: Codespell | ||
uses: codespell-project/actions-codespell@v2 |
This file contains 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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Ruff | ||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
ruff: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
- name: Run ruff | ||
uses: astral-sh/ruff-action@v3 |
This file contains 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 |
---|---|---|
@@ -0,0 +1,162 @@ | ||
name: Test building package and publish | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- maint/* | ||
tags: | ||
- "*" | ||
pull_request: | ||
branches: | ||
- main | ||
- maint/* | ||
defaults: | ||
run: | ||
shell: bash | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3 | ||
|
||
- name: Build sdist and wheel | ||
run: | | ||
pip install --upgrade build twine | ||
python -m build | ||
twine check dist/* | ||
- name: Upload sdist and wheel artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: dist | ||
path: dist/ | ||
|
||
- name: Build git archive | ||
run: mkdir archive && git archive -v -o archive/archive.tgz HEAD | ||
|
||
- name: Upload git archive artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: archive | ||
path: archive/ | ||
|
||
- name: Download test data | ||
env: | ||
BOX_USERNAME: ${{ secrets.BOX_USERNAME }} | ||
BOX_PASSWORD: ${{ secrets.BOX_PASSWORD }} | ||
run: | | ||
python tests/download_test_data.py | ||
tree tests/test_data | ||
- name: Upload test data artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: test_data | ||
path: tests/test_data/downloaded | ||
|
||
test-package: | ||
runs-on: ubuntu-latest | ||
needs: [build] | ||
strategy: | ||
matrix: | ||
package: ['wheel', 'sdist', 'archive', 'editable'] | ||
steps: | ||
- name: Checkout repo | ||
# Used to access the tests. Only install from source if matrix.package == 'editable'. | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Download sdist and wheel artifacts | ||
if: matrix.package == 'wheel' || matrix.package == 'sdist' | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: dist | ||
path: dist/ | ||
|
||
- name: Download git archive artifact | ||
if: matrix.package == 'archive' | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: archive | ||
path: archive/ | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
|
||
- name: Display Python version | ||
run: python -c "import sys; print(sys.version)" | ||
|
||
- name: Update pip | ||
run: pip install --upgrade pip | ||
|
||
- name: Install wheel | ||
if: matrix.package == 'wheel' | ||
run: pip install dist/*.whl | ||
|
||
- name: Install sdist | ||
if: matrix.package == 'sdist' | ||
run: pip install dist/*.tar.gz | ||
|
||
- name: Install archive | ||
if: matrix.package == 'archive' | ||
run: pip install archive/archive.tgz | ||
|
||
- name: Install editable | ||
if: matrix.package == 'editable' | ||
run: pip install -e . | ||
|
||
- name: Download test data artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: test_data | ||
path: tests/test_data/downloaded | ||
|
||
- name: Run tests without coverage | ||
if: matrix.package != 'editable' | ||
run: | | ||
pip install pytest | ||
pip list | ||
pytest -v | ||
- name: Run tests on editable install with coverage | ||
if: matrix.package == 'editable' | ||
run: | | ||
pip install pytest-cov | ||
pip list | ||
pytest --cov=src --cov-report=xml --cov-report=term -v | ||
- name: Upload coverage reports to Codecov | ||
if: matrix.package == 'editable' | ||
uses: codecov/codecov-action@v5 | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
# pypi-publish: | ||
# name: Upload release to PyPI | ||
# runs-on: ubuntu-latest | ||
# needs: [test-package] | ||
# environment: | ||
# name: pypi | ||
# url: https://pypi.org/p/jdb-to-nwb | ||
# permissions: | ||
# id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | ||
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | ||
# steps: | ||
# - uses: actions/download-artifact@v4 | ||
# with: | ||
# name: dist | ||
# path: dist/ | ||
# - name: Publish package distributions to PyPI | ||
# uses: pypa/gh-action-pypi-publish@release/v1 |
This file contains 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 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 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 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 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from ._version import __version__ | ||
|
||
__all__ = [ | ||
"__version__", | ||
] |
This file contains 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 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 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.