forked from Draegerwerk/sdc11073
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
202 lines (184 loc) · 8.56 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://beta.ruff.rs/docs/settings/#line-length
target-version = "py39" # https://beta.ruff.rs/docs/settings/#target-version
# Allow imports relative to the "src" and "test" directories.
src = ["src", "test"] # https://beta.ruff.rs/docs/settings/#src
# In addition to the standard set of exclusions, omit all tutorials and examples
extend-exclude = ["examples", "tools", "tutorial"] # https://beta.ruff.rs/docs/settings/#extend-exclude
[tool.ruff.lint]
extend-select = [# https://beta.ruff.rs/docs/settings/#extend-select
"A", # https://beta.ruff.rs/docs/rules/#flake8-builtins-a
"ANN", # https://beta.ruff.rs/docs/rules/#flake8-annotations-ann
"ARG", # https://beta.ruff.rs/docs/rules/#flake8-unused-arguments-arg
"B", # https://beta.ruff.rs/docs/rules/#flake8-bugbear-b
"BLE", # https://beta.ruff.rs/docs/rules/#flake8-blind-except-ble
"C4", # https://beta.ruff.rs/docs/rules/#flake8-comprehensions-c4
"C90", # https://beta.ruff.rs/docs/rules/#mccabe-c90
"COM", # https://beta.ruff.rs/docs/rules/#flake8-commas-com
"D", # https://beta.ruff.rs/docs/rules/#pydocstyle-d
"ERA", # https://beta.ruff.rs/docs/rules/#eradicate-era
"G", # https://beta.ruff.rs/docs/rules/#flake8-logging-format-g
"I", # https://beta.ruff.rs/docs/rules/#isort-i
"ICN", # https://beta.ruff.rs/docs/rules/#flake8-import-conventions-icn
"INP", # https://beta.ruff.rs/docs/rules/#flake8-no-pep420-inp
"ISC", # https://beta.ruff.rs/docs/rules/#flake8-implicit-str-concat-isc
"ICN", # https://beta.ruff.rs/docs/rules/#flake8-import-conventions-icn
"N", # https://beta.ruff.rs/docs/rules/#pep8-naming-n
"PGH", # https://beta.ruff.rs/docs/rules/#pygrep-hooks-pgh
"PIE", # https://beta.ruff.rs/docs/rules/#flake8-pie-pie
"PL", # https://beta.ruff.rs/docs/rules/#pylint-pl
# "PT", # https://beta.ruff.rs/docs/rules/#flake8-pytest-style-pt
"PTH", # https://beta.ruff.rs/docs/rules/#flake8-use-pathlib-pth
"PYI", # https://beta.ruff.rs/docs/rules/#flake8-pyi-pyi
"Q", # https://beta.ruff.rs/docs/rules/#flake8-quotes-q
"RET", # https://beta.ruff.rs/docs/rules/#flake8-return-ret
"RSE", # https://beta.ruff.rs/docs/rules/#flake8-raise-rse
"RUF", # https://beta.ruff.rs/docs/rules/#ruff-specific-rules-ruf
"S", # https://beta.ruff.rs/docs/rules/#flake8-bandit-s
"SIM", # https://beta.ruff.rs/docs/rules/#flake8-simplify-sim
"SLF", # https://beta.ruff.rs/docs/rules/#flake8-self-slf
"T20", # https://beta.ruff.rs/docs/rules/#flake8-print-t20
"TCH", # https://beta.ruff.rs/docs/rules/#flake8-type-checking-tch
"TID", # https://beta.ruff.rs/docs/rules/#flake8-tidy-imports-tid
"UP", # https://beta.ruff.rs/docs/rules/#pyupgrade-up
"YTT" # https://beta.ruff.rs/docs/rules/#flake8-2020-ytt
]
extend-ignore = [# https://beta.ruff.rs/docs/settings/#extend-ignore
"ANN101", # https://beta.ruff.rs/docs/rules/missing-type-self/
"ANN102", # https://beta.ruff.rs/docs/rules/missing-type-cls/
"ANN204", # https://beta.ruff.rs/docs/rules/missing-return-type-special-method/
"ANN401", # https://beta.ruff.rs/docs/rules/any-type/
"C408", # https://beta.ruff.rs/docs/rules/unnecessary-collection-call/
"C409", # https://beta.ruff.rs/docs/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://beta.ruff.rs/docs/rules/bad-quotes-inline-string/
"S101", # https://beta.ruff.rs/docs/rules/assert/
"S311", # https://beta.ruff.rs/docs/rules/suspicious-non-cryptographic-random-usage/
"SIM102", # collapsible-if
"T201", # https://beta.ruff.rs/docs/rules/print/
]
[tool.ruff.lint.flake8-annotations]
allow-star-arg-any = true # https://beta.ruff.rs/docs/settings/#allow-star-arg-any
suppress-none-returning = true # https://beta.ruff.rs/docs/settings/#suppress-none-returning
[tool.ruff.lint.flake8-comprehensions]
allow-dict-calls-with-keyword-arguments = true # https://beta.ruff.rs/docs/settings/#allow-dict-calls-with-keyword-arguments
[tool.ruff.lint.pycodestyle]
max-doc-length = 120 # https://beta.ruff.rs/docs/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