Skip to content

Commit 8efee08

Browse files
authored
CI refresh (#28)
1 parent edf6d96 commit 8efee08

37 files changed

+13573
-460
lines changed

.dprint.jsonc

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"json": {
3+
"lineWidth": 88,
4+
"array.preferSingleLine": true,
5+
},
6+
"markdown": {
7+
"lineWidth": 88,
8+
"emphasisKind": "asterisks",
9+
},
10+
"markup": {
11+
"printWidth": 88,
12+
},
13+
"toml": {
14+
"lineWidth": 88,
15+
},
16+
"yaml": {
17+
"printWidth": 88,
18+
"formatComments": true,
19+
"braceSpacing": false,
20+
},
21+
"excludes": [
22+
"**/*-lock.json",
23+
"**/*.lock",
24+
"**/node_modules/",
25+
"dist/",
26+
"doc/requirements.yml",
27+
],
28+
"plugins": [
29+
"https://plugins.dprint.dev/g-plane/pretty_yaml-v0.5.1.wasm",
30+
"https://plugins.dprint.dev/json-0.20.0.wasm",
31+
"https://plugins.dprint.dev/markdown-0.19.0.wasm",
32+
"https://plugins.dprint.dev/toml-0.7.0.wasm",
33+
"https://plugins.dprint.dev/g-plane/markup_fmt-v0.22.0.wasm",
34+
],
35+
}

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
- [ ] Closes #xxxx
22
- [ ] Tests added / passed
3-
- [ ] Passes `pre-commit run --all-files`

.github/workflows/docs.yml

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,30 +17,22 @@ jobs:
1717
- name: Checkout
1818
uses: actions/checkout@v4
1919

20-
- name: Setup Conda Environment
21-
uses: conda-incubator/setup-miniconda@v3
20+
- uses: prefix-dev/[email protected]
2221
with:
23-
miniforge-version: latest
24-
use-mamba: true
25-
environment-file: ci/requirements-docs.yml
26-
activate-environment: recursive_diff-docs
22+
pixi-version: v0.56.0
23+
cache: true
24+
environments: docs
2725

28-
- name: Show conda options
29-
run: conda config --show
26+
- name: Regenerate readthedocs environment
27+
run: pixi run doc-requirements
3028

31-
- name: conda info
32-
run: conda info
33-
34-
- name: conda list
35-
run: conda list
36-
37-
- name: Install
38-
run: python -m pip install --no-deps -e .
29+
- name: Check that readthedocs environment is up to date in git
30+
run: git diff --exit-code doc/requirements.yml
3931

4032
- name: Build docs
41-
run: sphinx-build -n -j auto -b html -d build/doctrees doc build/html
33+
run: pixi run -e docs docs
4234

4335
- uses: actions/upload-artifact@v4
4436
with:
45-
name: recursive_diff-docs
37+
name: recursive-diff-docs
4638
path: build/html

.github/workflows/lint.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Linting
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: ["*"]
8+
9+
jobs:
10+
checks:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: prefix-dev/[email protected]
15+
with:
16+
pixi-version: v0.56.0
17+
cache: true
18+
environments: lint
19+
- name: Run linters
20+
run: pixi run lint
21+
- name: Check for changed files after linting
22+
run: git diff --exit-code

.github/workflows/pre-commit.yml

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

.github/workflows/pytest.yml

Lines changed: 39 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -10,113 +10,64 @@ on:
1010
# When this workflow is queued, automatically cancel any previous running
1111
# or pending jobs from the same branch
1212
concurrency:
13-
group: tests-${{ github.ref }}
13+
group: pytest-${{ github.ref }}
1414
cancel-in-progress: true
1515

1616
defaults:
1717
run:
1818
shell: bash -l {0}
1919

2020
jobs:
21-
build:
22-
name:
23-
${{ matrix.os }} ${{ matrix.python-version }} ${{ matrix.requirements }}
24-
runs-on: ${{ matrix.os }}-latest
21+
test:
22+
name: ${{ matrix.os }} ${{ matrix.environment }}
23+
runs-on: ${{ matrix.os }}
2524
strategy:
2625
fail-fast: false
2726
matrix:
28-
os: [ubuntu]
29-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
30-
requirements: [latest]
27+
os:
28+
- ubuntu-latest # x86-64
29+
- ubuntu-24.04-arm # ARM
30+
- macos-15-intel # x86-64
31+
- macos-latest # ARM
32+
- windows-latest # x86-64
33+
environment:
34+
- smoke
35+
- mindeps
36+
- py39
37+
- py311
38+
- py314
3139
include:
32-
# Test on macos and windows (first and last version of python only)
33-
- os: macos
34-
python-version: "3.8"
35-
requirements: latest
36-
- os: macos
37-
python-version: "3.13"
38-
requirements: latest
39-
- os: windows
40-
python-version: "3.8"
41-
requirements: latest
42-
- os: windows
43-
python-version: "3.13"
44-
requirements: latest
45-
# Test on minimal requirements
46-
- os: ubuntu
47-
python-version: "3.8"
48-
requirements: minimal
49-
# Old builds are not available on osx-arm64
50-
# - os: macos
51-
# python-version: '3.8'
52-
# requirements: minimal
53-
- os: windows
54-
python-version: "3.8"
55-
requirements: minimal
56-
# Test without any optional dependencies
57-
- os: ubuntu
58-
python-version: "3.8"
59-
requirements: no_optionals
60-
- os: ubuntu
61-
python-version: "3.13"
62-
requirements: no_optionals
63-
- os: macos
64-
python-version: "3.8"
65-
requirements: no_optionals
66-
- os: macos
67-
python-version: "3.13"
68-
requirements: no_optionals
69-
- os: windows
70-
python-version: "3.8"
71-
requirements: no_optionals
72-
- os: windows
73-
python-version: "3.13"
74-
requirements: no_optionals
75-
# Test on nightly builds of requirements
76-
- os: ubuntu
77-
python-version: "3.13"
78-
requirements: upstream
40+
- os: ubuntu-latest
41+
environment: upstream
42+
- os: ubuntu-latest
43+
environment: nogil
7944

8045
steps:
8146
- name: Checkout
8247
uses: actions/checkout@v4
83-
with:
84-
fetch-depth: 0
85-
86-
- name: Setup Conda Environment
87-
uses: conda-incubator/setup-miniconda@v3
88-
with:
89-
miniforge-version: latest
90-
use-mamba: true
91-
python-version: ${{ matrix.python-version }}
92-
environment-file: ci/requirements-${{ matrix.requirements }}.yml
93-
activate-environment: recursive_diff
9448

95-
- name: Install nightly builds
96-
if: ${{ matrix.requirements == 'upstream' }}
97-
run: |
98-
mamba uninstall --force numpy pandas scipy pyarrow
99-
python -m pip install --no-deps --pre --prefer-binary \
100-
--extra-index-url https://pypi.fury.io/arrow-nightlies/ \
101-
pyarrow
102-
python -m pip install --no-deps --pre \
103-
-i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \
104-
numpy pandas scipy
49+
- name: Disregard pixi.lock (upstream only)
50+
if: matrix.environment == 'upstream' || matrix.environment == 'nogil'
51+
run: rm pixi.lock
10552

106-
- name: Show conda options
107-
run: conda config --show
108-
109-
- name: conda info
110-
run: conda info
53+
- uses: prefix-dev/[email protected]
54+
with:
55+
pixi-version: v0.56.0
56+
environments: ${{ matrix.environment }}
57+
cache: ${{ matrix.environment != 'upstream' && matrix.environment != 'nogil' }}
58+
locked: ${{ matrix.environment != 'upstream' && matrix.environment != 'nogil' }}
11159

112-
- name: conda list
113-
run: conda list
60+
- name: Smoke test
61+
run: pixi run -e ${{ matrix.environment }} smoke-test
11462

115-
- name: Install
116-
run: python -m pip install --no-deps -e .
63+
- name: pytest with coverage
64+
if: matrix.environment != 'nogil' && matrix.environment != 'smoke'
65+
run: pixi run -e ${{ matrix.environment }} coverage
11766

118-
- name: pytest
119-
run: py.test --verbose --cov=recursive_diff --cov-report=xml
67+
- name: Free-threading stress test
68+
if: matrix.environment == 'nogil'
69+
run: pixi run -e nogil tests --parallel-threads=4
12070

12171
- name: codecov.io
122-
uses: codecov/codecov-action@v3
72+
if: matrix.environment != 'nogil' && matrix.environment != 'smoke'
73+
uses: codecov/codecov-action@v5

.github/workflows/wheels.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Wheels
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: ["*"]
8+
9+
defaults:
10+
run:
11+
shell: bash -l {0}
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0 # Fetch full git history for hatch-vcs
21+
fetch-tags: true # Fetch tags for hatch-vcs
22+
23+
- uses: prefix-dev/[email protected]
24+
with:
25+
pixi-version: v0.56.0
26+
cache: true
27+
environments: dist
28+
29+
- name: Build sdist and wheels
30+
run: pixi run dist
31+
32+
- name: Set up Python
33+
uses: actions/setup-python@v5
34+
with:
35+
python-version: "3.14"
36+
37+
- name: Install wheel
38+
run: pip install dist/*.whl
39+
40+
- name: Smoke test
41+
working-directory: /tmp
42+
run: |
43+
cp ${{ github.workspace }}/smoke_test.py .
44+
python smoke_test.py
45+
46+
- uses: actions/upload-artifact@v4
47+
with:
48+
name: dist
49+
path: dist/*
50+
if-no-files-found: error

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,4 @@ Icon*
6060
doc/_build
6161
Untitled.ipynb
6262
htmlcov/
63+
.~lock.*

.pre-commit-config.yaml

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

0 commit comments

Comments
 (0)