Contributing Guidelines¶
Contributing to rgpycrumbs¶
Getting Started¶
1. Fork and Clone¶
git clone https://github.com/your-username/rgpycrumbs
cd rgpycrumbs
2. Set Up Environment¶
uv sync --all-extras
3. Run Tests¶
uv run pytest -m pure
uv run pytest -m surfaces
Code Style¶
Formatting¶
uv run ruff format .
uv run ruff check .
Type Checks¶
uv run --extra lint pyright
The lint workflow runs the same command.
Pyright reads its settings from [tool.pyright] in pyproject.toml.
Type Hints¶
Target: 90%+ coverage.
def ensure_import(module_name: str):
"""Import module through 5-step priority chain."""
...
Pull Request Process¶
Create branch:
git checkout -b feature/nameMake changes with tests
Run CI checks locally
Submit PR on GitHub
Address reviewer comments
Adding New Features¶
New CLI Commands¶
Create
rgpycrumbs/<module>/cli_<name>.pyAdd PEP 723 header
Use click for CLI
Add tests
New Modules¶
Create module directory
Add
__init__.pywith exportsAdd tests
Update documentation
Testing¶
Test Categories¶
@pytest.mark pure- Pure Python tests@pytest.mark surfaces- JAX-dependent tests@pytest.mark interpolation- scipy-dependent tests
Documentation¶
All new features need:
Tutorial (if user-facing)
API reference
How-to guide