File tree Expand file tree Collapse file tree 18 files changed +788
-41
lines changed Expand file tree Collapse file tree 18 files changed +788
-41
lines changed Original file line number Diff line number Diff line change 67
67
- env : " flaky"
68
68
python-version : " 3.13"
69
69
os : ubuntu-latest
70
+ # The mypy tests must be executed using only 1 process in order to guarantee
71
+ # predictable mypy output messages for comparison to expectations.
72
+ - env : " mypy"
73
+ python-version : " 3.10"
74
+ numprocesses : 1
75
+ os : ubuntu-latest
76
+ - env : " mypy"
77
+ python-version : " 3.13"
78
+ numprocesses : 1
79
+ os : ubuntu-latest
70
80
steps :
71
81
- uses : actions/checkout@v4
72
82
with :
88
98
then
89
99
echo "CONDA_ENV_FILE=ci/requirements/environment.yml" >> $GITHUB_ENV
90
100
echo "PYTEST_ADDOPTS=-m 'flaky or network' --run-flaky --run-network-tests -W default" >> $GITHUB_ENV
101
+ elif [[ "${{ matrix.env }}" == "mypy" ]] ;
102
+ then
103
+ echo "CONDA_ENV_FILE=ci/requirements/environment.yml" >> $GITHUB_ENV
104
+ echo "PYTEST_ADDOPTS=-n 1 -m 'mypy' --run-mypy -W default" >> $GITHUB_ENV
91
105
else
92
106
echo "CONDA_ENV_FILE=ci/requirements/${{ matrix.env }}.yml" >> $GITHUB_ENV
93
107
fi
@@ -144,7 +158,7 @@ jobs:
144
158
save-always : true
145
159
146
160
- name : Run tests
147
- run : python -m pytest -n 4
161
+ run : python -m pytest -n ${{ matrix.numprocesses || 4 }}
148
162
--timeout 180
149
163
--cov=xarray
150
164
--cov-report=xml
Original file line number Diff line number Diff line change 26
26
"pytest" ,
27
27
"pytest-cov" ,
28
28
"pytest-env" ,
29
- "pytest-xdist " ,
29
+ "pytest-mypy-plugins " ,
30
30
"pytest-timeout" ,
31
+ "pytest-xdist" ,
31
32
"hypothesis" ,
32
33
]
33
34
Original file line number Diff line number Diff line change @@ -30,8 +30,9 @@ dependencies:
30
30
- pytest
31
31
- pytest-cov
32
32
- pytest-env
33
- - pytest-xdist
33
+ - pytest-mypy-plugins
34
34
- pytest-timeout
35
+ - pytest-xdist
35
36
- rasterio
36
37
- scipy
37
38
- seaborn
Original file line number Diff line number Diff line change @@ -43,8 +43,9 @@ dependencies:
43
43
- pytest
44
44
- pytest-cov
45
45
- pytest-env
46
- - pytest-xdist
46
+ - pytest-mypy-plugins
47
47
- pytest-timeout
48
+ - pytest-xdist
48
49
- rasterio
49
50
- scipy
50
51
- seaborn
Original file line number Diff line number Diff line change @@ -9,8 +9,9 @@ dependencies:
9
9
- pytest
10
10
- pytest-cov
11
11
- pytest-env
12
- - pytest-xdist
12
+ - pytest-mypy-plugins
13
13
- pytest-timeout
14
+ - pytest-xdist
14
15
- numpy=1.24
15
16
- packaging=23.1
16
17
- pandas=2.1
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ dependencies:
29
29
- opt_einsum
30
30
- packaging
31
31
- pandas
32
+ - pandas-stubs
32
33
# - pint>=0.22
33
34
- pip
34
35
- pooch
@@ -38,14 +39,25 @@ dependencies:
38
39
- pytest
39
40
- pytest-cov
40
41
- pytest-env
41
- - pytest-xdist
42
+ - pytest-mypy-plugins
42
43
- pytest-timeout
44
+ - pytest-xdist
43
45
- rasterio
44
46
- scipy
45
47
- seaborn
46
48
# - sparse
47
49
- toolz
50
+ - types-colorama
51
+ - types-docutils
52
+ - types-psutil
53
+ - types-Pygments
54
+ - types-python-dateutil
55
+ - types-pytz
56
+ - types-PyYAML
57
+ - types-setuptools
48
58
- typing_extensions
49
59
- zarr
50
60
- pip :
51
61
- jax # no way to get cpu-only jaxlib from conda if gpu is present
62
+ - types-defusedxml
63
+ - types-pexpect
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ dependencies:
25
25
- numpy
26
26
- packaging
27
27
- pandas
28
+ - pandas-stubs
28
29
# - pint>=0.22
29
30
- pip
30
31
- pre-commit
@@ -33,12 +34,24 @@ dependencies:
33
34
- pytest
34
35
- pytest-cov
35
36
- pytest-env
36
- - pytest-xdist
37
+ - pytest-mypy-plugins
37
38
- pytest-timeout
39
+ - pytest-xdist
38
40
- rasterio
39
41
- scipy
40
42
- seaborn
41
43
# - sparse
42
44
- toolz
45
+ - types-colorama
46
+ - types-docutils
47
+ - types-psutil
48
+ - types-Pygments
49
+ - types-python-dateutil
50
+ - types-pytz
51
+ - types-PyYAML
52
+ - types-setuptools
43
53
- typing_extensions
44
54
- zarr
55
+ - pip :
56
+ - types-defusedxml
57
+ - types-pexpect
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ dependencies:
25
25
- numpy
26
26
- packaging
27
27
- pandas
28
+ - pandas-stubs
28
29
# - pint>=0.22
29
30
- pip
30
31
- pre-commit
@@ -33,12 +34,24 @@ dependencies:
33
34
- pytest
34
35
- pytest-cov
35
36
- pytest-env
36
- - pytest-xdist
37
+ - pytest-mypy-plugins
37
38
- pytest-timeout
39
+ - pytest-xdist
38
40
- rasterio
39
41
- scipy
40
42
- seaborn
41
43
- sparse
42
44
- toolz
45
+ - types-colorama
46
+ - types-docutils
47
+ - types-psutil
48
+ - types-Pygments
49
+ - types-python-dateutil
50
+ - types-pytz
51
+ - types-PyYAML
52
+ - types-setuptools
43
53
- typing_extensions
44
54
- zarr
55
+ - pip :
56
+ - types-defusedxml
57
+ - types-pexpect
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ dependencies:
29
29
- opt_einsum
30
30
- packaging
31
31
- pandas
32
+ - pandas-stubs
32
33
# - pint>=0.22
33
34
- pip
34
35
- pooch
@@ -39,14 +40,25 @@ dependencies:
39
40
- pytest
40
41
- pytest-cov
41
42
- pytest-env
42
- - pytest-xdist
43
+ - pytest-mypy-plugins
43
44
- pytest-timeout
45
+ - pytest-xdist
44
46
- rasterio
45
47
- scipy
46
48
- seaborn
47
49
- sparse
48
50
- toolz
51
+ - types-colorama
52
+ - types-docutils
53
+ - types-psutil
54
+ - types-Pygments
55
+ - types-python-dateutil
56
+ - types-pytz
57
+ - types-PyYAML
58
+ - types-setuptools
49
59
- typing_extensions
50
60
- zarr
51
61
- pip :
52
62
- jax # no way to get cpu-only jaxlib from conda if gpu is present
63
+ - types-defusedxml
64
+ - types-pexpect
Original file line number Diff line number Diff line change @@ -46,8 +46,9 @@ dependencies:
46
46
- pytest
47
47
- pytest-cov
48
48
- pytest-env
49
- - pytest-xdist
49
+ - pytest-mypy-plugins
50
50
- pytest-timeout
51
+ - pytest-xdist
51
52
- rasterio=1.3
52
53
- scipy=1.11
53
54
- seaborn=0.13
You can’t perform that action at this time.
0 commit comments