Skip to content

Commit

Permalink
Use simpler tox.ini, add testing for Python 3.12, and other small upd…
Browse files Browse the repository at this point in the history
…ates (#988)
  • Loading branch information
rly committed Oct 30, 2023
1 parent 44d0d21 commit 7687a3f
Show file tree
Hide file tree
Showing 19 changed files with 240 additions and 408 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ body:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
validations:
required: true
- type: textarea
Expand Down
16 changes: 7 additions & 9 deletions .github/workflows/check_external_links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,20 @@ on:
jobs:
check-external-links:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Cancel non-latest runs
uses: styfle/cancel-workflow-action@0.11.0
with:
all_but_latest: true
access_token: ${{ github.token }}

- uses: actions/checkout@v4
- name: Checkout repo with submodules
uses: actions/checkout@v4
with:
submodules: 'recursive'
fetch-depth: 0 # tags are required for versioneer to determine the version
fetch-depth: 0 # tags are required to determine the version

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: '3.11' # TODO update to 3.12 when optional reqs (e.g., oaklib) support 3.12

- name: Install Sphinx dependencies and package
run: |
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
---
name: Codespell

on:
push:
branches: [dev]
pull_request:
branches: [dev]
workflow_dispatch:

jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest

steps:
- name: Checkout
- name: Checkout repo
uses: actions/checkout@v4
- name: Codespell
uses: codespell-project/actions-codespell@v2
10 changes: 5 additions & 5 deletions .github/workflows/deploy_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: '3.12'

- name: Install build dependencies
run: |
Expand All @@ -28,20 +28,20 @@ jobs:
- name: Run tox tests
run: |
tox -e py311-upgraded
tox -e py312-upgraded
- name: Build wheel and source distribution
run: |
tox -e build-py311-upgraded
tox -e build
ls -1 dist
- name: Test installation from a wheel
run: |
tox -e wheelinstall --recreate --installpkg dist/*-none-any.whl
tox -e wheelinstall --installpkg dist/*-none-any.whl
- name: Test installation from a source distribution
run: |
tox -e wheelinstall --recreate --installpkg dist/*.tar.gz
tox -e wheelinstall --installpkg dist/*.tar.gz
- name: Upload wheel and source distributions to PyPI
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/project_action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- name: GitHub App token
id: generate_token
uses: tibdex/github-app-token@v2.1.0
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PEM }}
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
- name: Checkout repo
uses: actions/checkout@v4
- name: Run ruff
uses: chartboost/ruff-action@v1
159 changes: 78 additions & 81 deletions .github/workflows/run_all_tests.yml

Large diffs are not rendered by default.

16 changes: 7 additions & 9 deletions .github/workflows/run_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ jobs:
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-${{ matrix.opt_req }}
cancel-in-progress: true
strategy:
matrix:
include:
Expand All @@ -28,18 +31,13 @@ jobs:
- { os: macos-latest , opt_req: false }
env: # used by codecov-action
OS: ${{ matrix.os }}
PYTHON: '3.11'
PYTHON: '3.11' # TODO update to 3.12 when optional reqs (e.g., oaklib) support 3.12
steps:
- name: Cancel non-latest runs
uses: styfle/cancel-workflow-action@0.11.0
with:
all_but_latest: true
access_token: ${{ github.token }}

- uses: actions/checkout@v4
- name: Checkout repo with submodules
uses: actions/checkout@v4
with:
submodules: 'recursive'
fetch-depth: 0 # tags are required for versioneer to determine the version
fetch-depth: 0 # tags are required to determine the version

- name: Set up Python
uses: actions/setup-python@v4
Expand Down
22 changes: 10 additions & 12 deletions .github/workflows/run_hdmf_zarr_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,20 @@ on:
jobs:
run-hdmf-zarr-tests:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Cancel non-latest runs
uses: styfle/cancel-workflow-action@0.11.0
with:
all_but_latest: true
access_token: ${{ github.token }}

- uses: actions/checkout@v4
- name: Checkout repo with submodules
uses: actions/checkout@v4
with:
submodules: 'recursive'
fetch-depth: 0 # tags are required for versioneer to determine the version
fetch-depth: 0 # tags are required to determine the version

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.10' # use 3.10 until hdmf-zarr updates versioneer.py which breaks on newer python

- name: Update pip
run: python -m pip install --upgrade pip
Expand All @@ -33,11 +31,11 @@ jobs:
python -m pip list
git clone https://github.com/hdmf-dev/hdmf-zarr.git --recurse-submodules
cd hdmf-zarr
python -m pip install -r requirements-dev.txt -r requirements.txt
python -m pip install -r requirements-dev.txt # do not install the pinned install requirements
# must install in editable mode for coverage to find sources
python -m pip install -e . # this will install a pinned version of hdmf instead of the current one
python -m pip install -e . # this will install a different version of hdmf from the current one
cd ..
python -m pip uninstall -y hdmf # uninstall the pinned version of hdmf
python -m pip uninstall -y hdmf # uninstall the other version of hdmf
python -m pip install . # reinstall current branch of hdmf
python -m pip list
Expand Down
22 changes: 10 additions & 12 deletions .github/workflows/run_pynwb_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,20 @@ on:
jobs:
run-pynwb-tests:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Cancel non-latest runs
uses: styfle/cancel-workflow-action@0.11.0
with:
all_but_latest: true
access_token: ${{ github.token }}

- uses: actions/checkout@v4
- name: Checkout repo with submodules
uses: actions/checkout@v4
with:
submodules: 'recursive'
fetch-depth: 0 # tags are required for versioneer to determine the version
fetch-depth: 0 # tags are required to determine the version

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: '3.12'

- name: Update pip
run: python -m pip install --upgrade pip
Expand All @@ -33,11 +31,11 @@ jobs:
python -m pip list
git clone https://github.com/NeurodataWithoutBorders/pynwb.git --recurse-submodules
cd pynwb
python -m pip install -r requirements-dev.txt -r requirements.txt
python -m pip install -r requirements-dev.txt # do not install the pinned install requirements
# must install in editable mode for coverage to find sources
python -m pip install -e . # this will install a pinned version of hdmf instead of the current one
python -m pip install -e . # this will install a different version of hdmf from the current one
cd ..
python -m pip uninstall -y hdmf # uninstall the pinned version of hdmf
python -m pip uninstall -y hdmf # uninstall the other version of hdmf
python -m pip install . # reinstall current branch of hdmf
python -m pip list
Expand Down

0 comments on commit 7687a3f

Please sign in to comment.