Skip to content

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.8 or higher.
  • Maturin: pip install maturin

๐Ÿš€ Setup Development Environment

  1. Fork and Clone:
git clone https://github.com/YOUR_USERNAME/cytoscnpy.git
cd cytoscnpy
  1. Create Virtual Environment:
python -m venv .venv
source .venv/bin/activate  # Linux/macOS
.venv\Scripts\activate     # Windows
  1. Install Dependencies & Build:
pip install maturin
maturin develop -m cytoscnpy/Cargo.toml
  1. Run Tests:
cargo test
pytest python/tests

๐Ÿ”„ Development Workflow

  1. Create a Branch: git checkout -b feature/your-feature

  2. Make Changes:

  3. Run cargo fmt to format.

  4. Run cargo clippy to lint.

  5. Test:

  6. cargo test (Rust unit tests)

  7. pytest (Python integration tests)

  8. Submit PR:

  9. Push to your fork.
  10. 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 documentation.

๐Ÿงช Testing

We have a comprehensive test suite.

# Run all Rust tests
cargo test

# Run specific test
cargo test test_name

See tests/README.md for detailed testing guide.