-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml.j2
213 lines (190 loc) · 6.38 KB
/
pyproject.toml.j2
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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
[tool.poetry]
name = "{{ project_slug }}"
version = "0.0.0"
description = "{{ project_short_description }}"
authors = ["{{ author_name }} <{{ author_email }}>"]
maintainers = ["{{ author_name }} <{{ author_email }}>"]
license = "
{%- if software_license == "Apache License 2.0" -%}
Apache-2.0
{%- elif software_license == "Artistic License 2.0" -%}
Artistic-2.0
{%- elif software_license == "BSD 2-Clause \"Simplified\" License" -%}
BSD-2-Clause
{%- elif software_license == "BSD 3-Clause Clear License" -%}
BSD-3-Clause-Clear
{%- elif software_license == "BSD 3-Clause \"New\" or \"Revised\" License" -%}
BSD-3-Clause
{%- elif software_license == "Boost Software License 1.0" -%}
BSL-1.0
{%- elif software_license == "Creative Commons Attribution 4.0" -%}
CC-BY-4.0
{%- elif software_license == "Creative Commons Attribution Share Alike 4.0" -%}
CC-BY-SA-4.0
{%- elif software_license == "Creative Commons Zero v1.0 Universal" -%}
CC0-1.0
{%- elif software_license == "Do What The F*ck You Want To Public License" -%}
WTFPL
{%- elif software_license == "Educational Community License v2.0" -%}
ECL-2.0
{%- elif software_license == "Eclipse Public License 1.0" -%}
EPL-1.0
{%- elif software_license == "Eclipse Public License 2.0" -%}
EPL-2.0
{%- elif software_license == "European Union Public License 1.1" -%}
EUPL-1.1
{%- elif software_license == "European Union Public License 1.2" -%}
EUPL-1.2
{%- elif software_license == "GNU Affero General Public License v3.0" -%}
AGPL-3.0
{%- elif software_license == "GNU General Public License v2.0" -%}
GPL-2.0
{%- elif software_license == "GNU General Public License v3.0" -%}
GPL-3.0
{%- elif software_license == "GNU Lesser General Public License v2.1" -%}
LGPL-2.1
{%- elif software_license == "GNU Lesser General Public License v3.0" -%}
LGPL-3.0
{%- elif software_license == "ISC License" -%}
ISC
{%- elif software_license == "LaTeX Project Public License v1.3c" -%}
LPPL-1.3c
{%- elif software_license == "MIT License" -%}
MIT
{%- elif software_license == "Mozilla Public License 2.0" -%}
MPL-2.0
{%- elif software_license == "Microsoft Public License" -%}
MS-PL
{%- elif software_license == "Microsoft Reciprocal License" -%}
MS-RL
{%- elif software_license == "University of Illinois/NCSA Open Source License" -%}
NCSA
{%- elif software_license == "SIL Open Font License 1.1" -%}
OFL-1.1
{%- elif software_license == "Open Software License 3.0" -%}
OSL-3.0
{%- elif software_license == "PostgreSQL License" -%}
PostgreSQL
{%- elif software_license == "The Unlicense" -%}
Unlicense
{%- elif software_license == "zlib License" -%}
Zlib
{%- endif %}"
readme = "README.md"
homepage = "https://github.com/{{ github_username }}/python-{{ project_slug }}"
repository = "https://github.com/{{ github_username }}/python-{{ project_slug }}"
documentation = "https://github.com/{{ github_username }}/python-{{ project_slug }}"
keywords = ["{{ project_slug }}", "api", "async", "client"]
classifiers = [
"Framework :: AsyncIO",
"Intended Audience :: Developers",
"License :: OSI Approved :: {{ software_license }}",
"Natural Language :: English",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3",
"Topic :: Software Development :: Libraries :: Python Modules",
]
packages = [
{ include = "{{ package_name }}", from = "src"},
]
[tool.poetry.dependencies]
aiohttp = ">=3.0.0"
python = "^3.11"
yarl = ">=1.6.0"
[tool.poetry.urls]
"Bug Tracker" = "https://github.com/{{ github_username }}/python-{{ project_slug }}/issues"
Changelog = "https://github.com/{{ github_username }}/python-{{ project_slug }}/releases"
[tool.poetry.group.dev.dependencies]
aresponses = "3.0.0"
codespell = "2.3.0"
covdefaults = "2.3.0"
coverage = {version = "7.6.8", extras = ["toml"]}
mypy = "1.13.0"
pre-commit = "4.0.1"
pre-commit-hooks = "5.0.0"
pylint = "3.3.1"
pytest = "8.3.3"
pytest-asyncio = "0.24.0"
pytest-cov = "6.0.0"
ruff = "0.8.0"
syrupy = "4.8.0"
yamllint = "1.35.1"
[tool.coverage.run]
plugins = ["covdefaults"]
source = ["{{ package_name }}"]
[tool.coverage.report]
fail_under = 90
show_missing = true
[tool.mypy]
# Specify the target platform details in config, so your developers are
# free to run mypy on Windows, Linux, or macOS and get consistent
# results.
platform = "linux"
python_version = "3.11"
# flake8-mypy expects the two following for sensible formatting
show_column_numbers = true
# show error messages from unrelated files
follow_imports = "normal"
# suppress errors about unsatisfied imports
ignore_missing_imports = true
# be strict
check_untyped_defs = true
disallow_any_generics = true
disallow_incomplete_defs = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_decorators = true
disallow_untyped_defs = true
no_implicit_optional = true
no_implicit_reexport = true
strict_optional = true
warn_incomplete_stub = true
warn_no_return = true
warn_redundant_casts = true
warn_return_any = true
warn_unused_configs = true
warn_unused_ignores = true
[tool.pylint.MASTER]
ignore = ["tests"]
[tool.pylint.BASIC]
good-names = ["_", "ex", "fp", "i", "id", "j", "k", "on", "Run", "T"]
[tool.pylint."MESSAGES CONTROL"]
disable= [
"duplicate-code",
"format",
"unsubscriptable-object",
]
[tool.pylint.SIMILARITIES]
ignore-imports = true
[tool.pylint.FORMAT]
max-line-length = 88
[tool.pylint.DESIGN]
max-attributes = 20
[tool.pytest.ini_options]
addopts = "--cov"
asyncio_mode = "auto"
[tool.ruff]
lint.select = ["ALL"]
lint.ignore = [
"ANN401", # Opinioated warning on disallowing dynamically typed expressions
"D203", # Conflicts with other rules
"D213", # Conflicts with other rules
"D417", # False positives in some occasions
"PLR2004", # Just annoying, not really useful
"SLOT000", # Has a bug with enums: https://github.com/astral-sh/ruff/issues/5748
# Conflicts with the Ruff formatter
"COM812",
"ISC001",
]
[tool.ruff.lint.flake8-pytest-style]
mark-parentheses = false
fixture-parentheses = false
[tool.ruff.lint.isort]
known-first-party = ["{{ package_name }}"]
[tool.ruff.lint.mccabe]
max-complexity = 25
[build-system]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core>=1.0.0"]