Testing¶
Running Tests¶
Pure tests (no optional deps)¶
uv run --extra test pytest -m pure
All tests with extras¶
uv run --extra test --extra analysis pytest -m "pure or analysis"
Feature verification script¶
uv run scripts/test_all_features.py
With auto-install enabled:
RGPYCRUMBS_AUTO_DEPS=1 uv run scripts/test_all_features.py
Test Categories¶
Marker |
What it tests |
Required extras |
|---|---|---|
|
Core modules, CLI registration, no optional deps |
|
|
Fragment detection, RMSD alignment |
|
|
JAX-based surface fitting |
|
|
Scipy spline interpolation |
|
|
eOn integration (con files, NEB) |
|
|
Fragment detection with tblite |
pixi (tblite is pixi-only here) |
CI Workflows¶
Workflow |
Runs |
Trigger |
|---|---|---|
|
|
push, PR |
|
Module compile checks, CLI help |
push, PR |
|
Extract and run Python blocks from org tutorials |
push, PR |
|
ruff, pyright, codespell, lychee link checker |
push, PR |
|
Sphinx doc build (org -> RST -> HTML) |
push to main, PR |
Adding Tests¶
Place test files in tests/ mirroring the package structure:
tests/
chemgp/test_chemgp_refactoring.py
eon/test_eon_cli.py
test_detect_fragments.py
test_ensure_import.py
test_lazy_import_coverage.py
Mark tests with the appropriate pytest marker. Use pytest.importorskip for
optional dependencies so tests skip gracefully when deps are absent.