Contributing to Dendros
April 12, 2026 · View on GitHub
Thank you for your interest in contributing to Dendros! We welcome bug reports, feature requests, documentation improvements, and code contributions.
Table of Contents
Development environment setup
-
Fork and clone the repository:
git clone https://github.com/<your-username>/dendros.git cd dendros -
Create a virtual environment (Python ≥ 3.8):
python -m venv .venv source .venv/bin/activate # Windows: .venv\Scripts\activate -
Install the package in editable mode with development extras:
pip install -e ".[dev,pandas,docs]"This installs:
dendrositself (editable)pytestandpytest-covfor testingpandasfor optional table outputsphinx,sphinx-rtd-theme,myst-parser,nbsphinxfor docs
Running tests
pytest
To also measure code coverage:
pytest --cov=dendros --cov-report=term-missing
Tests live in the tests/ directory and use small synthetic HDF5 files
generated in temporary directories – no real Galacticus output data is needed.
Formatting and linting
We follow standard Python style guidelines (PEP 8). We recommend using
black for auto-formatting and
ruff for linting:
pip install black ruff
black src/ tests/
ruff check src/ tests/
Type annotations are encouraged throughout the codebase.
Building the documentation
cd docs
make html
# open _build/html/index.html in your browser
Proposing changes
-
Open an issue first to discuss the change you would like to make, especially for larger features or breaking API changes.
-
Create a branch from
main:git checkout -b feature/your-feature-name -
Implement your changes, adding or updating tests as needed.
-
Run the test suite to make sure everything passes:
pytest -
Open a pull request against
galacticusorg/dendros:main. Describe what changed and why; link the relevant issue if one exists. -
A maintainer will review the PR. Please be responsive to feedback – we aim to keep the review cycle short.
Code of Conduct
Please be respectful and constructive in all interactions. We follow the Contributor Covenant code of conduct.