-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
100 lines (87 loc) · 2.85 KB
/
Copy pathpyproject.toml
File metadata and controls
100 lines (87 loc) · 2.85 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
[project]
name = "python-package-template"
version = "0.1.1"
description = "A simple package using pydantic"
readme = "README.md"
requires-python = ">=3.10"
license = "MIT"
authors = [
{name = "AlexAndrewsAI", email = "alex.andrews.ai@protonmail.com"}
]
keywords = ["hello", "world"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dependencies = [
"pydantic>=2.0",
"typer>=0.12.0",
]
[dependency-groups] # uv-specific feature for grouping optional dependencies
dev = [
"pytest>=7.0",
"ruff",
"mypy",
"pytest-cov>=7.1.0",
"pip-audit",
"prek>=0.4.8",
"pymarkdownlnt",
"shellcheck-py>=0.11.0.1",
]
[project.scripts]
hello-world = "python_package_template.cli:app"
[project.urls]
Homepage = "https://github.com/AlexAndrewsAI/python-package-template"
Repository = "https://github.com/AlexAndrewsAI/python-package-template.git"
Documentation = "https://github.com/AlexAndrewsAI/python-package-template#readme"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.uv]
[tool.ruff]
line-length = 88
target-version = "py310"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"F", # pyflakes (undefined names, unused imports)
"W", # pycodestyle warnings
"D", # pydocstyle (docstring conventions)
"S", # flake8-bandit (security checks)
"B", # flake8-bugbear (common bugs)
"I", # isort (import sorting)
"G", # flake8-logging-format (logging format)
"C4", # flake8-comprehensions (comprehension optimizations)
"PT", # flake8-pytest-style (pytest conventions)
"UP", # pyupgrade (modernize Python syntax)
"ARG", # flake8-unused-arguments (unused function arguments)
"RUF", # ruff-specific rules
"SIM", # flake8-simplify (code simplification)
]
ignore = ["D203", "D213"] # Ignore conflicting docstring style rules (one-blank-line-before-class vs multi-line-summary)
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["S101"] # Allow assert statements in tests
[tool.mypy]
python_version = "3.10"
warn_return_any = true # Warn when returning Any from a function
warn_unused_configs = true # Warn about unused mypy configuration
disallow_untyped_defs = true # Require type hints on all function definitions
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "--cov=python_package_template --cov-report=term-missing --cov-fail-under=95"
[tool.coverage.run]
source = ["python_package_template"]
omit = []
parallel = true
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]