@@ -26,22 +26,13 @@ jobs:
26
26
- name : Checkout repo
27
27
uses : actions/checkout@v3
28
28
29
- - name : Setup Python
30
- uses : actions /setup-python@v4
29
+ - name : Setup uv
30
+ uses : astral-sh /setup-uv@v5
31
31
with :
32
- python-version : 3.x
33
-
34
- - name : Upgrade pip
35
- run : |
36
- python -m pip install --upgrade pip
37
-
38
- - name : Base installation
39
- run : |
40
- pip install -e .
32
+ cache-dependency-glob : " **/pyproject.toml"
41
33
42
34
- name : Print version
43
- run : |
44
- python -c "import modflowapi; print(modflowapi.__version__)"
35
+ run : uv run python -c "import modflowapi; print(modflowapi.__version__)"
45
36
46
37
lint :
47
38
name : lint
@@ -54,33 +45,21 @@ jobs:
54
45
shell : bash
55
46
steps :
56
47
- name : Checkout repo
57
- uses : actions/checkout@v3
48
+ uses : actions/checkout@v4
58
49
59
- # Standard python fails on Windows without GDAL installation. Using
60
- # standard python here since only linting on linux.
61
- # Use standard bash shell with standard python
62
- - name : Setup Python
63
- uses : actions/setup-python@v4
50
+ - name : Setup uv
51
+ uses : astral-sh/setup-uv@v5
64
52
with :
65
- python-version : 3.x
66
-
67
- - name : Print python version
68
- run : |
69
- python --version
70
-
71
- - name : Install Python packages
72
- run : |
73
- python -m pip install --upgrade pip
74
- pip install -e .[lint]
53
+ enable-cache : false
75
54
76
55
- name : Lint
77
- run : ruff check .
56
+ run : uvx ruff check .
78
57
79
- - name : Check format
80
- run : ruff format . --check
58
+ - name : Format
59
+ run : uvx ruff format . --check
81
60
82
- - name : Check spelling
83
- run : codespell
61
+ - name : Spelling
62
+ run : uvx codespell
84
63
85
64
autotest_extensions :
86
65
name : modflowapi extensions autotests
@@ -90,27 +69,27 @@ jobs:
90
69
fail-fast : false
91
70
matrix :
92
71
os : [ ubuntu-latest, macos-latest, windows-latest ]
93
- python-version : [ 3.9 , "3.10 ", "3.11 ", "3.12 " ]
72
+ python-version : [ "3.10" , "3.11 ", "3.12 ", "3.13 " ]
94
73
defaults :
95
74
run :
96
75
shell : bash
97
76
steps :
98
77
- name : Checkout repo
99
- uses : actions/checkout@v3
78
+ uses : actions/checkout@v4
100
79
101
- - name : Setup Python
102
- uses : actions /setup-python@v4
80
+ - name : Setup uv
81
+ uses : astral-sh /setup-uv@v5
103
82
with :
83
+ cache-dependency-glob : " **/pyproject.toml"
104
84
python-version : ${{ matrix.python-version }}
105
- cache : ' pip'
106
- cache-dependency-path : pyproject.toml
85
+
86
+ - name : Install
87
+ run : uv sync --all-extras
107
88
108
89
- name : Install Python dependencies
109
90
run : |
110
- python -m pip install --upgrade pip
111
- pip install git+https://[email protected] /Deltares/xmipy@develop
112
- pip install git+https://[email protected] /MODFLOW-ORG/modflow-devtools@develop
113
- pip install .[test]
91
+ uv pip install git+https://[email protected] /Deltares/xmipy@develop
92
+ uv pip install git+https://[email protected] /MODFLOW-ORG/modflow-devtools@develop
114
93
115
94
- name : Install modflow executables
116
95
uses : modflowpy/install-modflow-action@v1
@@ -121,7 +100,7 @@ jobs:
121
100
- name : Run autotests
122
101
working-directory : ./autotest
123
102
shell : bash -l {0}
124
- run : pytest -v -n auto -m "not mf6"
103
+ run : uv run pytest -v -n auto -m "not mf6"
125
104
126
105
autotest_preidm_extensions :
127
106
name : modflowapi pre-idm extensions autotests
@@ -131,27 +110,27 @@ jobs:
131
110
fail-fast : false
132
111
matrix :
133
112
os : [ ubuntu-latest, macos-13, windows-latest ]
134
- python-version : [ 3.9 , "3.10 ", "3.11 ", "3.12 " ]
113
+ python-version : [ "3.10" , "3.11 ", "3.12 ", "3.13 " ]
135
114
defaults :
136
115
run :
137
116
shell : bash
138
117
steps :
139
118
- name : Checkout repo
140
- uses : actions/checkout@v3
119
+ uses : actions/checkout@v4
141
120
142
- - name : Setup Python
143
- uses : actions /setup-python@v4
121
+ - name : Setup uv
122
+ uses : astral-sh /setup-uv@v5
144
123
with :
124
+ cache-dependency-glob : " **/pyproject.toml"
145
125
python-version : ${{ matrix.python-version }}
146
- cache : ' pip'
147
- cache-dependency-path : pyproject.toml
126
+
127
+ - name : Install
128
+ run : uv sync --all-extras
148
129
149
130
- name : Install Python dependencies
150
131
run : |
151
- python -m pip install --upgrade pip
152
- pip install git+https://[email protected] /Deltares/xmipy@develop
153
- pip install git+https://[email protected] /MODFLOW-ORG/modflow-devtools@develop
154
- pip install .[test]
132
+ uv pip install git+https://[email protected] /Deltares/xmipy@develop
133
+ uv pip install git+https://[email protected] /MODFLOW-ORG/modflow-devtools@develop
155
134
156
135
- name : Install modflow executables
157
136
uses : modflowpy/install-modflow-action@v1
@@ -173,7 +152,7 @@ jobs:
173
152
fail-fast : false
174
153
matrix :
175
154
os : [ ubuntu-latest, macos-latest, windows-latest ]
176
- python-version : [ 3.9 , "3.10 ", "3.11 ", "3.12 " ]
155
+ python-version : [ "3.10" , "3.11 ", "3.12 ", "3.13 " ]
177
156
defaults :
178
157
run :
179
158
shell : bash
@@ -187,23 +166,23 @@ jobs:
187
166
repository : MODFLOW-ORG/modflow6-examples
188
167
path : modflow6-examples
189
168
190
- - name : Setup Python
191
- uses : actions /setup-python @v5
169
+ - name : Setup uv
170
+ uses : astral-sh /setup-uv @v5
192
171
with :
172
+ cache-dependency-glob : " **/pyproject.toml"
193
173
python-version : ${{ matrix.python-version }}
194
- cache : ' pip'
195
- cache-dependency-path : pyproject.toml
174
+
175
+ - name : Install
176
+ run : uv sync --all-extras
196
177
197
178
- name : Install Python dependencies
198
179
run : |
199
- python -m pip install --upgrade pip
200
- pip install git+https://[email protected] /Deltares/xmipy@develop
201
- pip install git+https://[email protected] /MODFLOW-ORG/modflow-devtools@develop
202
- pip install git+https://[email protected] /modflowpy/flopy@develop
203
- pip install .[test]
180
+ uv pip install git+https://[email protected] /Deltares/xmipy@develop
181
+ uv pip install git+https://[email protected] /MODFLOW-ORG/modflow-devtools@develop
182
+ uv pip install git+https://[email protected] /modflowpy/flopy@develop
204
183
205
184
- name : update flopy for mf6-examples
206
- run : python -m flopy.mf6.utils.generate_classes --ref develop --no-backup
185
+ run : uv run python -m flopy.mf6.utils.generate_classes --ref develop --no-backup
207
186
208
187
- name : Install modflow6 for modflow6-examples
209
188
uses : modflowpy/install-modflow-action@v1
@@ -213,7 +192,7 @@ jobs:
213
192
- name : Build mf6-examples
214
193
working-directory : modflow6-examples/autotest
215
194
run : |
216
- pytest -v -n=auto --init test_scripts.py -k "not synthetic-valley"
195
+ uv run pytest -v -n=auto --init test_scripts.py -k "not synthetic-valley"
217
196
218
197
- name : Install modflow6 nightly build
219
198
uses : modflowpy/install-modflow-action@v1
@@ -224,4 +203,4 @@ jobs:
224
203
- name : Run autotests
225
204
working-directory : ./autotest
226
205
shell : bash -l {0}
227
- run : pytest -v -n=auto test_mf6_examples.py --mf6-examples-path=../modflow6-examples/examples
206
+ run : uv run pytest -v -n=auto test_mf6_examples.py --mf6-examples-path=../modflow6-examples/examples
0 commit comments