Contributing
Pull Request Workflow
Contributing to the main branch follows standard PR standards:
- Open a pull request from your feature branch to
main. - Pass all CI checks — linting, formatting, and tests must all pass.
- Request a review from relevant moderators. If unsure, ask the repository owner.
- Apply requested changes if needed.
- Acquire approval from a reviewer.
- Merge — this automatically triggers the workflow that syncs changes to the public repository.
Code Style
Asparagus uses ruff for linting and formatting.
# Install ruff
pip install ruff
# Lint (check only)
ruff check asparagus/
# Lint and auto-fix
ruff check --fix asparagus/
# Format
ruff format asparagus/
Run tests locally with pytest:
pytest
Feature Branches
Work on project-specific code on a feature branch branched from main:
git checkout main
git pull
git checkout -b my-project/feature-name
Keep your branch up to date by continuously merging main into it:
git fetch origin
git merge origin/main
Once your project is complete and the paper has been posted to ArXiv, open a PR to merge the code into main for public release.
Sharing QOL Improvements Early
If your project includes improvements to Asparagus that don't reveal anything confidential about your project (e.g., bug fixes, performance improvements, new utility functions), we strongly encourage you to:
- Implement the improvement on a separate feature branch (branched from
main, not from your project branch). - Merge it into
mainseparately. - Merge
mainback into your project branch.
This keeps all users of Asparagus up to date and makes your eventual project merge much easier.
Documentation
Documentation lives in docs/ and is built with MkDocs Material.
# Install docs dependencies
pip install -e ".[docs]"
# Preview locally
mkdocs serve
# Build static site
mkdocs build