-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
80 lines (70 loc) · 2.92 KB
/
pyproject.toml
File metadata and controls
80 lines (70 loc) · 2.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
[build-system]
# hatchling is the default build backend for uv projects, lightweight and fast.
# To build a distributable package: uv build
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "project-name"
version = "0.1.0"
authors = [{ name = "author name", email = "author@email.com" }]
description = "Project description"
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.12"
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
]
# Runtime dependencies, installed for all users of this package.
# Use loose versioning for libraries, strict for applications.
# Add: uv add requests
# Remove: uv remove requests
# Upgrade: uv lock --upgrade-package requests
# Examples:
# "requests >= 2.25.0, < 3.0.0"
# "uvicorn[standard] >= 0.15.0"
# "torch @ https://download.pytorch.org/whl/..."
dependencies = []
# Optional extras: for features not all users need, e.g. pip install project-name[viz].
# Unlike dependency-groups (below), extras ARE published with the package and visible
# to downstream consumers. Use them for optional runtime features, not dev tooling.
# Install: uv sync --extra viz (or pip install project-name[viz])
# [project.optional-dependencies]
# viz = ["matplotlib >= 3.0"]
# CLI entrypoint, uncomment to expose a `project-name` command after install.
# The package is already runnable as `python -m project_name` via __main__.py.
# [project.scripts]
# project-name = "project_name.cli:main"
# ---------------------------------------------------------------------------
# Dependency groups are for local development only, NOT published to PyPI.
# Unlike optional extras, they are not consumable by downstream packages.
# Install all groups: uv sync --all-groups
# Install one group: uv sync --group test
# Add to a group: uv add --group dev some-tool
# ---------------------------------------------------------------------------
[dependency-groups]
dev = ["ruff >= 0.9.0"]
docs = ["mkdocs-material >= 9.2.0", "mdx-include >= 1.4.0"]
test = ["coverage >= 7.3.0", "pytest >= 7.4.0", "pytest-cov >= 4.1.0"]
# hatchling needs to know where the package lives when using a src/ layout.
# This line is updated automatically by init.py when renaming the package.
[tool.hatch.build.targets.wheel]
packages = ["src/project_name"]
# ruff handles both linting and formatting (replaces black, isort, flake8).
# Lint: uv run ruff check src/
# Format: uv run ruff format src/
[tool.ruff]
line-length = 119
[tool.ruff.lint]
# E: pycodestyle errors (PEP 8 style violations)
# F: pyflakes (undefined names, unused imports, etc.)
# UP: pyupgrade (modernize syntax for the target Python version)
# I: isort (import ordering)
# D: pydocstyle
select = ["E", "F", "UP", "I"]
isort = { known-first-party = ['project_name', 'tests'] }
pydocstyle = { convention = 'google' }
[tool.coverage.run]
source = ["src"]
[tool.pytest.ini_options]
testpaths = ["tests"]