Contributing
Contributions are welcome. Here is how to get started.
Development setup
Follow the installation guide, then install docs dependencies:
pip install -e ".[docs]"
Running tests
Run all fast (unit) tests:
pytest tests/ -m "not slow"
Run everything including slow integration tests (requires the test raster under assets/ and model weights):
pytest tests/
Run a specific test file:
pytest tests/engine/test_pipeline.py
Building the docs locally
pip install -e ".[docs]"
mkdocs serve
Then open http://localhost:8000 in your browser.
Adding a new component
- Create a config parser in
canopyrs/engine/config_parsers/mycomponent.py(subclassBaseConfig), then add it tocanopyrs/engine/config_parsers/__init__.pyso it can be imported from the package - Create
canopyrs/engine/components/mycomponent.py - Subclass
BaseComponent, declarerequires_state,requires_columns,produces_state,produces_columns - Implement
__call__with the@validate_requirementsdecorator - Register it in
Pipeline.from_config()inpipeline.py - Add a docs entry in
docs/user-guide/components.mdand a new page underdocs/api/components/(then register it inmkdocs.ymlnav)
Code style
- Follow existing patterns in the component files
- Keep component logic focused — I/O and state updates are the pipeline's job
- Add hints to
state_hintsandcolumn_hintsfor helpful error messages