Skip to content

Commit 05a5af7

Browse files
authored
Merge branch 'master' into pca
2 parents ccba5e3 + 92a4366 commit 05a5af7

293 files changed

Lines changed: 41439 additions & 7894 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.codecov.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
coverage:
2+
status:
3+
project:
4+
default:
5+
target: auto
6+
patch:
7+
default:
8+
target: 80%
9+
threshold: 0%
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: 'Setup python and poetry'
2+
inputs:
3+
python-version:
4+
required: true
5+
runs:
6+
using: "composite"
7+
steps:
8+
- name: Install poetry
9+
shell: bash
10+
run: pipx install poetry
11+
12+
- name: Setup python
13+
uses: actions/setup-python@v6
14+
with:
15+
python-version: ${{ inputs.python-version }}
16+
cache: poetry
17+
18+
- name: Install packages
19+
shell: bash
20+
run: |
21+
poetry env use ${{ inputs.python-version }}
22+
poetry install --with dev,test,docs

.github/workflows/coverage.yml

Lines changed: 24 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,30 @@
11
name: coverage
22
on:
3-
push:
4-
branches:
5-
- master
6-
pull_request:
7-
branches:
8-
- master
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
99
jobs:
10-
coverage:
11-
strategy:
12-
fail-fast: true
13-
runs-on: ubuntu-latest
14-
steps:
15-
- name: Checkout source
16-
uses: actions/checkout@v4
10+
coverage:
11+
strategy:
12+
fail-fast: true
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout source
16+
uses: actions/checkout@v4
1717

18-
- name: Setup python
19-
uses: actions/setup-python@v5
20-
with:
21-
python-version: '3.12'
22-
cache: 'pip'
18+
- name: Setup python
19+
uses: ./.github/actions/setup-python
20+
with:
21+
python-version: "3.12"
2322

24-
- name: Install package
25-
run: pip install .[dev]
23+
- name: Run unit tests with coverage
24+
run: poetry run pytest -v tests --ignore tests/integration --cov malariagen_data/anoph --cov-report=xml
2625

27-
- name: Run unit tests with coverage
28-
run: pytest -v tests --ignore tests/integration --cov malariagen_data/anoph --cov-report=xml
29-
30-
- name: Upload coverage report
31-
uses: codecov/codecov-action@v3
32-
with:
33-
files: ./coverage.xml
34-
verbose: true
26+
- name: Upload coverage report
27+
uses: codecov/codecov-action@v3
28+
with:
29+
files: ./coverage.xml
30+
verbose: true

.github/workflows/integration_tests.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ on:
33
push:
44
branches:
55
- master
6-
pull_request:
7-
branches:
8-
- master
96
jobs:
107
integration_tests:
118
strategy:
@@ -24,13 +21,9 @@ jobs:
2421
uses: actions/checkout@v4
2522

2623
- name: Setup python
27-
uses: actions/setup-python@v5
24+
uses: ./.github/actions/setup-python
2825
with:
2926
python-version: ${{ matrix.python-version }}
30-
cache: "pip"
31-
32-
- name: Install package
33-
run: pip install .[dev]
3427

3528
- id: 'auth'
3629
name: 'Set up Google Cloud authentication'
@@ -53,7 +46,7 @@ jobs:
5346
key: gcs_cache_integration_tests_20240922
5447

5548
- name: Run integration tests
56-
run: pytest --durations=20 -v tests/integration
49+
run: poetry run pytest --durations=20 -v tests/integration
5750

5851
- name: Save GCS cache
5952
uses: actions/cache/save@v3

.github/workflows/latest_docs.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,19 @@ jobs:
1212
- name: Check out source 🛒
1313
uses: actions/checkout@v4
1414

15-
- name: Set up Python 🐍
16-
uses: actions/setup-python@v5
15+
- name: Setup python 🐍
16+
uses: ./.github/actions/setup-python
1717
with:
1818
python-version: '3.12'
1919

20-
- name: Install poetry
21-
run: pipx install poetry==1.8.3
22-
2320
- name: Eyeball native environment 👀
2421
run: python --version ; pip --version ; poetry --version ; pwd ; ls -la
2522

26-
- name: Install package dependencies 📜
27-
run: poetry install
28-
2923
- name: Build HTML 🏗️
3024
run: poetry run sphinx-build -b html docs/source docs/build/html
3125

3226
- name: Deploy HTML to GitHub Pages 🚀
33-
uses: peaceiris/actions-gh-pages@v3.9.3
27+
uses: peaceiris/actions-gh-pages@v4
3428
with:
3529
publish_branch: gh-pages
3630
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/linting.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,12 @@ jobs:
1616
uses: actions/checkout@v4
1717

1818
- name: Setup python
19-
uses: actions/setup-python@v5
19+
uses: ./.github/actions/setup-python
2020
with:
2121
python-version: '3.12'
22-
cache: 'pip'
2322

2423
- name: Run pre-commit checks
2524
uses: pre-commit/action@v3.0.0
2625

27-
- name: Install package
28-
run: pip install .[dev]
29-
3026
- name: Run mypy
31-
run: |
32-
mypy malariagen_data tests --ignore-missing-imports
27+
run: poetry run mypy malariagen_data tests --ignore-missing-imports

.github/workflows/notebooks.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ on:
33
push:
44
branches:
55
- master
6-
pull_request:
7-
branches:
8-
- master
96
jobs:
107
notebooks:
118
strategy:
@@ -20,13 +17,9 @@ jobs:
2017
uses: actions/checkout@v4
2118

2219
- name: Setup python
23-
uses: actions/setup-python@v5
20+
uses: ./.github/actions/setup-python
2421
with:
2522
python-version: "3.12"
26-
cache: "pip"
27-
28-
- name: Install package
29-
run: pip install .[dev]
3023

3124
- id: 'auth'
3225
name: 'Set up Google Cloud authentication'
@@ -49,7 +42,7 @@ jobs:
4942
key: gcs_cache_notebooks_20240922
5043

5144
- name: Run notebooks
52-
run: jupyter nbconvert --execute notebooks/*.ipynb --inplace
45+
run: poetry run jupyter nbconvert --execute notebooks/*.ipynb --inplace
5346

5447
- name: Save GCS cache
5548
uses: actions/cache/save@v3

.github/workflows/release.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,10 @@ jobs:
1010
- name: Checkout source
1111
uses: actions/checkout@v4
1212

13-
- name: Install poetry
14-
run: pipx install poetry==1.8.3
15-
1613
- name: Setup python
17-
uses: actions/setup-python@v5
14+
uses: ./.github/actions/setup-python
1815
with:
1916
python-version: '3.12'
20-
cache: 'poetry'
2117

2218
- name: Configure poetry
2319
run: |

.github/workflows/tagged_docs.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,14 @@ jobs:
2424
with:
2525
ref: ${{ env.VERSION_TAG }}
2626

27-
- name: Set up Python 🐍
28-
uses: actions/setup-python@v5
27+
- name: Setup python 🐍
28+
uses: ./.github/actions/setup-python
2929
with:
3030
python-version: '3.12'
3131

32-
- name: Install poetry
33-
run: pipx install poetry==1.8.3
34-
3532
- name: Eyeball native environment 👀
3633
run: python --version ; pip --version ; poetry --version ; pwd ; ls -la
3734

38-
- name: Install package dependencies 📜
39-
run: poetry install
40-
4135
- name: Build HTML 🏗️
4236
run: poetry run sphinx-build -b html docs/source docs/build/html
4337

.github/workflows/tests.yml

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,41 @@ jobs:
1212
fail-fast: true
1313
matrix:
1414
python-version: ["3.10", "3.11", "3.12"]
15-
numpy-version:
16-
- "numpy==1.26.4" # current colab version
17-
- "numpy~=2.0" # 2.0 series
18-
# numba (0.60.0) does not yet support numpy 2.1, disable this for now
19-
# - "numpy~=2.1" # 2.1 series
15+
numpy-spec:
16+
# Keep this aligned with pyproject.toml: numpy = ">=2.0.2,<2.1"
17+
- "==2.0.2" # locked baseline
18+
- ">=2.0.2,<2.1" # latest allowed in declared range
2019
runs-on: ubuntu-latest
2120

2221
steps:
2322
- name: Checkout source
2423
uses: actions/checkout@v4
2524

2625
- name: Setup python
27-
uses: actions/setup-python@v5
26+
uses: ./.github/actions/setup-python
2827
with:
2928
python-version: ${{ matrix.python-version }}
30-
cache: "pip"
3129

32-
- name: Install package
33-
run: pip install "${{ matrix.numpy-version }}" .[dev]
30+
- name: Install matrix NumPy version
31+
run: poetry run pip install --upgrade --no-deps "numpy${{ matrix.numpy-spec }}"
32+
33+
- name: Verify NumPy version and spec
34+
env:
35+
NUMPY_SPEC: ${{ matrix.numpy-spec }}
36+
run: |
37+
poetry run python - <<'PY'
38+
import os
39+
import numpy
40+
from packaging.specifiers import SpecifierSet
41+
42+
spec = SpecifierSet(os.environ["NUMPY_SPEC"])
43+
version = numpy.__version__
44+
if version not in spec:
45+
raise RuntimeError(
46+
f"NumPy version {version} does not satisfy matrix spec {spec}"
47+
)
48+
print("NumPy version:", version, "| spec:", spec)
49+
PY
3450
3551
- name: Run unit tests
36-
run: pytest -v tests --ignore tests/integration --typeguard-packages=malariagen_data,malariagen_data.anoph
52+
run: poetry run pytest -v tests --ignore tests/integration --typeguard-packages=malariagen_data,malariagen_data.anoph

0 commit comments

Comments
 (0)