Optimized for quick, safe contributions. Keep changes small, fully-typed, lint-clean, and tested.
- Python:
>=3.11 - Runner: Astral
uv - Lint/Format:
ruff - Typing:
ty - Testing:
pytest - Entrypoint:
main.py - Config:
config.py - Secrets:
.env(loaded viapython-dotenv) - External Tool:
speedtest(viabrew)
- Sync Dependencies:
uv sync - Run Application:
uv run python main.py - Run Tests:
uv run pytest -q - Check & Fix All:
uv run ruff check --fix . && uv run ruff format . && uv run ty check - Add Dependency:
uv add <package>
To enable zero-setup execution, main.py uses TOML frontmatter to declare its runtime dependencies. This allows running the app via uv run python main.py without requiring a prior uv sync.
The dependencies in the main.py frontmatter must be kept in sync with the core application dependencies in pyproject.toml.
Example:
# /// script
# dependencies = [
# "python-dotenv",
# "requests<3",
# ]
# ///
import requests
# ... app codeConstraint: This frontmatter method is only for the application's entry point (main.py). All runtime dependencies required by main.py and any local modules it imports (e.g., helper.py) must be declared in the frontmatter of main.py.
-
Branch from
main. -
Make small, atomic commits using the Conventional Commits spec.
-
Ensure all checks pass locally before opening a Pull Request:
uv run ruff check --fix . && uv run ruff format .- (see pyproject.toml for ruff criteria)
uv run ty checkuv run pytest
-
The PR must have a clear summary of the problem and solution.
-
Confirm there is no scope creep.
-
Do not commit secrets.