Thanks for your interest in contributing! This document covers how to set up a development environment, run the test suite, and submit changes.
git clone https://github.com/dvanmoorselaar/open_dvm.git
cd open_dvm
pip install -e ".[dev]"This installs open_dvm in editable mode along with test/lint tooling (pytest, pytest-cov, pytest-xdist, black, isort, flake8, mypy).
pytest tests/Tests are organized under tests/test_analysis/, tests/test_stats/, tests/test_support/, and tests/test_visualization/, mirroring the open_dvm/ package layout. Three markers are available (defined in pyproject.toml):
unit-- fast, isolated testsintegration-- slower tests exercising multiple componentsslow-- long-running tests; skip withpytest -m "not slow"(this is what CI runs)
Coverage is configured via [tool.coverage.*] in pyproject.toml:
coverage run --source=open_dvm -m pytest tests/ -q
coverage report --show-missingThe codebase is formatted with black and isort (configs in pyproject.toml):
black open_dvm tests
isort open_dvm testsblack/isort are enforced in CI (a lint job runs black --check and isort --check on every PR). flake8 and mypy configs are also present (.flake8, [tool.mypy] in pyproject.toml) for anyone who wants to run them locally, but aren't enforced yet -- there's a real backlog of mypy type errors and non-formatting flake8 issues that hasn't been triaged.
For file and folder naming conventions (raw/processed data layout, subject/session naming, etc.), see NAMING_CONVENTIONS.md.
- Branch from
master. - Make your changes, adding or updating tests for any new behavior.
- Make sure
pytest tests/passes locally. - Open a pull request against
master. CI (GitHub Actions) runs the test suite across Python 3.9-3.11 on every PR. - Keep PRs focused -- a bug fix or feature addition doesn't need to also reformat unrelated code.
Open a GitHub issue or see the README for contact details.