WFDB-Python is a library for reading, writing and processing physiologic signals and annotations in the WFDB format. See DEVELOPING.md for the full contributor guide.
src/wfdb/: the package (io,plot,processing)tests/: pytest tests, which read sample files fromsample-data/relative to the repository root, so run them from theredocs/: Sphinx documentation, including the changelog indocs/changes.rst
The project uses uv. uv run installs the dev dependency group automatically.
uv run pytest # all tests
uv run pytest -m "not network" # only tests that work offline
uv run pytest -n auto # in parallel
uv run ruff format . # format
uv run ruff check . # lint
uv run --only-group docs make -C docs html SPHINXOPTS="-W --keep-going"- Format and lint with Ruff before committing. Lines (including docstrings and comments) are at most 88 columns.
- Docstrings use the numpy style. Start the docstring directly after the opening quotes with a summary that fits on one line, followed by a blank line and the details (if any).
- The docs build treats warnings as errors, so check it after changing a docstring.
- Tests are plain pytest functions or classes (no
unittest). Tests that need PhysioNet are markednetworkand are skipped if PhysioNet cannot be reached. Where possible, a test has alocalvariant and aphysionetvariant through thesourcefixture. - Add a changelog entry to
docs/changes.rstfor user-visible changes. - The version is set in
pyproject.tomlonly. Do not bump it as part of a feature or fix. - Commits that only reformat code are listed in
.git-blame-ignore-revs.