-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml.jinja
More file actions
87 lines (80 loc) · 1.88 KB
/
Copy pathpyproject.toml.jinja
File metadata and controls
87 lines (80 loc) · 1.88 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
[project]
name = "{{project_name}}"
version = "0.4.0"
description = "{{project_description}}"
readme = "README.md"
authors = [
{ name = "{{author_name}}", email = "{{author_email}}" }
]
requires-python = ">=3.10"
{%- if include_license %}
{%- set spdx_map = {
'mit': 'MIT',
'apache-2.0': 'Apache-2.0',
'gpl-2.0': 'GPL-2.0-only',
'gpl-3.0': 'GPL-3.0-only',
'lgpl-2.0': 'LGPL-2.0-only',
'lgpl-2.1': 'LGPL-2.1-only',
'lgpl-3.0': 'LGPL-3.0-only',
'mpl-2.0': 'MPL-2.0'
} %}
license = "{{ spdx_map.get(license_type, license_type) }}"
license-files = ["LICENSE"]
{%- endif %}
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3"
]
dependencies = [
{%- for dep in production_deps %}
"{{dep}}",
{%- endfor %}
]
[project.optional-dependencies]
dev = [
{%- for dep in dev_deps %}
"{{dep}}",
{%- endfor %}
]
[build-system]
requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
addopts = [
"--durations=5",
"--durations-min=0.0",
"--tb=short",
{%- if "pytest-cov" in dev_deps %}
"--cov={{project_name}}",
"--cov-report=html",
"--cov-report=term-missing",
{%- endif %}
]
[tool.coverage.run]
source = ["src"]
omit = ["*/tests/*"]
{%- if "ruff" in dev_deps %}
[tool.ruff]
line-length = 120
target-version = "py310"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"F", # Pyflakes
"UP", # pyupgrade
"B", # flake8-bugbear
"I", # isort
]
ignore = [
"E501", # line-too-long (formatter handles wrapping, but may exceed limit)
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
{%- endif %}