Skip to content

Commit

Permalink
chore: drop py3.9, touch up readme
Browse files Browse the repository at this point in the history
  • Loading branch information
wpbonelli committed Mar 9, 2025
1 parent e142df7 commit 045d87e
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 37 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-22.04, macos-13, windows-2022 ]
python: [ 3.9, "3.10", "3.11", "3.12", "3.13" ]
python: [ "3.10", "3.11", "3.12", "3.13" ]
env:
GCC_V: 11
steps:
Expand Down Expand Up @@ -167,7 +167,7 @@ jobs:
# only invoke the GH API on one OS and Python version
# to avoid rate limits (1000 rqs / hour / repository)
# https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration#usage-limits
if: runner.os == 'Linux' && matrix.python == '3.9'
if: runner.os == 'Linux' && matrix.python == '3.10'
working-directory: modflow-devtools/autotest
env:
REPOS_PATH: ${{ github.workspace }}
Expand Down
2 changes: 1 addition & 1 deletion DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This document provides guidance to set up a development environment and discusse

## Requirements

Python3.9+ is currently required. This project supports several recent versions of Python, loosely following [NEP 29](https://numpy.org/neps/nep-0029-deprecation_policy.html#implementation) and aiming to stay synchronized with [FloPy](https://github.com/modflowpy/flopy).
Python3.10+ is currently required. This project has historically aimed to support several recent versions of Python, loosely following [NEP 29](https://numpy.org/neps/nep-0029-deprecation_policy.html#implementation). In current and future development this window may narrow to follow [SPEC 0](https://scientific-python.org/specs/spec-0000/#support-window) instead.

## Installation

Expand Down
46 changes: 19 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

Python development tools for MODFLOW 6.
Python development tools for MODFLOW 6 and related projects.

- [Use cases](#use-cases)
- [Requirements](#requirements)
Expand All @@ -27,36 +27,28 @@ Python development tools for MODFLOW 6.

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## Use cases
## Features

This is a small toolkit for developing MODFLOW 6, FloPy, and related projects. It includes standalone utilities and optional [Pytest](https://github.com/pytest-dev/pytest) extensions.

Utilities include:

* a minimal GitHub API client for retrieving release information and downloading assets
* a minimal GitHub API client for release info/assets
* a `ZipFile` subclass that [preserves file permissions](https://stackoverflow.com/questions/39296101/python-zipfile-removes-execute-permissions-from-binaries) (workaround for [Python #15795](https://bugs.python.org/issue15795))
* other release/distribution-related tools

Pytest features include:

- `--keep <path>` tempdir fixtures for [each scope](https://docs.pytest.org/en/stable/how-to/fixtures.html#scope-sharing-fixtures-across-classes-modules-packages-or-session)
- a [`--smoke` test](https://en.wikipedia.org/wiki/Smoke_testing_(software)) (abbrev. `-S`) CLI option shortcut
- markers to skip test cases conditional on
- operating system
- Python packages installed
- executables available on the PATH
- test fixtures for example / test models in
- `MODFLOW-ORG/modflow6-examples`
- `MODFLOW-ORG/modflow6-testmodels`
- `MODFLOW-ORG/modflow6-largetestmodels`
* pytest fixtures including "keepable" tempdirs
* pytest markers to skip test cases conditional on operating system, installed packages, or available executables
* a parser for MODFLOW 6 [definition files](https://modflow6.readthedocs.io/en/stable/_dev/dfn.html)
* streamlined access to MODFLOW 6 models in
- [`MODFLOW-ORG/modflow6-examples`](https://github.com/MODFLOW-ORG/modflow6-examples)
- [`MODFLOW-ORG/modflow6-testmodels`](https://github.com/MODFLOW-ORG/modflow6-testmodels)
- [`MODFLOW-ORG/modflow6-largetestmodels`](https://github.com/MODFLOW-ORG/modflow6-largetestmodels)
* a parser for MODFLOW 6 [definition files](https://modflow6.readthedocs.io/en/stable/_dev/dfn.html)

## Requirements

Python3.9+, dependency-free, but pairs well with `pytest` and select plugins, e.g.
Python3.10+, dependency-free by default.

Several optional dependency groups are available, oriented around specific use cases:

- [`pytest-dotenv`](https://github.com/quiqua/pytest-dotenv)
- [`pytest-xdist`](https://github.com/pytest-dev/pytest-xdist)
- [`syrupy`](https://github.com/tophat/syrupy)
- `dfn`: MF6 definition file parsing
- `test`: pytest fixtures/extensions
- `models`: example model access

## Installation

Expand All @@ -66,15 +58,15 @@ Python3.9+, dependency-free, but pairs well with `pytest` and select plugins, e.
pip install modflow-devtools
```

Pytest, pytest plugins, and other testing-related dependencies can be installed with:
To install an optional dependency group:

```shell
pip install "modflow-devtools[test]"
```

To install from source and set up a development environment please see the [developer documentation](DEVELOPER.md).

To import `pytest` fixtures in a project consuming `modflow-devtools`, add the following to a test file or `conftest.py` file:
To use the `pytest` fixtures provided by `modflow-devtools`, add the following to a test file or `conftest.py` file:

```python
pytest_plugins = [ "modflow_devtools.fixtures" ]
Expand Down
5 changes: 0 additions & 5 deletions autotest/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@
MODELS_TOML_PATH = Path(models.DATA_PATH) / models.MODELMAP_NAME


# TODO: Remove when we drop support for python 3.9 (soon?)
if sys.version_info[:2] == (3, 9):
pytest.skip("Unsupported for python 3.9", allow_module_level=True)


@pytest.fixture
def models_toml():
with MODELS_TOML_PATH.open("rb") as f:
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,13 @@ classifiers = [
"License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Hydrology"
]
requires-python = ">=3.9"
requires-python = ">=3.10"
dynamic = ["version"]

[project.optional-dependencies]
Expand Down

0 comments on commit 045d87e

Please sign in to comment.