Thanks for your interest in contributing to Snob! We welcome contributions of all kinds - from bug reports to code improvements to documentation updates.
Start here:
- Fork the repository on GitHub
- Clone your fork:
git clone https://github.com/yourusername/snob - Set up development environment (see below)
- Pick an issue or create a new one explaining your idea/improvement/fix
- Make changes and add tests
- Submit a pull request
Snob is a Rust-based tool that analyzes Python dependency graphs to selectively run tests. It consists of:
- π¦ Rust CLI and lib (
src/) - Core analysis engine (this is where most development happens) - π Python Library (
snob_lib) - PyO3 bindings for Python integration - π§ͺ Pytest Plugin (
pytest-snob/) - User-facing pytest integration
- Rust 1.88 (automatically installed via
rust-toolchain.toml) - Python 3.9+
- Git for version control
# 1. Clone the repository
git clone https://github.com/alexpasmantier/snob
cd snob
# 2. Install Rust (if not already installed)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# 3. Build the project
cargo build
# 4. Run tests to make sure everything works
cargo test -- --test-threads=1
# 5. (Optional) For Python development
pip install maturinThat's it! You're ready to contribute.
# Check if your code compiles (fast)
cargo check
# Run all tests
cargo test
# Run specific tests
cargo test test_name
# Format code (always do this before committing)
cargo fmt
# Check for common issues
cargo clippy
# Build optimized version
cargo build --release
# Run the CLI tool
cargo run -- --help
cargo run -- src/example.py# Run all tests (including new integration tests)
cargo test
# Run tests with output
cargo test -- --nocapture
# Run single-threaded (useful for debugging)
cargo test -- --test-threads=1
# Run specific test file
cargo test --test integration_test_name
# Run with debug logging
RUST_LOG=debug cargo test test_name -- --nocaptureOnly needed if you're working on the Python bindings:
# Build Python library
maturin develop
# Test Python integration
python -c "import snob_lib; print('Works!')"
# Build for distribution
maturin build --release