-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
229 lines (200 loc) · 6.9 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
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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "formelsammlung"
version = "5.0.0"
description = "Collection of different functions"
authors = ["Christian Riedel <cielquan@protonmail.com>"]
license = "GPL-3.0-or-later"
packages = [{ include = "formelsammlung", from = "src" }]
readme = "README.rst"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Natural Language :: English",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows :: Windows 10",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development",
"Topic :: Utilities",
]
[tool.poetry.urls]
"Issue Tracker" = "https://github.com/Cielquan/formelsammlung/issues"
"Changelog" = "https://formelsammlung.readthedocs.io/en/latest/changelog"
"Documentation" = "https://formelsammlung.readthedocs.io"
"Source" = "https://github.com/Cielquan/formelsammlung"
[tool.poetry.scripts]
env_exe_runner = 'formelsammlung.env_exe_runner:cli_caller'
[tool.poetry.dependencies]
python = "^3.8.1"
# EXTRA flask
flask = {version = ">=1.1.2,<4.0.0", optional = true}
# EXTRA testing
pytest = { version = ">=7.2.0", optional = true }
pytest-cov = {version = ">=3.0", optional = true}
coverage = {extras = ["toml"], version = ">=6.0", optional = true}
coverage-conditional-plugin = { version = ">=0.5", optional = true }
pytest-sugar = { version = ">=0.9.5", optional = true }
pytest-randomly = { version = ">=3.0", optional = true }
pytest-mock = {version = ">=3.7", optional = true}
pytest-flask = {version = ">=1.2", optional = true}
# EXTRA docs
sphinx = { version = ">=6", optional = true }
sphinx-autobuild = { version = "2021.3.14", optional = true }
m2r2 = { version = ">=0.3.2", optional = true }
# TODO:#i# wait for fix: https://github.com/MrDogeBro/sphinx_rtd_dark_mode/issues/28
sphinx-rtd-theme = { version = "^1", optional = true }
sphinx-autodoc-typehints = { version = ">=1.15", optional = true }
sphinxcontrib-apidoc = { version = ">=0.3", optional = true }
sphinxcontrib-spelling = { version = ">=7.3", optional = true }
# MAIN DEPENDENCIES
[tool.poetry.dev-dependencies]
pre-commit = ">=2.17"
tox = ">=4"
my-flake8-plugins = { git = "https://github.com/cielquan/my-flake8-plugins.git", rev = "v1.5.0", extras= ["flakeheaven"]}
pylint = ">=2.12"
mypy = ">=0.931"
pytest = ">=6.0"
pytest-mock = ">=3.7"
sphinx = ">=4.0"
sphinx-rtd-theme = "*"
[tool.poetry.extras]
flask = ["flask"]
testing = [
"pytest",
"pytest-cov",
"coverage",
"coverage-conditional-plugin",
"pytest-sugar",
"pytest-randomly",
"pytest-mock",
"pytest-flask",
]
docs = [
"sphinx",
"m2r2",
"sphinx-rtd-theme",
"sphinx-autodoc-typehints",
"sphinxcontrib-apidoc",
"sphinxcontrib-spelling",
]
# -- BLACK CONFIG ---------------------------------------------------------------------
[tool.black]
line-length = 100
exclude = "venv/"
include = '\.pyi?$' # single quotes needed
# -- ISORT CONFIG ---------------------------------------------------------------------
[tool.isort]
profile = "black"
lines_after_imports = 2
combine_as_imports = true
skip_gitignore = true
# -- MYPY CONFIG ----------------------------------------------------------------------
[tool.mypy]
show_error_codes = true
strict_optional = true
warn_unused_ignores = true
warn_redundant_casts = true
warn_return_any = true
warn_unreachable = true
disallow_any_generics = true
check_untyped_defs = true
implicit_reexport = false
python_version = "3.11" # CHANGE ME
# -- FLAKEHEAVEN CONFIG ----------------------------------------------------------------
[tool.flakeheaven]
base = ["https://raw.githubusercontent.com/Cielquan/my-flake8-plugins/v1.5.0/flakeheaven-base.toml"]
min_python_version = "3.7" # CHANGE ME
[tool.flakeheaven.exceptions."examples"]
flake8-eradicate = ["-E800"]
# -- RSTCHECK CONFIG ------------------------------------------------------------------
[tool.rstcheck]
ignore_directives = ["mdinclude", "spelling:word-list", "click", "jira_issue"]
ignore_roles = ["repo", "issue", "pull","user"]
# -- PYLINT CONFIG --------------------------------------------------------------------
[tool.pylint]
[tool.pylint.messages_control]
disable = [
# deactivate because double check
# https://github.com/PyCQA/pylint/issues/3512
"C0103", # invalid-name - [pep8-naming]
"C0113", # unneeded-not - F713[flake8]
"C0114", # missing-module-docstring - D100,D104[flake8]
"C0115", # missing-class-docstring - D101,D106[flake8]
"C0116", # missing-function-docstring - D102,D103,D105[flake8]
"C0301", # line-too-long - E501[pycodestyle]
"C0303", # trailing-whitespace - W291,W293[falke8]
"C0304", # missing-final-newline - W292[falke8]
"C0305", # trailing-newlines - W291[falke8]
"C0321", # multiple-statements - E701[falke8]
"C0411", # wrong-import-order - I202[flake8]
"C0413", # wrong-import-position - E402[flake8]
"E0602", # undefined-variable - F821[flake8]
"R0912", # too-many-branches - C901[flake8]
"W0301", # unnecessary-semicolon - E703[flake8]
"W0311", # bad-indentation - E111[flake8]
"W0611", # unused-import - F401[flake8]
"W0612", # unused-variable - F841[flake8]
"W0702", # bare-except - E722[pycodestyle]
# deactivate because unwanted
"W0511", # fixme
"R0903", # too-few-public-methods
# deactivate because of bugs
"W1203", # Use % format in logger funcs | https://github.com/PyCQA/pylint/issues/2354
]
[tool.pylint.master]
additional-builtins = "tags"
[tool.pylint.spelling]
spelling-dict = "en_US"
spelling-private-dict-file = "docs/source/spelling_dict.txt"
# -- PYTEST CONFIG --------------------------------------------------------------------
[tool.pytest.ini_options]
addopts = "-ra --showlocals"
# -- COVERAGE CONFIG ------------------------------------------------------------------
[tool.coverage]
[tool.coverage.run]
plugins = ["coverage_conditional_plugin"]
branch = true
parallel = true
context = "static-context"
omit = [
"tests/*",
"docs/*",
]
[tool.coverage.paths]
tox_combine = [
"src/formelsammlung",
"*/.tox/*/lib/python*/site-packages/formelsammlung",
"*/.tox/pypy*/site-packages/formelsammlung",
"*/.tox\\*\\Lib\\site-packages\\formelsammlung",
]
local_combine = [
"src/formelsammlung",
"*/.venv/lib/python*/site-packages/formelsammlung",
"*/.venv\\*\\Lib\\site-packages\\formelsammlung",
"*/src/formelsammlung",
"*\\src\\formelsammlung",
]
[tool.coverage.report]
show_missing = true
exclude_lines = [
"# pragma: no cover",
"if __name__ == ['\"]__main__['\"]:",
"def __str__",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"if 0:",
"if False:",
"if TYPE_CHECKING:",
"if MYPY:",
]
[tool.coverage.html]
show_contexts = true
[tool.coverage.coverage_conditional_plugin.rules]
# use with: # pragma: <KEY>
py-lt-38 = "sys_version_info < (3, 8)"
py-gte-38 = "sys_version_info >= (3, 8)"