Overview
Use this workflow to keep Python implementation and refactoring aligned with repository policy.
Read Acknowledgement
- After reading this skill, say:
🐍 私は python-uv-workflow を読みました。
Workflow
- Use
uvas the default toolchain for Python projects. - Run scripts with
uv run <script>. - Write tests when behavior changes and verify expected behavior.
- Add standard dev dependencies with
uv. - Install pre-commit hooks after dependency setup.
- Create
.pre-commit-config.yamlwhen missing. - Create
Makefilewithsetuptarget when missing. - For refactoring from non-
uvoriginals, align dependencies, raise coverage, and verify output parity.
Testing Expectations
- Add tests before refactoring.
- Prefer real data over mocks and monkeypatches when feasible.
- Target coverage expansion toward 90%+ for refactoring tasks.
Use python-uv-rules.md for exact commands and canonical hook configuration.