Contributing to CytoScnPy¶
Thank you for your interest in contributing to CytoScnPy!
Prerequisites¶
- Rust: Version 1.70 or higher.
- Cargo: Comes with Rust.
- Python: Version 3.10 or higher.
- UV or pip: For Python dependency management.
- Maturin: Included in the dev environment, or install manually with
pip install maturin.
Setup Development Environment¶
- Fork and Clone:
- Create Virtual Environment:
- Install Dependencies & Build:
- Install the docs generator:
Runs plissken render plissken.toml automatically before python -m mkdocs build or mkdocs serve, so you only need to rerun the command manually when you want to force a fresh render outside of the MkDocs lifecycle.
- Run Tests:
The full prek gate includes formatting/linting, Rust checks, uv lock/export hooks, strict basedpyright, and pip-audit.
Development Workflow¶
-
Create a Branch:
git checkout -b feature/your-feature -
Make Changes:
- Run
cargo fmtto format. - Run
cargo clippyto lint. -
Run
prek run --all-filesbefore opening a PR; it includes strictbasedpyrightandpip-audit. -
Test:
cargo test(Rust unit tests)-
uv run pytest python/tests(Python integration tests) -
Submit PR:
- Push to your fork.
- Open a Pull Request on GitHub.
Project Structure¶
cytoscnpy/- Rust core library & analysis engine.python/- Python wrapper & CLI entry point.editors/vscode/- VS Code extension.cytoscnpy-mcp/- MCP server implementation.
Testing¶
We have a comprehensive test suite.
See tests/README.md for detailed testing guide.