Testing and coverage
DELi uses pytest for automated tests and coverage.py (via pytest-cov) to measure line coverage of the deli package.
Run the full suite from a development install:
uv sync --dev --extra ml
uv run pytest
GNN tests are marked ml and require the optional ML dependencies above. To skip them:
uv run pytest -m "not ml"
Generate a coverage report
uv run pytest --cov=deli --cov-report=term-missing --cov-report=html
This runs all tests, measures which lines in src/deli were executed, and writes:
a terminal summary
an HTML report in
htmlcov/index.html
Coverage counts statements (executable lines) in src/deli. It does not include tests, docs, or example scripts.
Current coverage (DELi 0.2.1)
Figures below were generated on 2026-07-07 with 199 passing tests (Python 3.13+, including ML/GNN tests with deli-chem[ml] installed).
Metric |
Covered |
Total |
Percent |
|---|---|---|---|
All |
4,171 |
5,385 |
77.5% |
Module |
Covered |
Statements |
Coverage |
|---|---|---|---|
|
1,137 |
1,384 |
82.2% |
|
859 |
1,008 |
85.2% |
|
330 |
409 |
80.7% |
|
978 |
1,329 |
73.6% |
|
96 |
99 |
97.0% |
|
718 |
1,044 |
68.8% |
|
53 |
73 |
72.6% |
|
0 |
39 |
0.0% |
File |
Covered |
Statements |
Coverage |
|---|---|---|---|
|
569 |
797 |
71.4% |
|
95 |
99 |
96.0% |
|
64 |
73 |
87.7% |
|
125 |
166 |
75.3% |
|
62 |
85 |
72.9% |
|
63 |
109 |
57.8% |
Interpreting these numbers
Higher coverage in
decodeanddelsreflects unit tests around library definitions, barcodes, and decoding.Analysis coverage exercises cube enrichment, disynthon plots, PolyO, Random Forest baselines, and GNN helpers; the GNN training loop is partially covered via mocked tests.
`deli.design`` is not yet covered by automated tests.
In publications, we cite the total coverage percentage, test count, Python version, and DELi version used when the figures were generated.