Contributing¶
-
Fork the repository and develop features on a branch with the following naming scheme:
$USER/feature-name. -
Code formatting and linting with Ruff.
- Option 1: Use
uvx ruff checkanduvx format --checkto check for code quality issues. -
Option 2: Use
uvx pre-commit run -a. To automatically run pre-commit hooks withgit commit, runuvx pre-commit install. -
Spell checking with Typos.
- Option 1: Use
uvx typos --diffanduvx typos -wto check for spelling errors. - Option 2: Use
pre-commithook. - File exclusions: Use
files.extend-includeunder[tool.typos]section to ignore matching files and directories. - Word allowlist: Use
[tool.typos.default.extend-words]to allow words or acronyms that would otherwise be flagged. -
Identifier allowlist: Use
[tool.typos.default.extend-identifiers]to allow variables or constants that would otherwise be flagged. -
Run tests with
uv run --extra dev pytest -n 4. -
Open a pull request on the main repository.
Style Guide¶
- Follow PEP 8 as the baseline for coding style, but prioritize matching the existing style and conventions of the file being modified to maintain consistency.
- Use Google-style docstrings (compatible with Napoleon extension for Sphinx docs).
- Write clear, concise commit messages.
- Keep pull requests focused on a single feature or bug fix.
- Aim for consistency in variable and function names.
- Use
TODO(team): COMMENTto mark general TODOs andTODO($USER): COMMENTto mark user-specific TODOs.