Contributing¶
Dev setup¶
Yilan uses uv for dependency management.
Running the tests¶
Or via nox (runs tests across all supported Python versions):
Quality gate¶
All of the following must pass with zero errors before a change is done:
uv run ruff check .
uv run ty check .
uv run complexipy .
uv run nox # full gate: ruff, ty, complexipy, pysentry, tests, deptry, dependency_versions
TDD workflow¶
- Write a failing test.
- Confirm it fails:
uv run tryke test tests/. - Implement the minimum code to make it pass.
- Re-run the full quality gate.
No exceptions — this applies to bug fixes as well as new features.
Commit style¶
Commits use gitmoji prefixes:
| Emoji | Code | When |
|---|---|---|
| 📝 | :memo: |
Documentation |
| ✨ | :sparkles: |
New feature |
| 🐛 | :bug: |
Bug fix |
| ♻️ | :recycle: |
Refactor |
| 🔧 | :wrench: |
Config / tooling |
Branch workflow¶
mainis protected — never commit directly.- Create a feature branch:
git checkout -b feat/my-change. - Commit after each logical step.
- Open a PR targeting
main.
Code style¶
- No abbreviated variable names — use
repository_name, notrepoorrn. - Always use keyword arguments at call sites.
- Google-style docstrings on all public and private functions, classes, and modules.
- Dependencies in
pyproject.tomlmust be sorted alphabetically (case-insensitive).