- Fork and clone the repository
- Install dependencies:
uv sync - Make your changes
- Install
just:uv tool install just-bin - Run checks:
just check - Run tests:
just test - Submit a pull request
- Create a feature branch:
git checkout -b feat/your-feature-name - Write clear commit messages that explain what and why
- Add tests for any new functionality
- Update documentation as needed
- Ensure all checks pass before submitting
- Type hints: Required for all functions and methods
- Docstrings: Use Google style for public APIs
- Line length: 100 characters (enforced by ruff)
- Formatting: Run
just fixto auto-format
Cryptographic subspecs live under src/lean_spec/spec/crypto/. Follow the pattern of an existing one like the xmss package:
mkdir -p src/lean_spec/spec/crypto/my_new_subspec
touch src/lean_spec/spec/crypto/my_new_subspec/__init__.py
mkdir -p tests/spec/crypto/my_new_subspecTests mirror the source layout one-to-one (see tests/spec/crypto/xmss/).
- Write tests that mirror the source structure
- Use
pytest.mark.parametrizefor multiple test cases - Mark slow tests with
@pytest.mark.slow