Skip to content

Commit

Permalink
Update workflows and requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
rly committed Apr 4, 2024
1 parent 016be70 commit 96a7928
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Codespell
uses: codespell-project/actions-codespell@v2
2 changes: 1 addition & 1 deletion .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
33 changes: 14 additions & 19 deletions .github/workflows/run_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,40 +8,35 @@ on:

jobs:
run-coverage:
name: ${{ matrix.os }}, opt reqs ${{ matrix.opt_req }}
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:
include:
- { os: ubuntu-latest , opt_req: true }
- { os: ubuntu-latest , opt_req: false }
- { os: windows-latest, opt_req: false }
- { os: macos-latest , opt_req: false }
- { os: ubuntu-latest, python-ver: "3.12" }
- { os: ubuntu-latest, python-ver: "3.8" }
- { os: windows-latest, python-ver: "3.12" }
- { os: macos-latest, python-ver: "3.12" }
env: # used by codecov-action
OS: ${{ matrix.os }}
PYTHON: '3.11'
PYTHON: ${{ matrix.python-ver }}
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@v3
with:
submodules: 'recursive'
fetch-depth: 0 # tags are required for versioneer to determine the version
- name: Checkout repo
uses: actions/checkout@v4

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

- name: Install dependencies
run: |
Expand All @@ -60,6 +55,6 @@ jobs:
python -m coverage report -m
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
40 changes: 26 additions & 14 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
branches:
- main
pull_request:
workflow_dispatch:

jobs:
run-tests:
Expand All @@ -12,31 +13,42 @@ jobs:
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.name }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
include:
- { os: ubuntu-latest }
- { os: windows-latest }
- { os: macos-latest }
- { name: linux-python3.8-minimum , requirements: minimum, python-ver: "3.8" , os: ubuntu-latest }
- { name: linux-python3.12 , requirements: pinned , python-ver: "3.12", os: ubuntu-latest }
- { name: windows-python3.8-minimum , requirements: minimum, python-ver: "3.8" , os: windows-latest }
- { name: windows-python3.12 , requirements: pinned , python-ver: "3.12", os: windows-latest }
- { name: macos-python3.8-minimum , requirements: minimum, python-ver: "3.8" , os: macos-latest }
- { name: macos-python3.12 , requirements: pinned , python-ver: "3.12", os: macos-latest }
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@v3
- name: Checkout repo
uses: actions/checkout@v4

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

- name: Install dependencies
- name: Install development/test dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-dev.txt -r requirements.txt
python -m pip install -r requirements-dev.txt
- name: Install minimum dependencies
if: matrix.requirements == 'minimum'
run: |
python -m pip install -r requirements-min.txt
- name: Install pinned dependencies
if: matrix.requirements == 'pinned'
run: |
python -m pip install -r requirements.txt
- name: Install package
run: |
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ dependencies = [
"numpy",
"scikit-learn>=0.12",
]
version = "0.0.1"
version = "0.1.0"
# dynamic = ["version"]

[project.urls]
Expand Down
2 changes: 2 additions & 0 deletions requirements-min.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
hdmf==3.4.5
scikit-learn==0.12
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
hdmf>=3.4.5
scikit-learn>=0.12
hdmf==3.13.0
scikit-learn==1.4.0
3 changes: 0 additions & 3 deletions setup.py

This file was deleted.

0 comments on commit 96a7928

Please sign in to comment.