-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: drop py3.9, add py3.13, fix conftest.py, use uv in ci
Drop python 3.9 and add python 3.13. Fix the apparatus to download example models in conftest.py (hopefully soon to be replaced by devtools models API). Use uv in ci.
- Loading branch information
Showing
5 changed files
with
59 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,22 +26,13 @@ jobs: | |
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
- name: Setup uv | ||
uses: astral-sh/setup-uv@v5 | ||
with: | ||
python-version: 3.x | ||
|
||
- name: Upgrade pip | ||
run: | | ||
python -m pip install --upgrade pip | ||
- name: Base installation | ||
run: | | ||
pip install -e . | ||
cache-dependency-glob: "**/pyproject.toml" | ||
|
||
- name: Print version | ||
run: | | ||
python -c "import modflowapi; print(modflowapi.__version__)" | ||
run: uv run python -c "import modflowapi; print(modflowapi.__version__)" | ||
|
||
lint: | ||
name: lint | ||
|
@@ -54,33 +45,21 @@ jobs: | |
shell: bash | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
# Standard python fails on Windows without GDAL installation. Using | ||
# standard python here since only linting on linux. | ||
# Use standard bash shell with standard python | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
- name: Setup uv | ||
uses: astral-sh/setup-uv@v5 | ||
with: | ||
python-version: 3.x | ||
|
||
- name: Print python version | ||
run: | | ||
python --version | ||
- name: Install Python packages | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -e .[lint] | ||
enable-cache: false | ||
|
||
- name: Lint | ||
run: ruff check . | ||
run: uvx ruff check . | ||
|
||
- name: Check format | ||
run: ruff format . --check | ||
- name: Format | ||
run: uvx ruff format . --check | ||
|
||
- name: Check spelling | ||
run: codespell | ||
- name: Spelling | ||
run: uvx codespell | ||
|
||
autotest_extensions: | ||
name: modflowapi extensions autotests | ||
|
@@ -90,27 +69,27 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
os: [ ubuntu-latest, macos-latest, windows-latest ] | ||
python-version: [ 3.9, "3.10", "3.11", "3.12" ] | ||
python-version: [ "3.10", "3.11", "3.12", "3.13" ] | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
- name: Setup uv | ||
uses: astral-sh/setup-uv@v5 | ||
with: | ||
cache-dependency-glob: "**/pyproject.toml" | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' | ||
cache-dependency-path: pyproject.toml | ||
|
||
- name: Install | ||
run: uv sync --all-extras | ||
|
||
- name: Install Python dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install git+https://[email protected]/Deltares/xmipy@develop | ||
pip install git+https://[email protected]/MODFLOW-ORG/modflow-devtools@develop | ||
pip install .[test] | ||
uv pip install git+https://[email protected]/Deltares/xmipy@develop | ||
uv pip install git+https://[email protected]/MODFLOW-ORG/modflow-devtools@develop | ||
- name: Install modflow executables | ||
uses: modflowpy/install-modflow-action@v1 | ||
|
@@ -121,7 +100,7 @@ jobs: | |
- name: Run autotests | ||
working-directory: ./autotest | ||
shell: bash -l {0} | ||
run: pytest -v -n auto -m "not mf6" | ||
run: uv run pytest -v -n auto -m "not mf6" | ||
|
||
autotest_preidm_extensions: | ||
name: modflowapi pre-idm extensions autotests | ||
|
@@ -131,27 +110,27 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
os: [ ubuntu-latest, macos-13, windows-latest ] | ||
python-version: [ 3.9, "3.10", "3.11", "3.12" ] | ||
python-version: [ "3.10", "3.11", "3.12", "3.13" ] | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
- name: Setup uv | ||
uses: astral-sh/setup-uv@v5 | ||
with: | ||
cache-dependency-glob: "**/pyproject.toml" | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' | ||
cache-dependency-path: pyproject.toml | ||
|
||
- name: Install | ||
run: uv sync --all-extras | ||
|
||
- name: Install Python dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install git+https://[email protected]/Deltares/xmipy@develop | ||
pip install git+https://[email protected]/MODFLOW-ORG/modflow-devtools@develop | ||
pip install .[test] | ||
uv pip install git+https://[email protected]/Deltares/xmipy@develop | ||
uv pip install git+https://[email protected]/MODFLOW-ORG/modflow-devtools@develop | ||
- name: Install modflow executables | ||
uses: modflowpy/install-modflow-action@v1 | ||
|
@@ -173,7 +152,7 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
os: [ ubuntu-latest, macos-latest, windows-latest ] | ||
python-version: [ 3.9, "3.10", "3.11", "3.12" ] | ||
python-version: [ "3.10", "3.11", "3.12", "3.13" ] | ||
defaults: | ||
run: | ||
shell: bash | ||
|
@@ -187,23 +166,23 @@ jobs: | |
repository: MODFLOW-ORG/modflow6-examples | ||
path: modflow6-examples | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
- name: Setup uv | ||
uses: astral-sh/setup-uv@v5 | ||
with: | ||
cache-dependency-glob: "**/pyproject.toml" | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' | ||
cache-dependency-path: pyproject.toml | ||
|
||
- name: Install | ||
run: uv sync --all-extras | ||
|
||
- name: Install Python dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install git+https://[email protected]/Deltares/xmipy@develop | ||
pip install git+https://[email protected]/MODFLOW-ORG/modflow-devtools@develop | ||
pip install git+https://[email protected]/modflowpy/flopy@develop | ||
pip install .[test] | ||
uv pip install git+https://[email protected]/Deltares/xmipy@develop | ||
uv pip install git+https://[email protected]/MODFLOW-ORG/modflow-devtools@develop | ||
uv pip install git+https://[email protected]/modflowpy/flopy@develop | ||
- name: update flopy for mf6-examples | ||
run: python -m flopy.mf6.utils.generate_classes --ref develop --no-backup | ||
run: uv run python -m flopy.mf6.utils.generate_classes --ref develop --no-backup | ||
|
||
- name: Install modflow6 for modflow6-examples | ||
uses: modflowpy/install-modflow-action@v1 | ||
|
@@ -213,7 +192,7 @@ jobs: | |
- name: Build mf6-examples | ||
working-directory: modflow6-examples/autotest | ||
run: | | ||
pytest -v -n=auto --init test_scripts.py -k "not synthetic-valley" | ||
uv run pytest -v -n=auto --init test_scripts.py -k "not synthetic-valley" | ||
- name: Install modflow6 nightly build | ||
uses: modflowpy/install-modflow-action@v1 | ||
|
@@ -224,4 +203,4 @@ jobs: | |
- name: Run autotests | ||
working-directory: ./autotest | ||
shell: bash -l {0} | ||
run: pytest -v -n=auto test_mf6_examples.py --mf6-examples-path=../modflow6-examples/examples | ||
run: uv run pytest -v -n=auto test_mf6_examples.py --mf6-examples-path=../modflow6-examples/examples |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters