Contributing¶
Thank you for your interest in improving btorch! This page covers the basics of getting set up and submitting changes.
Development Setup¶
- Clone the repository
- Install development dependencies
- Install pre-commit hooks
Running Checks¶
Before opening a pull request, run the following checks:
For faster feedback, run targeted subsets:
Code Style¶
- Match existing module structure and naming.
- Use modern Python type annotations (
|,list,dict). - Use
jaxtypingfor tensor shapes where it clarifies intent. - Keep lines within 88 characters.
- Use Google-style docstrings.
- Write comments and docstrings in English.
Documentation¶
- Update
docs/for any user-facing API changes. - Update
README.mdfor installation or workflow changes. - New API pages should use
mkdocstrings(btorch.module.path) rather than hand-written signatures.
Pull Request Workflow¶
- Create a feature branch from
main. - Make focused, atomic commits.
- Ensure all checks pass.
- Open a PR with a clear description of the change and its motivation.
Questions?¶
Open a GitHub Discussion or check the FAQ.