-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
120 lines (106 loc) · 3.28 KB
/
Copy pathpyproject.toml
File metadata and controls
120 lines (106 loc) · 3.28 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
[build-system]
requires = ["maturin>=1.14.1,<2.0"]
build-backend = "maturin"
[project]
name = "project-name"
description = "A template mixed language (Python/Rust) project structure."
dynamic = ["version"] # Taken from Cargo.toml
readme = "README.md"
requires-python = ">=3.12"
license = { file = "LICENSE" }
dependencies = []
authors = [{ name = "Lari Liuhamo", email = "lari.liuhamo+pypi@gmail.com" }]
maintainers = [{ name = "Lari Liuhamo", email = "lari.liuhamo+pypi@gmail.com" }]
keywords = ["python3", "rust"]
classifiers = [
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Rust",
"Typing :: Typed",
]
[project.urls]
"Source code" = "https://github.com/Diapolo10/project-name"
"Changelog" = "https://github.com/Diapolo10/project-name/blob/main/CHANGELOG.md"
"Documentation" = "https://github.com/Diapolo10/project-name/tree/main/docs"
"Tracker" = "https://github.com/Diapolo10/project-name/issues"
[dependency-groups]
dev = [
"jinja2>=3.1.6",
"mypy>=2.3.1",
"pytest>=9.1.1",
"pytest-benchmark>=5.3.0",
"pytest-cov>=7.1.0",
"pytest-xdist[psutil]>=3.8.0",
"ruff>=0.16.4",
"sphinx>=9.1.0",
]
[tool.coverage.run]
branch = true
relative_files = true
omit = ["tests/*"]
[tool.maturin]
auditwheel = "repair"
bindings = "pyo3"
module-name = "project_name._project_name"
python-source = "python"
sdist-generator = "cargo"
strip = true
[tool.mypy]
exclude = ["bin", "build", "dist", "target"]
warn_unused_configs = true
warn_unused_ignores = true
[tool.pytest]
addopts = [
"--benchmark-autosave",
"--cov=./",
"--cov-append",
"--cov-report=html:tests/reports/coverage-html",
"--cov-report=term-missing:skip-covered",
"--cov-report=xml:tests/reports/coverage.xml",
"--dist=worksteal",
"--doctest-modules",
"--durations=5",
"--durations-min=1.0",
"--ignore=docs/",
"-n=logical",
]
filterwarnings = ["ignore::pytest_benchmark.logger.PytestBenchmarkWarning"]
minversion = "9.0"
testpaths = ["tests"]
[tool.ruff]
lint.select = ["ALL"]
lint.ignore = [
"COM812", # Missing trailing comma (disabled due to formatter conflict)
"CPY001", # Missing copyright notice at the top of the file
"D203", # One blank line before class docstring
"D212", # Multi-line summary first line
"ISC001", # Single-line implicit string concatenation (disabled due to formatter conflict)
"PLR0913", # Too many arguments
"Q000", # Single quotes found but double quotes preferred
]
line-length = 120
show-fixes = true
src = ["python"]
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
multiline-quotes = "double"
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.per-file-ignores]
# https://beta.ruff.rs/docs/rules/
"__init__.py" = ["F401", "F403", "F405", "PGH003"]
"tests/*" = ["ANN", "ARG", "INP001", "S101"]
[tool.ruff.lint.pylint]
max-args = 15
max-branches = 20
max-returns = 10
max-statements = 80
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.uv]
constraint-dependencies = ["pygments>=2.20.0"]