-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
245 lines (199 loc) · 6.62 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
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
# This is a comment.
# syntax-documentation:
# - https://python-poetry.org/docs/pyproject
# - https://flit.readthedocs.io/en/latest/pyproject_toml.html
#
# NOTE: you have to use single-quoted strings in TOML for regular expressions.
# It's the equivalent of r-strings in Python. Multiline strings are treated as
# verbose regular expressions by Black. Use [ ] to denote a significant space
# character.
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.black]
include = '\.py$' # regex -> single-quotes
line-length = 120
target-version = ["py312"]
[tool.coverage.html]
directory = "var/coverage/html"
[tool.coverage.xml]
output = "var/coverage/coverage.xml"
[tool.coverage.report]
# cfr. https://coverage.readthedocs.io/en/coverage-4.2/excluding.html
exclude_lines = [
"pragma: no cover",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
]
include = ["src/*"]
[tool.coverage.run]
branch = true
data_file = "var/coverage/coverage.db" # defaults to .coverage
[tool.flake8]
max_line_length = 140
per_file_ignores = [
"__init__.py:F401", # F401: imported but unused
]
[tool.isort]
line_length = 120 # corresponds to -w flag
multi_line_output = 3 # corresponds to -m flag
include_trailing_comma = true # corresponds to -tc flag
skip_glob = '^((?!py$).)*$' # isort all Python files
known_third_party = []
[tool.mypy]
# cfr https://mypy.readthedocs.io/en/stable/config_file.html#using-a-pyproject-toml-file
cache_dir = "var/cache/mypy"
check_untyped_defs = true
# disallow_untyped_defs = true
exclude = "^bin/"
ignore_missing_imports = true
[tool.nox]
envdir = "var/cache/nox"
[tool.poetry]
name = "httpclient_logging"
version = "1.0.1a0"
description = " python-package"
readme = "docs/readme.md"
license = "MIT"
authors = ["Wouter Vanden Hove <[email protected]>"]
maintainers = ["Wouter Vanden Hove <[email protected]>"]
repository = "https://github.com/libranet/httpclient_logging"
documentation = "https://httpclient-logging.readthedocs.io"
keywords = ["entrypoints", "sitecustomize", "httpclient", "logging"]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: Implementation :: CPython",
"Typing :: Typed",
]
packages = [{ include = "httpclient_logging", from = "src" }]
[tool.poetry.dependencies]
# These packages are mandatory and form the core of this package’s distribution.
# python = ">=3.8.0,<4.0"
python = ">=3.8.0"
sitecustomize-entrypoints = ">=0.1.0"
[tool.poetry.group.dev.dependencies]
autoread-dotenv = ">=1.0.2"
libranet-logging = ">=1.3"
[tool.poetry.group.linting.dependencies]
black = { version = ">=22.1", allow-prereleases = true }
flake8 = ">=4.0"
flake8-bugbear = ">=23.2"
flake8-pyproject = ">=1.2"
isort = ">=5.10"
pre-commit = ">=2.14"
pre-commit-hooks = ">=4.1"
pylint = ">=2.12"
ruff = ">=0.0"
[tool.poetry.group.docs.dependencies]
Sphinx = ">=4.4"
sphinx-rtd-theme = ">=1.0"
recommonmark = ">=0.7"
sphinx-autoapi = ">=1.8"
autoapi = ">=2.0"
[tool.poetry.group.ipython.dependencies]
ipdb = ">=0.13"
ipython = ">=8.4"
[tool.poetry.group.profiling.dependencies]
importtime-waterfall = ">=1.0"
tuna = ">=0.5"
[tool.poetry.group.security.dependencies]
bandit = { extras = ["toml"], version = ">=1.7" }
[tool.poetry.group.testing.dependencies]
nox = ">=2022.11"
# nox-poetry = ">=1.0"
pytest = ">=7.2"
pytest-cov = ">=3.0"
# pytest-freezegun = ">=0.4" # superseded by pytest-freezer
pytest-freezer = ">=0.4"
pytest-mock = ">=3.10"
# tox = ">=4.4"
[tool.poetry.group.typing.dependencies]
lxml = { version = ">=4.9", optional = true, allow-prereleases = false } # mypy coverage-report
mypy = ">=0.9"
[tool.poetry.urls]
# Docs = "https://httpclient-logging.readthedocs.io"
# Repository = "https://github.com/libranet/httpclient-logging"
Issues = "https://github.com/libranet/httpclient-logging/issues"
Changelog = "https://github.com/libranet/httpclient-logging/releases"
Pypi = "https://pypi.org/project/httpclient-logging"
# [tool.poetry-dynamic-versioning]
# # cfr https://github.com/mtkennerly/poetry-dynamic-versioning
# enable = true
# vcs = "git"
# style = "semver"
# [tool.poetry-dynamic-versioning.substitution]
# files = ["src/*/__init__.py", "src/*/__version__.py", "docs/changes.md"]
[tool.poetry.plugins] # Optional super table
[tool.poetry.plugins."sitecustomize"]
# https://python-poetry.org/docs/pyproject/#plugins
# https://github.com/Darsstar/sitecustomize-entrypoints/blob/main/src/sitecustomize/__init__.py
httpclient_logging = "httpclient_logging.patch:configure"
[tool.poetry-release]
disable-dev = false
disable-push = false
disable-tag = false
sign-commit = false
sign-tag = false
post-release-commit-message = "Start next development iteration {next_version}"
release-commit-message = "Release {package_name} {version}"
tag-name = "{version}"
release-replacements = [
{ file = "docs/changes.md", pattern = "Unreleased \\(YYYY-MM-DD\\)", replace = "{version} ({date})" },
{ file = "src/httpclient_logging/__init__.py", pattern = '__version__ = "{version}"', replace = '__version__ = "{next_version}"' },
]
[tool.pylint.format]
max-line-length = 120
good-names = [
"i", # counter in loop
"ok", # status
"ts", # timestamp or timeseries object
]
[tool.pylint.messages_control]
disable = [
"C0116", # missing-function-docstring
]
[tool.pytest.ini_options]
cache_dir = "var/cache/pytest"
log_cli = false # enable to show log-output
log_cli_level = "NOTSET"
filterwarnings = []
markers = ["unit", "integration"]
testpaths = ["tests"]
# the junit-report is used to report coverage in gitlab
addopts = "--junit-xml='var/coverage/pytest.xml' --cov --cov-append "
[tool.tox]
# see https://tox.wiki/en/3.5.0/example/basic.html#pyproject-toml-tox-legacy-ini
legacy_tox_ini = """
[tox]
envlist = py{39,310,311}
# envlist = [py39, py310, py311]
isolated_build = True
toxworkdir = var/cache/tox
[testenv]
allowlist_externals =
make
poetry
skip_install = true
commands =
make install
pytest --pdb --exitfirst
"""
[tool.ruff]
# https://beta.ruff.rs/docs/configuration/
# https://github.com/pandas-dev/pandas/blob/main/pyproject.toml
cache-dir = "var/cache/ruff"
ignore = [
"B011", # B011 Do not call assert False since python -O removes these calls.
]
line-length = 120