This section provides detailed information about how each tool in this template is configured. Understanding these configurations will help you customize the environment to match your project's specific needs.
| File | Tool | Purpose | Reference |
|---|---|---|---|
pyproject.toml, .devcontainer/devcontainer.json |
uv, Project | Dependencies, project metadata, Dev Container and VS Code settings | uv |
ruff.toml |
Ruff | Linting and formatting rules | Ruff |
ty.toml |
ty | Type checking configuration | ty |
.sqruff |
sqruff | SQL linting and formatting rules | sqruff |
pytest.ini |
pytest | Testing and coverage settings | Test |
.pre-commit-config.yaml |
pre-commit | Hook definitions | pre-commit |
noxfile.py |
nox | Task automation | Task Automation with nox |
.env, .env.local |
Settings |
Environment variables | Configuration Management |
Update project metadata:
# pyproject.toml
[project]
name = "your-project-name"
version = "1.0.0"
description = "Your project description"
requires-python = ">=3.11"To change linting rules, coverage requirements, or type checking targets, edit the file listed above; each reference page explains its options.
The default configurations are production-tested. Only modify when you have a specific need.
If you modify configurations, document why:
# ruff.toml
[lint]
ignore = [
"D100", # Exclude module docstring (team decision 2024-01-15)
]Ensure configurations work together:
- Ruff's line length should match your formatting preferences
- Type checking directories in
ty.tomlshould match your project structure - Test patterns should align with your file structure
Commit configuration files to git. .env is ignored by git, so put secrets there; .env.local is committed (see Configuration Management).
Configuration changes affect the entire team. Discuss before making major changes:
- Changing coverage requirements
- Modifying linting rules
- Updating Python version requirements
Ruff and other formatters: The template is configured to avoid conflicts. If you add other formatters, they may conflict with Ruff.
Solution: Use Ruff exclusively (it replaces Black, isort, etc.)
After modifying configurations:
- Reload the VSCode window:
Cmd/Ctrl+Shift+P→ "Developer: Reload Window" - Ensure the Dev Container rebuilt if you changed
devcontainer.json
If hooks fail after configuration changes:
# Update pre-commit hooks
uv run pre-commit autoupdate
# Reinstall hooks
uv run pre-commit uninstall
uv run pre-commit installIf migrating from pip:
# Export current dependencies
pip freeze > requirements.txt
# Add to pyproject.toml
uv add $(cat requirements.txt)
# Remove old files
rm requirements.txtRuff replaces both. Remove old configs:
# Remove old configuration files
rm .black.toml setup.cfg .isort.cfg
# Configure Ruff in ruff.toml (already done in template)- Customize your setup: Read the detailed configuration guides
- Understand the tools: Check the Development Guides
- See it in action: Browse Use Cases
- uv: Official Documentation
- Ruff: Official Documentation
- ty: Official Documentation
- pytest: Official Documentation
- pre-commit: Official Documentation