-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathpyproject.toml
More file actions
175 lines (129 loc) · 3.37 KB
/
pyproject.toml
File metadata and controls
175 lines (129 loc) · 3.37 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
[build-system]
requires = ["poetry-core>=1.2.0", "wheel",]
build-backend = "poetry.core.masonry.api"
[tool.coverage.report]
exclude_lines = [
"pragma: not covered",
"@overload",
]
[tool.coverage.run]
branch = true
relative_files = true
omit = [
".tox/*",
"tests/*",
]
[tool.poetry]
name = "project-name"
version = "0.1.0"
description = "A template Poetry project structure."
packages = [
{ include = "project_name", from = "src" },
]
authors = ["Lari Liuhamo <lari.liuhamo+pypi@gmail.com>",]
maintainers = ["Lari Liuhamo <lari.liuhamo+pypi@gmail.com>",]
include = []
license = "MIT"
readme = "README.md"
homepage = "https://pypi.org/project/project-name/"
repository = "https://github.com/Diapolo10/project-name"
documentation = "https://github.com/Diapolo10/project-name/tree/main/docs"
keywords = [
"python3",
]
classifiers = [
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Typing :: Typed",
]
[tool.poetry.dependencies]
python = "^3.10.0"
python-dotenv = "^1.2.2"
tomli = { version = "^2.4.1", python = "<3.11" }
[tool.poetry.group.dev.dependencies]
mypy = "^1.20.2"
[tool.poetry.group.linters]
optional = true
[tool.poetry.group.linters.dependencies]
ruff = "^0.15.12"
[tool.poetry.group.tests]
optional = true
[tool.poetry.group.tests.dependencies]
pytest = "^9.0.3"
pytest-cov = "^7.1.0"
tox = "^4.53.0"
tox-gh-actions = "^3.5.0"
[tool.poetry.urls]
"Tracker" = "https://github.com/Diapolo10/project-name/issues"
"Changelog" = "https://github.com/Diapolo10/project-name/blob/main/CHANGELOG.md"
[tool.pytest.ini_options]
minversion = "6.0"
addopts = """
--doctest-modules \
--cov=./ \
--cov-append \
--cov-report html:tests/reports/coverage-html \
--cov-report xml:tests/reports/coverage.xml \
--ignore=docs/
"""
testpaths = [
"tests",
]
[tool.ruff]
lint.fixable = ["ALL"]
lint.select = ["ALL"]
lint.ignore = [
"D203", # One blank line before class docstring
"D212", # Multi-line summary first line
"PLR0913", # Too many arguments
"Q000", # Single quotes found but double quotes preferred
]
line-length = 120
show-fixes = true
src = ["src",]
target-version = "py310"
[tool.ruff.lint.flake8-copyright]
author = "Lari Liuhamo"
[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",]
"tests/*" = ["ANN", "ARG", "INP001", "S101",]
"logger.py" = ["N815",]
[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.tox]
legacy_tox_ini = """
[tox]
envlist = py310, py311, py312, py313, pypy3
skip_missing_interpreters = true
[gh-actions]
python =
3.10: py310
3.11: py311
3.12: py312
3.13: py313
pypy-3.11: pypy3
[testenv]
passenv = GITHUB_*
allowlist_externals = poetry
commands =
poetry run pytest
poetry run coverage report
"""