Skip to content

Commit

Permalink
Update GitHub Actions and dependency versions (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
rly authored Mar 31, 2024
1 parent 0f114cc commit 7cb7618
Show file tree
Hide file tree
Showing 10 changed files with 56 additions and 79 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Codespell
on:
push:
pull_request:
workflow_dispatch:

jobs:
Expand All @@ -10,6 +9,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Codespell
uses: codespell-project/actions-codespell@v2
uses: codespell-project/actions-codespell@v2
17 changes: 6 additions & 11 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ on:
schedule:
- cron: '0 5 * * *' # once per day at midnight ET
push:
branches:
- main
pull_request:
workflow_dispatch:

jobs:
Expand All @@ -15,6 +12,9 @@ jobs:
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.name }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
Expand All @@ -31,16 +31,11 @@ jobs:
- { name: macos-python3.11 , os: macos-latest , python-ver: "3.11" }
- { name: macos-python3.12 , os: macos-latest , python-ver: "3.12" }
steps:
- name: Cancel non-latest runs
uses: styfle/[email protected]
with:
all_but_latest: true
access_token: ${{ github.token }}

- uses: actions/checkout@v4
- name: Checkout repo
uses: actions/checkout@v4

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Check Sphinx external links
on:
push:
pull_request:
schedule:
- cron: '0 5 * * 0' # once every Sunday at midnight ET
workflow_dispatch:
Expand All @@ -11,21 +10,15 @@ jobs:
name: Check for broken Sphinx external links
runs-on: ubuntu-latest
steps:
- name: Cancel any previous incomplete runs
uses: styfle/[email protected]
- name: Checkout repo
uses: actions/checkout@v4
with:
all_but_latest: true
access_token: ${{ "{{" }} github.token }}

- uses: actions/checkout@v3
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
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: "3.12"

- name: Install Sphinx dependencies and package
run: |
Expand Down
5 changes: 2 additions & 3 deletions {{ cookiecutter.namespace }}/.github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Codespell
on:
push:
pull_request:
workflow_dispatch:

jobs:
Expand All @@ -10,6 +9,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Codespell
uses: codespell-project/actions-codespell@v2
uses: codespell-project/actions-codespell@v2
5 changes: 2 additions & 3 deletions {{ cookiecutter.namespace }}/.github/workflows/ruff.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Ruff
on:
push:
pull_request:
workflow_dispatch:

jobs:
Expand All @@ -10,6 +9,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Ruff
uses: chartboost/ruff-action@v1
uses: chartboost/ruff-action@v1
34 changes: 14 additions & 20 deletions {{ cookiecutter.namespace }}/.github/workflows/run_all_tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Run all tests
on:
push:
pull_request:
schedule:
- cron: '0 5 * * 0' # once every Sunday at midnight ET
workflow_dispatch:
Expand All @@ -13,6 +12,9 @@ jobs:
defaults:
run:
shell: bash
concurrency:
group: ${{ "{{" }} github.workflow }}-${{ "{{" }} github.ref }}-${{ "{{" }} matrix.name }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
Expand All @@ -39,19 +41,13 @@ jobs:
- { 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: Cancel non-latest runs
uses: styfle/[email protected]
- name: Checkout repo
uses: actions/checkout@v4
with:
all_but_latest: true
access_token: ${{ "{{" }} github.token }}

- uses: actions/checkout@v3
with:
submodules: 'recursive'
fetch-depth: 0 # fetch tags
fetch-depth: 0 # tags are required to determine the version

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

Expand Down Expand Up @@ -111,6 +107,9 @@ jobs:
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:
Expand All @@ -123,18 +122,13 @@ jobs:
- { 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: Cancel any previous incomplete runs
uses: styfle/[email protected]
with:
access_token: ${{ "{{" }} github.token }}

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

- name: Set up Conda
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
auto-activate-base: true
Expand Down
20 changes: 8 additions & 12 deletions {{ cookiecutter.namespace }}/.github/workflows/run_coverage.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Run code coverage
on:
push:
pull_request:
workflow_dispatch:

jobs:
Expand All @@ -14,26 +13,23 @@ jobs:
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.11'
PYTHON: '3.12'
steps:
- name: Cancel any previous incomplete runs
uses: styfle/[email protected]
- name: Checkout repo
uses: actions/checkout@v4
with:
all_but_latest: true
access_token: ${{ "{{" }} github.token }}

- uses: actions/checkout@v3
with:
submodules: 'recursive'
fetch-depth: 0 # fetch tags
fetch-depth: 0 # tags are required to determine the version

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

Expand Down
6 changes: 4 additions & 2 deletions {{ cookiecutter.namespace }}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ keywords = [
'ndx-extension',
]
dependencies = [
"pynwb>=2.5.0",
"hdmf>=3.10.0",
"pynwb>=2.6.0",
"hdmf>=3.13.0",
]

# TODO: add URLs before release
Expand Down Expand Up @@ -108,10 +108,12 @@ exclude = [
"__pycache__",
"build/",
"dist/",
"docs/source/conf.py",
]
line-length = 120

[tool.ruff.per-file-ignores]
"src/pynwb/{{ cookiecutter.py_pkg_name }}/__init__.py" = ["E402", "F401"]
"src/spec/create_extension_spec.py" = ["T201"]

[tool.ruff.mccabe]
Expand Down
22 changes: 11 additions & 11 deletions {{ cookiecutter.namespace }}/requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# pinned dependencies to reproduce an entire development environment to
# run tests, check code style, and generate documentation
black==23.9.1
black==24.3.0
codespell==2.2.6
coverage==7.3.2
hdmf==3.10.0
hdmf-docutils==0.4.6
pre-commit==3.4.0
pynwb==2.5.0
pytest==7.4.2
pytest-cov==4.1.0
coverage==7.4.4
hdmf==3.13.0
hdmf-docutils==0.4.7
pre-commit==3.5.0
pynwb==2.6.0
pytest==8.1.1
pytest-cov==5.0.0
pytest-subtests==0.12.1
python-dateutil==2.8.2
pytest-subtests==0.6.0
ruff==0.0.292
tox==4.11.3
ruff==0.3.4
tox==4.14.2
4 changes: 2 additions & 2 deletions {{ cookiecutter.namespace }}/requirements-min.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# minimum versions of package dependencies for installation
# these should match the minimum versions specified in pyproject.toml
# NOTE: it may be possible to relax these minimum requirements
pynwb==2.5.0
hdmf==3.10.0
pynwb==2.6.0
hdmf==3.13.0

0 comments on commit 7cb7618

Please sign in to comment.