Skip to content

Commit daf7e4d

Browse files
Merge branch 'v4-dev' into how-to-accuracy
2 parents c9afab8 + 7425f84 commit daf7e4d

40 files changed

+1236
-2382
lines changed

.github/ci/min-core-deps.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

.github/ci/min_deps_check.py

Lines changed: 0 additions & 201 deletions
This file was deleted.

.github/ci/policy.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
channels:
2+
- conda-forge
3+
platforms:
4+
- noarch
5+
- linux-64
6+
policy:
7+
# all packages in months
8+
packages:
9+
python: 30
10+
numpy: 18
11+
default: 12
12+
# overrides for the policy
13+
overrides: {}
14+
# these packages are completely ignored
15+
exclude:
16+
- pytest
17+
- hypothesis
18+
- pytest-html
19+
- pytest-cov
20+
- nbval
21+
- uxarray # undergoes active development
22+
- xgcm # undergoes active development
23+
24+
# these packages don't fail the CI, but will be printed in the report
25+
ignored_violations: []

.github/workflows/additional.yml

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,21 @@ jobs:
88
min-version-policy:
99
name: Minimum Version Policy
1010
runs-on: "ubuntu-latest"
11-
defaults:
12-
run:
13-
shell: bash -l {0}
14-
11+
env:
12+
COLUMNS: 120
1513
steps:
1614
- uses: actions/checkout@v5
17-
- name: Setup micromamba
18-
uses: mamba-org/setup-micromamba@v2
19-
with:
20-
environment-name: min-deps
21-
create-args: >-
22-
python=3.12
23-
pyyaml
24-
conda
25-
python-dateutil
26-
27-
- name: Core deps minimum versions policy
28-
run: |
29-
python .github/ci/min_deps_check.py .github/ci/min-core-deps.yml
15+
- uses: astral-sh/setup-uv@v7
16+
- run: |
17+
uv run --with 'minimum-dependency-versions @ git+https://github.com/xarray-contrib/[email protected]' \
18+
python -m minimum_versions validate \
19+
--policy=.github/ci/policy.yaml \
20+
--manifest-path=./pixi.toml \
21+
pixi:test-minimum
3022
3123
linkcheck:
3224
name: pixi run docs-linkcheck
3325
runs-on: "ubuntu-latest"
34-
defaults:
35-
run:
36-
shell: bash -l {0}
3726

3827
steps:
3928
- uses: actions/checkout@v5

.github/workflows/ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,27 @@ jobs:
5151
with:
5252
cache: true
5353
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'v4-dev' }} # TODO: Update v4-dev to main when v4 is released
54+
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
55+
- name: Restore cached hypothesis directory
56+
id: restore-hypothesis-cache
57+
uses: actions/cache/restore@v4
58+
with:
59+
path: .hypothesis/
60+
key: cache-hypothesis-${{ runner.os }}-${{ github.run_id }}
61+
restore-keys: |
62+
cache-hypothesis-${{ runner.os }}-
5463
- name: Unit test
64+
id: unit-test
5565
run: |
5666
pixi run -e ${{ matrix.pixi-environment }} tests -v -s --cov=parcels --cov-report=xml --html="${{ env.COVERAGE_REPORT }}" --self-contained-html
67+
# explicitly save the cache so it gets updated, also do this even if it fails.
68+
- name: Save cached hypothesis directory
69+
id: save-hypothesis-cache
70+
if: always() && steps.unit-test.outcome != 'skipped'
71+
uses: actions/cache/save@v4
72+
with:
73+
path: .hypothesis/
74+
key: cache-hypothesis-${{ runner.os }}-${{ github.run_id }}
5775
- name: Codecov
5876
uses: codecov/[email protected]
5977
env:

0 commit comments

Comments
 (0)