Medium Python

uv scripts and commands

Rule Description

Define scripts in pyproject.toml for common commands:

```toml
[project.scripts]
myapp = "myproject.main:main"

[tool.uv.scripts]
dev = "fastapi dev src/myproject/main.py"
test = "pytest tests/ -v"
lint = "ruff check src/"
format = "ruff format src/"
typecheck = "mypy src/"
```

Run with: `uv run dev`, `uv run test`, etc.

For CI/production:
```bash
# Install dependencies only (no dev)
uv sync --no-dev

# Export to requirements.txt if needed
uv export > requirements.txt
```

Included in Rulesets

Django Best Practices
36 rules • 1 standard
View
FastAPI Guidelines
36 rules • 1 standard
View
Python Standards
33 rules • 2 standards
View
GitHub Actions CI
22 rules • 0 standards
View
CircleCI Standards
22 rules • 0 standards
View
Travis CI Standards
22 rules • 0 standards
View
GitLab CI Standards
22 rules • 0 standards
View
uv Standards
25 rules • 2 standards
View
Code Review Standards
58 rules • 0 standards
View

Add This Rule

Sign in to add this rule to your workspace

Sign in with GitHub

Details

Severity
Medium
Category
Python
Used in
9 rulesets