Contributing to OpenReservoirComputing¶
We welcome contributions to the OpenReservoirComputing project! This guide will help you get started.
Development Setup¶
ORC uses uv for dependency and environment management. uv downloads and manages the Python interpreter for you, so conda or pyenv are not required.
-
Install uv (see the uv installation docs):
-
Clone the repository:
-
Create the development environment:
This creates.venvusing the Python version pinned in.python-version, installs ORC in editable mode, and installs thedevdependency group at the exact versions recorded inuv.lock.
Optional additions:
uv sync --all-groups # + the `docs` group (mkdocs, notebook, ipykernel)
uv sync --extra gpu # + CUDA-enabled JAX (Linux only)
uv sync --extra notebooks # + Jupyter, for running the examples
Running commands
There is no need to activate the virtual environment. Prefix commands with uv run and
uv will use — and if necessary update — the project environment automatically.
The dev extra has become a dependency group
Development and documentation dependencies are now
PEP 735 dependency groups rather than extras, so
pip install -e ".[dev]" no longer works. Use uv sync as above, or with pip 25.1 or
newer:
Both the -e . and the --group dev are needed — --group installs the group's tools
but not ORC itself.
Code Style¶
We use the following tools for code quality:
- Ruff: Linting and formatting
- pytest: Testing
- ty: Type checking
Run these before submitting:
uv run ruff format src/ tests/
uv run ruff check src/ tests/
uv run pytest tests/
uv run ty check src/
Dependencies and the lockfile¶
uv.lock is committed to the repository and is the source of truth for CI. To add or change
a dependency:
uv add <package> # runtime dependency
uv add --group dev <package> # development tool
uv add --group docs <package> # documentation tool
uv add updates both pyproject.toml and uv.lock. Commit uv.lock alongside your
change — CI runs uv sync --locked, which fails if the lockfile is out of date. To refresh
pinned versions without changing any constraints, run uv lock --upgrade.
Testing¶
- Write tests for new functionality
- Ensure all tests pass before submitting
Documentation¶
- Update docstrings for new functions/classes
- Follow numpy docstring style
- Ensure type annotations are correct with
ty - Preview the site with
uv run mkdocs serve(this executes every example notebook, so the first build takes a few minutes)
Pull Request Process¶
- Create a feature branch from
main - Make your changes with appropriate tests
- Update documentation as needed
- Ensure all checks pass
- Submit a pull request with a clear description
Reporting Issues¶
Please use GitHub Issues to report bugs or request features. Include:
- Clear description of the problem
- Steps to reproduce
- Expected vs actual behavior
- System information (OS, Python version, etc.)
Thank you for contributing!