-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
95 lines (81 loc) · 2.53 KB
/
pyproject.toml
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
############################
# --- Package Settings --- #
############################
[project]
name = "pyprojen"
description = "Minimal, spiritual fork of projen. No JSII. Python focused."
authors = [{ name = "Eric Riddoch", email = "[email protected]" }]
readme = "README.md"
requires-python = ">=3.7"
license = { text = "MIT" }
dependencies = ["pyyaml", "jsonpatch", "tomlkit",]
classifiers = ["Programming Language :: Python :: 3"]
keywords = ["one", "two"]
# version will be derived dynamically from version.txt via setuptools
dynamic = ["version"]
# docs: https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html#dynamic-metadata
[tool.setuptools.dynamic]
version = { file = "version.txt" }
# optional dependencies can be installed with square brackets, e.g. `pip install my-package[test,static-code-qa]`
[project.optional-dependencies]
test = ["pytest", "pytest-cov"]
release = ["build", "twine"]
static-code-qa = [
"pre-commit",
"pylint",
"black",
"isort",
"flake8",
"flake8-docstrings",
"Flake8-pyproject",
"radon",
]
# Installing dev depenendencies in your virtual env makes it so that during development VS Code can
# - surface linting errors
# - automatically apply formatting
# - show enhanced autocompletion for stubs libraries
# See .vscode/settings.json to see how VS Code is configured to use these tools
dev = ["pyprojen[test,release,static-code-qa]"]
[build-system]
# Minimum requirements for the build system to execute.
requires = ["setuptools>=61.0.0", "wheel"]
build-backend = "setuptools.build_meta"
# include more than only .py files in the distribution package (wheel)
[tool.setuptools.package-data]
pyprojen = ["*.json"]
##############################
# --- Code Quality Tools --- #
##############################
[tool.pytest.ini_options]
markers = ["slow: marks tests as slow (deselect with '-m \"not slow\"')"]
[tool.black]
line-length = 119
# regular expression ignoring multiple patterns separated by '|' and newlines
exclude = '''
/(
\.venv
| venv
)/
'''
[tool.flake8]
docstring-convention = "all"
ignore = ["D107", "D212", "E501", "W503", "W605", "D203", "D100"]
exclude = ["venv"]
max-line-length = 119
# radon
radon-max-cc = 10
[tool.isort]
profile = "black"
multi_line_output = "VERTICAL_HANGING_INDENT"
force_grid_wrap = 2
line_length = 119
[tool.pylint."messages control"]
disable = [
"line-too-long",
"trailing-whitespace",
"missing-function-docstring",
"consider-using-f-string",
"import-error",
"too-few-public-methods",
"redefined-outer-name",
]