Python project template powered by UV with fully automated CI/CD workflows, enabling developers to focus on code
- ⚡ Blazing-fast Dependency Management - Next-gen toolchain powered by UV
- 🤖 Automatic Version Control - Semantic versioning based on Conventional Commits
- 🔒 Quality Gates - Automated checks on every commit:
- ✅ Code Formatting (Black)
- ✅ Linting (Flake8)
- ✅ Unit Testing (Pytest)
- 🛠️ Smart Workflow Management - Visual GitHub Actions control
- Install UV:
- MacOS:
brew install uv
- Linux (Debian/Ubuntu/WSL):
curl -LsSf https://astral.sh/uv/install.sh | sh
💡 Verify installation with
uv --version(should return 0.5.x or higher). Full installation guide at UV documentation.
- System Support:
- ✅ Linux
- ✅ macOS
⚠️ Windows (WSL supported)
bash ./scripts/init.shThe initialization script will:
- Configure project metadata
- Create Python virtual environment (in
.venv) - Install Git Hooks (pre-commit & commit-msg)
<type>([scope]): <subject>| Type | Version Impact | Example Scenarios |
|---|---|---|
feat |
Minor ↑ | Add user authentication |
fix |
Patch ↑ | Fix payment timeout |
BREAKING CHANGE |
Major ↑ | Remove legacy API (use ! or body) |
docs/style/test |
No impact | Documentation updates, code formatting, test cases |
feat: Add user registration API➔ Minor version bump (v1.2.3→v1.3.0)fix: Resolve password validation➔ Patch version bump (v1.2.3→v1.2.4)feat!: Remove deprecated API➔ Major version bump (v1.2.3→v2.0.0)docs: Update API documentation➔ No version changestyle: Code formatting➔ No version changetest: Add unit tests➔ No version change
💡 Use
!in commit message or includeBREAKING CHANGE:in body for breaking changes
Generate semantic version tags:
uv run poe tagThis command automatically:
- Calculates version number (based on commit history)
- Generates CHANGELOG
- Commits tag
Standard push commands:
git push origin main # Push main branch
git push --tags # Push tags💡 Ensure tags are pushed to remote to trigger GitHub Actions workflows
View available workflows:
uv run poe action listDefault workflows: release, publish, lint-test
Enable/disable workflows:
uv run poe action toggle --enable release --commit # Enable release workflow and commit
uv run poe action toggle --disable release --commit # Disable release workflow and commit
uv run poe action toggle --enable publish # Enable publish workflow
uv run poe action toggle --disable publish # Disable publish workflow
⚠️ System will prompt for required environment variables when enabling workflows
Original inspiration and base template from python-repo-template.
|
Jarlor Zhang |