-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
230 lines (200 loc) · 6.36 KB
/
pyproject.toml
File metadata and controls
230 lines (200 loc) · 6.36 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
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
# This is a comment.
# syntax-documentation:
# - https://docs.astral.sh/uv/concepts/projects/#project-metadata
# - 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.
#
# Usage with uv:
# > uv sync --all-groups
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "httpclient_logging"
version = "1.1"
requires-python = ">=3.8"
description = " python-package"
readme = "docs/readme.md"
# license = "MIT"
license = { file = "license.md" }
authors = [{name = "Wouter Vanden Hove", email = "wouter@libranet.eu"}]
maintainers = [{name = "Wouter Vanden Hove", email = "wouter@libranet.eu"}]
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.14",
"Programming Language :: Python :: 3.13",
"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",
]
dependencies = [
"importlib-metadata >= 7.0; python_version < '3.10'",
"sitecustomize-entrypoints >= 1.1.0",
]
[project.urls]
Docs = "https://httpclient-logging.readthedocs.io"
Pypi = "https://pypi.org/project/httpclient-logging"
Repo = "https://github.com/libranet/httpclient-logging"
Issues = "https://github.com/libranet/httpclient-logging/issues"
Changelog = "https://github.com/libranet/httpclient-logging/releases"
[dependency-groups]
dev = [
"autoread-dotenv >= 1.0",
"libranet-logging >= 1.0",
]
docs = [
"autoapi >= 2.0.1",
"mdformat >= 0.7",
"mdformat-gfm >= 0.3",
"mdformat-frontmatter >= 2.0",
"mdformat-tables >= 1.0",
"myst-parser >= 2.0, < 4.0; python_version < '3.10'",
"myst-parser >= 4.0; python_version >= '3.10'",
"sphinx >= 7.1.2",
"sphinx-rtd-theme >= 3.0.1",
"sphinx-autoapi >= 3.3.3",
]
ipython = [
"ipdb >= 0.13.13",
"ipython >= 8.12.3",
]
linting = [
"pre-commit >= 3.5.0",
"pre-commit-hooks >= 5.0.0",
"pylint >= 3.2.7",
"ruff >= 0.7.2",
]
profiling = [
"importtime-waterfall >= 1.0.0",
"tuna >= 0.5.11",
]
releasing = [
"pyroma>=4.0",
]
security = [
"bandit >= 0.0",
]
testing = [
"freezegun>=1.5.1",
"pytest >= 8.3.3",
"pytest-cov >= 5.0.0",
"pytest-freezer >= 0.4.8",
"pytest-mock >= 3.14.0",
]
typing = [
"lxml >=4.9",
"mypy >= 1.13.0",
"ty>=0.0.1a32",
]
# https://packaging.python.org/en/latest/guides/creating-and-discovering-plugins/
# https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#advanced-plugins
# https://github.com/Darsstar/sitecustomize-entrypoints/blob/main/src/sitecustomize/__init__.py
[project.entry-points."sitecustomize"]
httpclient_logging = "httpclient_logging.patch:configure"
[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.mdformat]
# https://mdformat.readthedocs.io/en/stable/users/configuration_file.html
wrap = "keep" # preserve line wrapping
number = false # don't renumber ordered lists
end_of_line = "lf"
[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.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.ruff]
# https://beta.ruff.rs/docs/configuration/
# https://github.com/pandas-dev/pandas/blob/main/pyproject.toml
cache-dir = "var/cache/ruff"
line-length = 120
target-version = "py39"
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"B011", # Do not call assert False since python -O removes these calls.
"ERA001", # Found commented-out code
"G004", # Logging statement uses f-string
"RET504", # Unnecessary assignment before `return` statement
# D212 conflicts with D213 - we prefer D212, so we ignore D213
"D213", # Multi-line docstring summary should start at the second line
# D211 conflicts with D203 - we prefer D211, so we ignore D203
"D203", # 1 blank line required before class docstring
]
[tool.ruff.lint.per-file-ignores]
"docs/**" = [
"INP001", # docs-dir should not be a python-package
]
"tests/**" = [
"ANN", # Missing type annotations
"ARG001", # Unused function argument
"D", # Missing docstring
"INP001", # tests-dir should not be a python-package
"PLC0415", # import should be at the top-level of a file
"S101", # Use of `assert` detected
]
"examples/**" = [
"INP001", # examples-dir should not be a python-package
"S310", # Audit URL open for permitted schemes
"T201", # print found
]
[tool.ruff.lint.isort]
force-single-line = false
[tool.ty.rules]
# Needed because importlib_metadata is only installed on Python < 3.10,
# but we need ty:ignore for when ty runs on Python >= 3.10
unused-ignore-comment = "ignore"
[tool.uv]
package = true
default-groups = "all"