| name | uv-package-manager-1-version-pinning |
| description | Sub-skill of uv-package-manager: 1. Version Pinning (+4). |
| version | 1.0.0 |
| category | development |
| type | reference |
| scripts_exempt | true |
1. Version Pinning (+4)
1. Version Pinning
uv python pin 3.11
2. Lock File Hygiene
git add uv.lock
uv lock --upgrade
git diff uv.lock
3. Dependency Groups
[project]
dependencies = [
"pandas>=2.0",
"numpy>=1.24",
]
[project.optional-dependencies]
dev = [
"pytest>=7.0",
"ruff>=0.1.0",
]
viz = [
"plotly>=5.0",
"matplotlib>=3.7",
]
ml = [
"scikit-learn>=1.3",
"tensorflow>=2.15",
]
[tool.uv]
dev-dependencies = [
"pytest>=7.0",
"ruff>=0.1.0",
]
4. Scripts Configuration
[project.scripts]
my-cli = "my_project.cli:main"
[tool.uv.scripts]
test = "pytest tests/ -v"
lint = "ruff check src/"
format = "black src/ tests/"
typecheck = "mypy src/"
all = ["lint", "typecheck", "test"]
5. Performance Tips
uv sync
export UV_CACHE_DIR="$HOME/.cache/uv"
uv sync --offline
uv sync --no-dev --no-extras