Skip to content

Commit df09268

Browse files
committed
Refactor tox.ini and bump numpy
1 parent e1be4c0 commit df09268

7 files changed

+32
-29
lines changed

constraints.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is autogenerated by pip-compile with Python 3.8
33
# by the following command:
44
#
5-
# "tox run -e requirements-common"
5+
# "tox run -e requirements-base"
66
#
77
aenum==3.1.15 # via dace
88
alabaster==0.7.13 # via sphinx
@@ -47,7 +47,7 @@ exceptiongroup==1.2.0 # via hypothesis, pytest
4747
execnet==2.0.2 # via pytest-cache, pytest-xdist
4848
executing==2.0.1 # via devtools, stack-data
4949
factory-boy==3.3.0 # via -r requirements-dev.in, pytest-factoryboy
50-
faker==22.6.0 # via factory-boy
50+
faker==22.7.0 # via factory-boy
5151
fastjsonschema==2.19.1 # via nbformat
5252
filelock==3.13.1 # via tox, virtualenv
5353
flake8==7.0.0 # via -r requirements-dev.in, flake8-bugbear, flake8-builtins, flake8-debugger, flake8-docstrings, flake8-eradicate, flake8-mutable, flake8-pyproject, flake8-rst-docstrings

docs/development/tools/requirements.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ The expected workflow to update GT4Py requirements is as follows:
1818

1919
2. For changes in the development tools, update the `requirements-dev.in` file.
2020

21-
3. Run the **tox** _requirements-common_ environment to update all files automatically with **pip-compile** and **cog**. Note that **pip-compile** will most likely update the versions of some unrelated tools if new versions are available in PyPI.
21+
3. Run the **tox** _requirements-base_ environment to update all files automatically with **pip-compile** and **cog**. Note that **pip-compile** will most likely update the versions of some unrelated tools if new versions are available in PyPI.
2222

2323
```bash
24-
tox r -e requirements-common
24+
tox r -e requirements-base
2525
```
2626

2727
4. Check that the **mypy** mirror used by **pre-commit** (https://github.com/pre-commit/mirrors-mypy) in `.pre-commit-config.yaml` supports the same version as in `constraints.txt`, and manually update the `rev` version number.

min-extra-requirements-test.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ mypy==1.0
8989
nanobind==1.4.0
9090
nbmake==1.4.6
9191
ninja==1.10
92-
numpy==1.21.2
92+
numpy==1.22.0
9393
packaging==20.0
9494
pip-tools==6.10
9595
pipdeptree==2.3

min-requirements-test.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ mypy==1.0
8484
nanobind==1.4.0
8585
nbmake==1.4.6
8686
ninja==1.10
87-
numpy==1.21.2
87+
numpy==1.22.0
8888
packaging==20.0
8989
pip-tools==6.10
9090
pipdeptree==2.3

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ dependencies = [
4242
'mako>=1.1',
4343
'nanobind>=1.4.0 ',
4444
'ninja>=1.10',
45-
'numpy>=1.21.2',
45+
'numpy>=1.22.0',
4646
'packaging>=20.0',
4747
'pybind11>=2.5',
4848
'setuptools>=65.5.0',

requirements-dev.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is autogenerated by pip-compile with Python 3.8
33
# by the following command:
44
#
5-
# "tox run -e requirements-common"
5+
# "tox run -e requirements-base"
66
#
77
aenum==3.1.15 # via -c constraints.txt, dace
88
alabaster==0.7.13 # via -c constraints.txt, sphinx
@@ -47,7 +47,7 @@ exceptiongroup==1.2.0 # via -c constraints.txt, hypothesis, pytest
4747
execnet==2.0.2 # via -c constraints.txt, pytest-cache, pytest-xdist
4848
executing==2.0.1 # via -c constraints.txt, devtools, stack-data
4949
factory-boy==3.3.0 # via -c constraints.txt, -r requirements-dev.in, pytest-factoryboy
50-
faker==22.6.0 # via -c constraints.txt, factory-boy
50+
faker==22.7.0 # via -c constraints.txt, factory-boy
5151
fastjsonschema==2.19.1 # via -c constraints.txt, nbformat
5252
filelock==3.13.1 # via -c constraints.txt, tox, virtualenv
5353
flake8==7.0.0 # via -c constraints.txt, -r requirements-dev.in, flake8-bugbear, flake8-builtins, flake8-debugger, flake8-docstrings, flake8-eradicate, flake8-mutable, flake8-pyproject, flake8-rst-docstrings

tox.ini

+23-20
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ requires =
33
tox>=4.2
44
virtualenv>20.2
55
envlist =
6+
cartesian-py{310}-{internal,dace}-{cpu}
67
eve-py{310}
7-
storage-py{310}-{internal,dace}-{cpu}
88
next-py{310}-{nomesh,atlas}
9-
cartesian-py{310}-{internal,dace}-{cpu}
9+
storage-py{310}-{internal,dace}-{cpu}
1010
linters-py{310}
1111
# docs
1212
labels =
@@ -47,6 +47,7 @@ pass_env = NUM_PROCESSES
4747
set_env =
4848
PYTHONWARNINGS = {env:PYTHONWARNINGS:ignore:Support for `[tool.setuptools]` in `pyproject.toml` is still *beta*:UserWarning}
4949

50+
# -- Primary tests --
5051
[testenv:cartesian-py{38,39,310,311}-{internal,dace}-{cpu,cuda,cuda11x,cuda12x}]
5152
description = Run 'gt4py.cartesian' tests
5253
pass_env = {[testenv]pass_env}, BOOST_ROOT, BOOST_HOME, CUDA_HOME, CUDA_PATH, CXX, CC, OPENMP_CPPFLAGS, OPENMP_LDFLAGS, PIP_USER, PYTHONUSERBASE
@@ -97,16 +98,28 @@ commands =
9798
{cuda,cuda11x,cuda12x}: python -m pytest --cache-clear -v -n {env:NUM_PROCESSES:1} -m "requires_gpu" {posargs} tests{/}storage_tests
9899
#pytest doctest-modules {posargs} src{/}gt4py{/}storage
99100

100-
[testenv:notebooks-py{310,311}]
101-
description = Run notebooks
102-
commands = python -m pytest --nbmake examples -v -n {env:NUM_PROCESSES:1}
103-
101+
# -- Secondary tests --
104102
[testenv:linters-py{38,39,310,311}]
105103
description = Run linters
106104
commands =
107105
flake8 .{/}src
108106
mypy .{/}src
109107

108+
[testenv:notebooks-py{310,311}]
109+
description = Run notebooks
110+
commands = python -m pytest --nbmake examples -v -n {env:NUM_PROCESSES:1}
111+
112+
# -- Other artefacts --
113+
[testenv:dev-py{38,39,310,311}{-atlas,}]
114+
description = Initialize development environment for gt4py
115+
deps =
116+
-r {tox_root}{/}requirements-dev.txt
117+
atlas: atlas4py
118+
package = editable-legacy # => use_develop = True
119+
set_env =
120+
{[testenv]set_env}
121+
PIP_EXTRA_INDEX_URL = {env:PIP_EXTRA_INDEX_URL:https://test.pypi.org/simple/}
122+
110123
# [testenv:docs]
111124
# usedevelop = true
112125
# commands_pre =
@@ -135,15 +148,15 @@ commands =
135148
# git add _static
136149
# commands_post =
137150

138-
[testenv:requirements-{common,py38,py39,py310,py311}]
151+
[testenv:requirements-{base,py38,py39,py310,py311}]
139152
description =
140-
common: Update pinned development requirements
153+
base: Update pinned development requirements
141154
py38: Update requirements for testing a specific python version
142155
py39: Update requirements for testing a specific python version
143156
py310: Update requirements for testing a specific python version
144157
py311: Update requirements for testing a specific python version
145158
base_python =
146-
common: py38
159+
base: py38
147160
py38: py38
148161
py39: py39
149162
py310: py310
@@ -154,7 +167,7 @@ deps =
154167
pip-tools>=6.10
155168
package = skip
156169
set_env =
157-
CUSTOM_COMPILE_COMMAND = "tox run -e requirements-common"
170+
CUSTOM_COMPILE_COMMAND = "tox run -e requirements-base"
158171
allowlist_externals =
159172
mv
160173
commands =
@@ -191,13 +204,3 @@ commands =
191204
pyproject.toml requirements-dev.in
192205
# Run cog to update .pre-commit-config.yaml with new versions
193206
common: cog -r -P .pre-commit-config.yaml
194-
195-
[testenv:dev-py{38,39,310,311}{-atlas,}]
196-
description = Initialize development environment for gt4py
197-
deps =
198-
-r {tox_root}{/}requirements-dev.txt
199-
atlas: atlas4py
200-
package = editable-legacy # => use_develop = True
201-
set_env =
202-
{[testenv]set_env}
203-
PIP_EXTRA_INDEX_URL = {env:PIP_EXTRA_INDEX_URL:https://test.pypi.org/simple/}

0 commit comments

Comments
 (0)