Test Inventory#
This page is a compact map of the current HydroModPy pytest suite. It complements Test Families and Quality Roles: that page explains what each test family means, while this page answers “what do the thousands of collected tests cover today?”
Snapshot method#
The counts below were collected from the repository root with:
python -m pytest --collect-only -q -o addopts= \
--ignore=tests/integration/test_run_dataset_xugrid.py \
--ignore=tests/unit/test_data_schemas.py \
--ignore=tests/validity_frame
The first two ignored files required optional dependencies missing in the
local Python environment used for this snapshot. tests/validity_frame
imports the standalone, uninstalled validity_frame sub-project and is
not run by any CI job. A fully provisioned environment may collect a few
more tests.
Collected test count: 4979 (rough snapshot; the de-duplication and re-tiering work splits some god-files into many smaller files, so the file count rose while several copy-paste families collapsed into parametrized tables).
Runtime envelope#
The table below records the current execution budget rather than a
precise benchmark. Local runtime depends heavily on solver binaries,
native geospatial libraries, xdist parallelism, and whether coverage is
enabled. The authoritative limits live in tests/conftest.py and in
the GitHub Actions workflow files.
Family |
Default per-test timeout |
CI budget |
Main CI source |
|---|---|---|---|
|
60 s |
25 min on push/PR; part of 45 min cross-OS weekly matrix |
|
|
300 s |
30 min on push/PR after unit tests; 30 min nightly coverage |
|
|
300 s |
25 min on push/PR; part of 45 min cross-OS weekly matrix |
|
|
300 s |
60 min nightly on Linux |
|
|
900 s |
45 min nightly on Linux; analytical subset in weekly cross-OS matrix |
|
|
900 s |
60 min Linux smoke workflow |
|
|
1800 s |
60 min weekly on Linux |
|
Notes:
Default per-test timeout is the maximum wall-clock time allowed for one collected pytest item before
pytest-timeoutstops it. It is not an expected runtime. These defaults are applied bytests/conftest.pyfrom the test path: unit tests get a short timeout, validation and e2e tests get longer limits.CI budget is the maximum wall-clock time allowed for the whole GitHub Actions job. It includes environment setup, dependency installation, solver binary installation when needed, the tests themselves, coverage reporting, and artifact upload.
Main CI source is the workflow file where that automated signal is declared. Open it when you need the exact command, platform, Python version, schedule, or timeout.
Platform signal#
HydroModPy does not currently claim that every test in every family runs on every operating system. The CI matrix is the practical contract:
Platform signal |
Suites |
Notes |
|---|---|---|
Push / pull request on Linux |
Quality, architecture, fast marker suite, unit, integration, fast regression, wheel smoke, secret scan, advisory mypy |
Runs on |
Nightly Linux |
Extensive regression, integration, validation excluding PETSc |
Covers slower tiers that are too expensive for every push. |
Weekly Linux, macOS, Windows |
Unit tests, fast regression, analytical validation excluding PETSc |
This is the main cross-platform signal. It does not run the full validation, extensive regression, or e2e inventory on Windows. |
Weekly Linux only |
End-to-end tests and full regression |
Heavy user-facing scenarios and deeper workflow goldens. |
PETSc smoke |
PETSc-tagged Boussinesq validation subset |
Linux-only by design. |
Coverage index#
The live test-coverage index is externalized to Codecov rather than committed as a changing number in this repository. The current public entry points are:
Where |
What it gives you |
|---|---|
The compact live badge used by |
|
The detailed hosted view: project trend, file-level coverage, pull-request diff coverage, and per-flag breakdowns when uploads are available. |
|
Codecov pull-request comment |
The review-time summary when a pull-request workflow uploads coverage. The current optimized gate keeps coverage on scheduled suites rather than every PR. |
Local |
The direct local view after running tests with coverage. It prints missing lines per Python file. |
Local |
A browsable local HTML report under |
In other words, the repository stores the rules for coverage collection and upload, while Codecov stores the latest measured index.
Coverage is configured in two layers:
File |
Role |
|---|---|
|
Defines what counts as HydroModPy source code for Coverage.py.
The |
|
Defines how the local text report is rendered. The
|
|
Defines how Codecov interprets uploaded |
|
Defines flags, which are labels attached to CI uploads. They
let the dashboard distinguish coverage coming from |
The usual local commands are:
python -m pytest tests/unit --cov=hydromodpy --cov-report=
coverage report --show-missing
coverage html
Automatic updates already happen through CI:
Workflow |
Uploaded flags |
Trigger |
|---|---|---|
|
|
Nightly schedule and manual dispatch. |
|
|
Weekly schedule and manual dispatch. |
Because Codecov flags use carryforward: true, the dashboard can keep
a coherent project-level view even when only scheduled coverage jobs run.
If a static coverage number is later needed in the generated HTML docs,
prefer a small docs-refresh step that reads the Codecov API and commits a
generated JSON summary on dev only. Avoid having pull-request CI push
coverage files back to the branch: it creates noisy commits and is
fragile for forks and protected branches.
By test family#
Family |
Tests |
What the family mostly covers |
|---|---|---|
|
3024 |
Local contracts: schemas, helpers, adapters, data managers, solvers, mesh utilities, calibration primitives, result stores. |
|
128 |
Known workflow outputs, public API consistency, golden signatures, and solver intercomparison summaries. |
|
118 |
Analytical benchmarks, numerical stress cases, MMS checks, and calibration twin experiments. |
|
82 |
Cross-package composition without golden references: CLI, results, ML access, calibration bridges, and workflow plumbing. |
|
16 |
Full user-facing scenarios such as add/export round-trips, resume after interrupt, and complete simulation cycles. |
Largest unit-test areas#
Area |
Tests |
Main protection role |
|---|---|---|
|
543 |
Custom and provider-backed data loading, validation, autoscan, catalog handling, unit conversion, and data-source contracts. |
|
312 |
MODFLOW-NWT, MODFLOW 6, PETSc/Boussinesq, boundary-condition translation, output adapters, solver registries, and numerical contracts. |
|
262 |
Simulation catalog APIs, result stores, exports, comparison metrics, run grids, observations, and post-run access. |
|
259 |
Objective construction, candidate materialization, optimizer orchestration, parameter handling, cache behaviour, and CLI session state. |
|
219 |
Cartesian grids, Gmsh grids, conformal meshing, geometry constraints, field discretization, and reference mesh cases. |
|
216 |
TOML-to-workflow entry points, simulation/comparison launchers, batch launchers, CLI wiring, and error paths. |
|
118 |
Comparison metrics, web-report sections, audit payloads, experiment configuration, and analysis exports. |
|
83 |
TOML loading, schema export, units round-trips, native dispatch, error location, and cross-section validation. |
Validation-test areas#
Area |
Tests |
Main protection role |
|---|---|---|
|
92 |
Solver-backed comparisons against closed-form or semi-analytical groundwater-flow references. |
|
12 |
PETSc/Boussinesq stress cases and multi-backend robustness cases without a clean closed-form target. |
|
11 |
Synthetic twin experiments that check whether the inverse chain can recover known parameters. |
|
3 |
Manufactured-solution checks for expected convergence behaviour. |
Regression-test areas#
Area |
Tests |
Main protection role |
|---|---|---|
|
97 |
Public facade and exported symbol consistency. |
|
25 |
Routine workflow goldens and compact intercomparison checks. |
|
5 |
Heavier workflow goldens for pre-merge or pre-release checks. |
|
1 |
TOML I/O regression coverage. |
How to use this page#
Start with Test Families and Quality Roles when you need to interpret a failed family.
Use this page when you need to understand where most of the suite’s coverage lives before changing a subsystem.
Use Add a Test when deciding where a new test should be placed.
Use
tests/validation/README.mdandvalidation_cases/README.mdfor case-by-case scientific validation details.Use
tests/regression/README.mdfor golden-reference maintenance.
Potential next step#
This page is intentionally static and lightweight. If the suite keeps
growing, the natural next step is a small tools.doc_tests generator
that writes this page plus a downloadable JSON or CSV inventory from
pytest --collect-only. The generated artifact should be committed
and checked with a --check mode rather than regenerated during every
Sphinx build.