Skip to content

Commit b59dc4a

Browse files
authored
run ci on python 3.14 and clean up the pixi config (#366)
* move the pixi config to `pixi.toml` * consolidate the `tests` task * reorganize the environments * move the final task * feature for python 3.14 * back to running tests in parallel * use the new environments in ci * deduplicate for ci * add python 3.14 to the supported versions * choose the new environment
1 parent c03b2ea commit b59dc4a

4 files changed

Lines changed: 95 additions & 102 deletions

File tree

.github/workflows/ci-additional.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ jobs:
3131
- name: setup environment
3232
uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # 0.9.4
3333
with:
34-
environments: "doctests"
34+
environments: "ci-py313"
3535

3636
- name: import pint-xarray
3737
run: |
38-
pixi run -e doctests python -c 'import pint_xarray'
38+
pixi run -e ci-py313 python -c 'import pint_xarray'
3939
4040
- name: run doctests
4141
run: |
42-
pixi run -e doctests doctests
42+
pixi run -e ci-py313 doctests

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
strategy:
7272
fail-fast: false
7373
matrix:
74-
env: ["tests-py311", "tests-py312", "tests-py313"]
74+
env: ["ci-py311", "ci-py313", "ci-py314"]
7575
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
7676

7777
steps:

pixi.toml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
[workspace]
2+
channels = ["conda-forge"]
3+
platforms = ["linux-64", "osx-arm64", "win-64"]
4+
5+
[dependencies]
6+
numpy = "*"
7+
pint = "*"
8+
xarray = "*"
9+
10+
[pypi-dependencies]
11+
pint-xarray = { path = ".", editable = true }
12+
13+
[feature.optional-deps.dependencies]
14+
dask = "*"
15+
scipy = "*"
16+
bottleneck = "*"
17+
18+
[feature.tests.dependencies]
19+
pytest = ">=8"
20+
pytest-cov = "*"
21+
pytest-xdist = "*"
22+
cytoolz = "*"
23+
24+
[feature.tests.tasks]
25+
tests = { cmd = "pytest -n auto --cov=pint_xarray", cwd = ".", default-environment = "dev" }
26+
doctests = { cmd = "pytest --doctest-modules pint_xarray --ignore pint_xarray/tests", cwd = ".", default-environment = "dev" }
27+
28+
[feature.py311.dependencies]
29+
python = "3.11.*"
30+
31+
[feature.py312.dependencies]
32+
python = "3.12.*"
33+
34+
[feature.py313.dependencies]
35+
python = "3.13.*"
36+
37+
[feature.py314.dependencies]
38+
python = "3.14.*"
39+
40+
[feature.nightly.pypi-options]
41+
extra-index-urls = [
42+
"https://pypi.anaconda.org/scientific-python-nightly-wheels/simple",
43+
]
44+
45+
[feature.nightly.pypi-dependencies]
46+
pint-xarray = { path = ".", editable = true }
47+
pint = { git = "git+https://github.com/hgrecco/pint.git" }
48+
xarray = "*"
49+
numpy = "*"
50+
scipy = "*"
51+
52+
[feature.nightly.dependencies]
53+
pytest-reportlog = ">=0.1.2"
54+
python = "3.13.*"
55+
56+
[feature.docs.dependencies]
57+
sphinx = "*"
58+
sphinx-rtd-theme = ">=1.0"
59+
sphinx-autosummary-accessors = "*"
60+
nbsphinx = "*"
61+
cf-xarray = ">=0.10"
62+
pooch = "*"
63+
netcdf4 = "*"
64+
ipython = "*"
65+
ipykernel = "*"
66+
jupyter_client = "*"
67+
matplotlib-base = "*"
68+
sphinx-autobuild = "*"
69+
python = "3.13.*"
70+
71+
[feature.docs.tasks]
72+
build-docs = { cmd = "rm -rf generated/; python -m sphinx -b html -w warnings.log -W -Tn -j auto . _build", cwd = "docs" }
73+
autobuild-docs = { cmd = "sphinx-autobuild -b html -w warnings.log -W -Tn -j auto . _build", cwd = "docs" }
74+
build-docs-rtd = { cmd = "python -m sphinx -b html -W -T -j auto . $READTHEDOCS_OUTPUT/html", cwd = "docs" }
75+
76+
[feature.dev.dependencies]
77+
ipython = "*"
78+
ipdb = "*"
79+
pooch = ">=1.8.2,<2"
80+
netcdf4 = ">=1.7.2,<2"
81+
82+
[environments]
83+
tests = ["optional-deps", "tests"]
84+
nightly = { features = ["tests", "nightly"], no-default-feature = true }
85+
docs = ["docs"]
86+
ci-py311 = ["optional-deps", "tests", "py311"]
87+
ci-py312 = ["optional-deps", "tests", "py312"]
88+
ci-py313 = ["optional-deps", "tests", "py313"]
89+
ci-py314 = ["optional-deps", "tests", "py314"]
90+
dev = ["optional-deps", "tests", "py313", "dev"]

pyproject.toml

Lines changed: 1 addition & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ classifiers = [
1515
"Programming Language :: Python :: 3.11",
1616
"Programming Language :: Python :: 3.12",
1717
"Programming Language :: Python :: 3.13",
18+
"Programming Language :: Python :: 3.14",
1819
"Topic :: Scientific/Engineering",
1920
]
2021
requires-python = ">=3.11"
@@ -98,101 +99,3 @@ omit = ["pint_xarray/tests/*"]
9899
[tool.coverage.report]
99100
show_missing = true
100101
exclude_lines = ["pragma: no cover", "if TYPE_CHECKING"]
101-
102-
[tool.pixi.workspace]
103-
channels = ["conda-forge"]
104-
platforms = ["linux-64", "osx-arm64", "win-64"]
105-
106-
[tool.pixi.dependencies]
107-
numpy = "*"
108-
pint = "*"
109-
xarray = "*"
110-
111-
[tool.pixi.pypi-dependencies]
112-
pint-xarray = { path = ".", editable = true }
113-
114-
[tool.pixi.feature.optional-deps.dependencies]
115-
dask = "*"
116-
scipy = "*"
117-
bottleneck = "*"
118-
119-
[tool.pixi.feature.tests.dependencies]
120-
pytest = ">=8"
121-
pytest-cov = "*"
122-
pytest-xdist = "*"
123-
cytoolz = "*"
124-
125-
[tool.pixi.feature.tests-py311.dependencies]
126-
python = "3.11.*"
127-
128-
[tool.pixi.feature.tests-py311.tasks]
129-
tests = "pytest -n auto --cov=pint_xarray"
130-
131-
[tool.pixi.feature.tests-py312.dependencies]
132-
python = "3.12.*"
133-
134-
[tool.pixi.feature.tests-py312.tasks]
135-
tests = "pytest -n auto --cov=pint_xarray"
136-
137-
[tool.pixi.feature.tests-py313.dependencies]
138-
python = "3.13.*"
139-
140-
[tool.pixi.feature.tests-py313.tasks]
141-
doctests = "pytest --doctest-modules pint_xarray --ignore pint_xarray/tests"
142-
tests = "pytest -n auto --cov=pint_xarray"
143-
144-
[tool.pixi.feature.nightly.pypi-options]
145-
extra-index-urls = [
146-
"https://pypi.anaconda.org/scientific-python-nightly-wheels/simple",
147-
]
148-
149-
[tool.pixi.feature.nightly.pypi-dependencies]
150-
pint-xarray = { path = ".", editable = true }
151-
pint = { git = "git+https://github.com/hgrecco/pint.git" }
152-
xarray = "*"
153-
numpy = "*"
154-
scipy = "*"
155-
156-
[tool.pixi.feature.nightly.dependencies]
157-
pytest-reportlog = ">=0.1.2"
158-
python = "3.13.*"
159-
160-
[tool.pixi.feature.nightly.tasks]
161-
tests = "pytest -n auto --cov=pint_xarray --report-log=tests.jsonl"
162-
163-
[tool.pixi.feature.docs.dependencies]
164-
sphinx = "*"
165-
sphinx-rtd-theme = ">=1.0"
166-
sphinx-autosummary-accessors = "*"
167-
nbsphinx = "*"
168-
cf-xarray = ">=0.10"
169-
pooch = "*"
170-
netcdf4 = "*"
171-
ipython = "*"
172-
ipykernel = "*"
173-
jupyter_client = "*"
174-
matplotlib-base = "*"
175-
sphinx-autobuild = "*"
176-
python = "3.13.*"
177-
178-
[tool.pixi.feature.docs.tasks]
179-
build-docs = { cmd = "rm -rf generated/; python -m sphinx -b html -w warnings.log -W -Tn -j auto . _build", cwd = "docs" }
180-
autobuild-docs = { cmd = "sphinx-autobuild -b html -w warnings.log -W -Tn -j auto . _build", cwd = "docs" }
181-
build-docs-rtd = { cmd = "python -m sphinx -b html -W -T -j auto . $READTHEDOCS_OUTPUT/html", cwd = "docs" }
182-
183-
[tool.pixi.feature.dev.dependencies]
184-
ipython = "*"
185-
ipdb = "*"
186-
python = "3.13.*"
187-
pooch = ">=1.8.2,<2"
188-
netcdf4 = ">=1.7.2,<2"
189-
190-
[tool.pixi.environments]
191-
tests = ["optional-deps", "tests"]
192-
nightly = { features = ["tests", "nightly"], no-default-feature = true }
193-
docs = ["docs"]
194-
tests-py311 = ["optional-deps", "tests", "tests-py311"]
195-
tests-py312 = ["optional-deps", "tests", "tests-py312"]
196-
tests-py313 = ["optional-deps", "tests", "tests-py313"]
197-
doctests = ["optional-deps", "tests", "tests-py313"]
198-
dev = ["optional-deps", "tests", "dev"]

0 commit comments

Comments
 (0)