- Request fixtures only needed for their side effects
via `@pytest.mark.usefixtures()` instead of as arguments
- Remove fixtures that a test does not use at all
- Exempt abstract methods because their arguments define an interface
... and use relative links in the docs from now on.
Forgejo resolves relative links against the branch being viewed.
So, rewriting absolute links per branch is no longer necessary.
`safety check` is deprecated.
We use `pip-audit` instead, fed with the hashed dependencies
exported from uv.lock.
We ignore the known vulnerabilities in `black` v25 for now.
Make `uv` the backend for the virtual environments,
and install the packages with the versions pinned in uv.lock,
exported into a constraints file with `uv export`,
instead of `poetry export` and `poetry install`.
Also, use `uv run` instead of `poetry run`.
Use the PEP 735 "[dependency-groups]" (here: "dev", "test", "docs")
instead of Poetry's "dev" group, and `uv_build` as the build backend.
Replace poetry.lock with uv.lock.
Also, adapt CI and the README.
The dependencies stay in the same series as on Python 3.8
where those support 3.13.
Only the unavoidable upgrades are taken:
- `matplotlib` to v3.9
- `numpy` to v2.1
- `pandas` to v2.2
- `scipy` (via statsmodels)
Required code changes:
- `numpy` v2.1 prints its scalars as `np.float64(...)`,
which `psycopg2` then writes into the SQL
=> Adjust `Forecast.from_dataframe()` to convert the
rounded values into plain `float`s
- Python 3.12 no longer accepts `float`s in `random.randint()`
=> The test factories now pass the seconds as `int`s
CI and `nox` use a `u`v-managed Python, which ships the C headers
needed to build `psycopg2` and `rpy2`.
`flake8` v4 does not run on Python 3.12+
and is upgraded in a future commit.
... from the dev dependencies.
Longer queries in SQLAlchemy get flagged even though they are not
complicated. Other expressions are generally not that complicated.