-
Notifications
You must be signed in to change notification settings - Fork 27
/
pyproject.toml
202 lines (184 loc) · 8.67 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "sdc11073"
dynamic = ["version"]
authors = [
{ name = "Bernd Deichmann", email = "[email protected]" },
{ name = "Leon Budnick", email = "[email protected]" },
]
description = "Pure python implementation of IEEE11073 SDC protocol"
readme = "README.rst"
requires-python = ">=3.9, <3.13"
classifiers = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Topic :: Software Development',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX :: Linux'
]
keywords = [
"SDC",
"IEEE11073",
]
dependencies = [
'lxml>=2.3',
'ifaddr',
'aiohttp',
'typing_extensions;python_version<"3.10"',
]
[project.urls]
"Homepage" = "https://github.com/Draegerwerk/sdc11073"
"Bug Tracker" = "https://github.com/Draegerwerk/sdc11073/issues"
[project.optional-dependencies]
lz4 = [
'lz4',
]
test = [
"pytest",
"pytest-html",
"pytest-cov",
"pytest-xdist[psutil]",
"sdc11073[lz4]",
]
mypy = [
"mypy",
"types-lxml",
]
dev = [
"ruff>=0.2.0",
"sdc11073[mypy]",
"sdc11073[test]",
]
[tool.hatch.build.targets.sdist]
include = [
"src/sdc11073/**/*",
"docs/*", # include picture for readme
"LICENSE",
"README.rst",
"pyproject.toml",
"CHANGELOG.md"
]
support-legacy = false
[tool.hatch.build.targets.wheel]
packages = ["src/sdc11073"]
[tool.hatch.version]
path = "src/sdc11073/__init__.py"
[tool.pytest.ini_options]
testpaths = "tests/"
filterwarnings = [# https://docs.python.org/3/library/warnings.html#warning-filter
"error",
"ignore::UserWarning",
"ignore:The --rsyncdir command line argument and rsyncdirs config variable are deprecated.:DeprecationWarning", # https://github.com/psf/black/issues/3805
]
# https://docs.pytest.org/en/latest/how-to/logging.html#live-logs
# please note that live-logs for cli while using xdist is not working. see https://github.com/pytest-dev/pytest-xdist/issues/574
log_cli = true
log_cli_level = "info"
log_cli_format = "%(asctime)s %(levelname)s (%(threadName)-10s) %(filename)s:%(lineno)d %(message)s"
log_cli_date_format = "%Y-%m-%d %H:%M:%S"
log_file = "pytest.log"
log_file_level = "debug"
log_file_format = "%(asctime)s %(levelname)s (%(threadName)-10s) %(filename)s:%(lineno)d %(message)s"
log_file_date_format = "%Y-%m-%d %H:%M:%S:%f"
[tool.ruff]
line-length = 120 # https://docs.astral.sh/ruff/settings/#line-length
target-version = "py39" # https://docs.astral.sh/ruff/settings/#target-version
# Allow imports relative to the "src" and "tests" directories.
src = ["src", "tests"] # https://docs.astral.sh/ruff/settings/#src
# In addition to the standard set of exclusions, omit all tutorials and examples
extend-exclude = ["examples", "tools", "tutorial"] # https://docs.astral.sh/ruff/settings/#extend-exclude
[tool.ruff.lint]
extend-select = [# https://docs.astral.sh/ruff/settings/#extend-select
"A", # https://docs.astral.sh/ruff/rules/#flake8-builtins-a
"ANN", # https://docs.astral.sh/ruff/rules/#flake8-annotations-ann
"ARG", # https://docs.astral.sh/ruff/rules/#flake8-unused-arguments-arg
"B", # https://docs.astral.sh/ruff/rules/#flake8-bugbear-b
"BLE", # https://docs.astral.sh/ruff/rules/#flake8-blind-except-ble
"C4", # https://docs.astral.sh/ruff/rules/#flake8-comprehensions-c4
"C90", # https://docs.astral.sh/ruff/rules/#mccabe-c90
"COM", # https://docs.astral.sh/ruff/rules/#flake8-commas-com
"D", # https://docs.astral.sh/ruff/rules/#pydocstyle-d
"ERA", # https://docs.astral.sh/ruff/rules/#eradicate-era
"G", # https://docs.astral.sh/ruff/rules/#flake8-logging-format-g
"I", # https://docs.astral.sh/ruff/rules/#isort-i
"ICN", # https://docs.astral.sh/ruff/rules/#flake8-import-conventions-icn
"INP", # https://docs.astral.sh/ruff/rules/#flake8-no-pep420-inp
"ISC", # https://docs.astral.sh/ruff/rules/#flake8-implicit-str-concat-isc
"ICN", # https://docs.astral.sh/ruff/rules/#flake8-import-conventions-icn
"N", # https://docs.astral.sh/ruff/rules/#pep8-naming-n
"PGH", # https://docs.astral.sh/ruff/rules/#pygrep-hooks-pgh
"PIE", # https://docs.astral.sh/ruff/rules/#flake8-pie-pie
"PL", # https://docs.astral.sh/ruff/rules/#pylint-pl
# "PT", # https://docs.astral.sh/ruff/rules/#flake8-pytest-style-pt
"PTH", # https://docs.astral.sh/ruff/rules/#flake8-use-pathlib-pth
"PYI", # https://docs.astral.sh/ruff/rules/#flake8-pyi-pyi
"Q", # https://docs.astral.sh/ruff/rules/#flake8-quotes-q
"RET", # https://docs.astral.sh/ruff/rules/#flake8-return-ret
"RSE", # https://docs.astral.sh/ruff/rules/#flake8-raise-rse
"RUF", # https://docs.astral.sh/ruff/rules/#ruff-specific-rules-ruf
"S", # https://docs.astral.sh/ruff/rules/#flake8-bandit-s
"SIM", # https://docs.astral.sh/ruff/rules/#flake8-simplify-sim
"SLF", # https://docs.astral.sh/ruff/rules/#flake8-self-slf
"T20", # https://docs.astral.sh/ruff/rules/#flake8-print-t20
"TCH", # https://docs.astral.sh/ruff/rules/#flake8-type-checking-tch
"TID", # https://docs.astral.sh/ruff/rules/#flake8-tidy-imports-tid
"UP", # https://docs.astral.sh/ruff/rules/#pyupgrade-up
"YTT" # https://docs.astral.sh/ruff/rules/#flake8-2020-ytt
]
extend-ignore = [# https://docs.astral.sh/ruff/settings/#extend-ignore
"ANN101", # https://docs.astral.sh/ruff/rules/missing-type-self/
"ANN102", # https://docs.astral.sh/ruff/rules/missing-type-cls/
"ANN204", # https://docs.astral.sh/ruff/rules/missing-return-type-special-method/
"ANN401", # https://docs.astral.sh/ruff/rules/any-type/
"C408", # https://docs.astral.sh/ruff/rules/unnecessary-collection-call/
"C409", # https://docs.astral.sh/ruff/rules/unnecessary-literal-within-tuple-call/
"D105", # undocumented-magic-method
"D107", # undocumented-public-init
"D203", # one-blank-line-before-class
"D213", # multi-line-summary-second-line
"Q000", # https://docs.astral.sh/ruff/rules/bad-quotes-inline-string/
"S101", # https://docs.astral.sh/ruff/rules/assert/
"S311", # https://docs.astral.sh/ruff/rules/suspicious-non-cryptographic-random-usage/
"SIM102", # collapsible-if
"T201", # https://docs.astral.sh/ruff/rules/print/
]
[tool.ruff.lint.flake8-annotations]
allow-star-arg-any = true # https://docs.astral.sh/ruff/settings/#allow-star-arg-any
suppress-none-returning = true # https://docs.astral.sh/ruff/settings/#suppress-none-returning
[tool.ruff.lint.flake8-comprehensions]
allow-dict-calls-with-keyword-arguments = true # https://docs.astral.sh/ruff/settings/#allow-dict-calls-with-keyword-arguments
[tool.ruff.lint.pycodestyle]
max-doc-length = 120 # https://docs.astral.sh/ruff/settings/#max-doc-length
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["D104"]
[tool.mypy]
python_version = "3.9" # https://mypy.readthedocs.io/en/stable/config_file.html#confval-python_version
strict = true # https://mypy.readthedocs.io/en/stable/config_file.html#confval-strict
disallow_untyped_calls = true # https://mypy.readthedocs.io/en/stable/config_file.html#confval-disallow_untyped_calls
disallow_untyped_defs = true # https://mypy.readthedocs.io/en/stable/config_file.html#confval-disallow_untyped_defs
disallow_any_generics = true # https://mypy.readthedocs.io/en/stable/config_file.html#confval-disallow_any_generics
disallow_any_unimported = true # https://mypy.readthedocs.io/en/stable/config_file.html#confval-disallow_any_unimported
warn_redundant_casts = true # https://mypy.readthedocs.io/en/stable/config_file.html#confval-warn_redundant_casts
check_untyped_defs = true # https://mypy.readthedocs.io/en/stable/config_file.html#confval-check_untyped_defs
warn_return_any = true # https://mypy.readthedocs.io/en/stable/config_file.html#confval-warn_return_any
warn_unused_configs = true # https://mypy.readthedocs.io/en/stable/config_file.html#confval-warn_unused_configs
warn_unused_ignores = true # https://mypy.readthedocs.io/en/stable/config_file.html#confval-warn_unused_ignores
[tool.coverage.report]
exclude_also = [# https://coverage.readthedocs.io/en/latest/config.html#report-exclude-also
"raise AssertionError",
"raise NotImplementedError",
"if (typing\\.)?TYPE_CHECKING:",
"def __repr__",
"def __str__",
"self\\._?logger\\.(info|debug|warning|error|exception|critical)"
]
ignore_errors = true # https://coverage.readthedocs.io/en/latest/config.html#report-ignore-errors
[tool.coverage.run]
parallel = true # https://coverage.readthedocs.io/en/latest/config.html#run-parallel