forked from OpenCyphal/pycyphal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.cfg
246 lines (217 loc) · 7.14 KB
/
setup.cfg
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
246
[metadata]
name = pycyphal
version = attr: pycyphal._version.__version__
author = OpenCyphal
author_email = [email protected]
url = https://opencyphal.org
description = A full-featured implementation of the Cyphal protocol stack in Python.
long_description = file: README.md
long_description_content_type = text/markdown
license = MIT
keywords =
cyphal
opencyphal
uavcan
pub-sub
publish-subscribe
data-bus
can-bus
ethernet
vehicular
onboard-networking
avionics
communication-protocol
broker
classifiers =
Intended Audience :: Developers
Topic :: Scientific/Engineering
Topic :: Software Development :: Embedded Systems
Topic :: Software Development :: Libraries :: Python Modules
Topic :: Software Development :: Object Brokering
Topic :: System :: Distributed Computing
Topic :: System :: Networking
License :: OSI Approved :: MIT License
Programming Language :: Python
Programming Language :: Python :: 3
Operating System :: OS Independent
Typing :: Typed
[options.extras_require]
# Key name format: "transport-<transport-name>-<media-name>"; e.g.: "transport-ieee802154-xbee".
# If there is no media sub-layer, or the media dependencies are shared, or it is desired to have a common
# option for all media types, the media part may be omitted from the key.
transport-can-pythoncan =
python-can[serial] ~= 4.0
transport-serial =
pyserial ~= 3.5
cobs ~= 1.1.4
transport-udp =
libpcap >= 0.0.0b0, < 2.0.0
[options]
# The package will become zip-safe after https://github.com/OpenCyphal/pycyphal/issues/110 is resolved.
zip_safe = False
include_package_data = True
packages = find:
# Think thrice before adding anything here, please.
# The preferred long-term plan is to avoid adding any new required dependencies whatsoever for the project's lifetime.
install_requires =
nunavut ~= 1.7
numpy ~= 1.22 ; python_version>='3.8'
numpy ~= 1.21 ; python_version=='3.7'
[options.packages.find]
# https://setuptools.readthedocs.io/en/latest/setuptools.html#find-namespace-packages
include =
pycyphal
pycyphal.*
[options.package_data]
# jingle bells jingle bells
# jingle all the way
* =
*
*/*
*/*/*
*/*/*/*
*/*/*/*/*
# oh what fun it is to ride
# in a one-horse open sleigh
# -------------------------------------------------- PYTEST --------------------------------------------------
[tool:pytest]
# https://docs.pytest.org/en/latest/pythonpath.html#invoking-pytest-versus-python-m-pytest
norecursedirs =
tests/util/import_error
testpaths = pycyphal tests
python_files = *.py
python_classes = _UnitTest
python_functions = _unittest_
# Verbose logging is required to ensure full coverage of conditional logging branches.
log_level = DEBUG
log_cli_level = WARNING
log_cli = true
log_file = pytest.log
addopts = --doctest-modules -v
# Some of the tested generated data types are marked deprecated on purpose; related warnings are ignored.
# NumPy sometimes emits "invalid value encountered in multiply" which we don't care about.
# "SelectableGroups dict interface is deprecated. Use select." comes from PythonCAN and is safe to ignore.
# Python-CAN emits obscure deprecation warnings from packaging/version.py.
filterwarnings =
ignore:Data type .* is deprecated:DeprecationWarning
ignore:invalid value encountered in multiply:RuntimeWarning
ignore:Creating a LegacyVersion has been deprecated and will be removed in the next major release:DeprecationWarning
ignore:.*experimental extension.*:RuntimeWarning
ignore:SelectableGroups dict interface is deprecated. Use select.:DeprecationWarning
ignore:.*event loop.*:DeprecationWarning
ignore:.*pkg_resources.*:DeprecationWarning
asyncio_mode = auto
# -------------------------------------------------- MYPY --------------------------------------------------
[mypy]
# Python version is not specified to allow checking against different versions.
warn_return_any = True
warn_unused_configs = True
disallow_untyped_defs = True
check_untyped_defs = True
no_implicit_optional = True
warn_redundant_casts = True
warn_unused_ignores = True
show_error_context = True
strict_equality = True
implicit_reexport = False
mypy_path =
.compiled
[mypy-pytest]
ignore_errors = True
ignore_missing_imports = True
[mypy-pydsdl]
ignore_errors = True
ignore_missing_imports = True
[mypy-nunavut]
ignore_errors = True
ignore_missing_imports = True
[mypy-nunavut.*]
ignore_errors = True
ignore_missing_imports = True
[mypy-numpy]
ignore_errors = True
ignore_missing_imports = True
[mypy-ruamel.*]
ignore_missing_imports = True
implicit_reexport = True
[mypy-serial]
ignore_errors = True
ignore_missing_imports = True
[mypy-coloredlogs]
ignore_errors = True
ignore_missing_imports = True
[mypy-can]
ignore_errors = True
ignore_missing_imports = True
follow_imports = skip
# -------------------------------------------------- COVERAGE --------------------------------------------------
[coverage:run]
data_file = .coverage
branch = True
parallel = True
source =
pycyphal
tests
disable_warnings =
module-not-imported
[coverage:report]
exclude_lines =
pragma: no cover
def __repr__
raise AssertionError
raise NotImplementedError
return NotImplemented
assert False
if False:
if __name__ == .__main__.:
if .*TYPE_CHECKING:
# -------------------------------------------------- PYLINT --------------------------------------------------
[pylint.MASTER]
fail-under=9.9
[pylint.MESSAGES CONTROL]
# Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED.
confidence=UNDEFINED
# Advanced semantic analysis is broken in PyLint so we just disable these checks since they add nothing but noise.
# These aspects are addressed by MyPy in a more sensible way.
# Formatting issues like superfluous parens are managed by Black automatically.
disable=
cyclic-import,
useless-import-alias,
f-string-without-interpolation,
import-outside-toplevel,
fixme,
inconsistent-return-statements,
unbalanced-tuple-unpacking,
no-name-in-module,
misplaced-comparison-constant,
superfluous-parens,
unsubscriptable-object,
too-few-public-methods,
too-many-arguments,
too-many-instance-attributes,
too-many-return-statements,
too-many-public-methods,
too-many-statements,
too-many-locals,
use-implicit-booleaness-not-comparison,
unexpected-keyword-arg
[pylint.REPORTS]
output-format=colorized
[pylint.DESIGN]
max-branches=20
[pylint.FORMAT]
max-line-length=120
max-module-lines=3000
[pylint.BASIC]
bad-names=
variable-rgx=[a-z_][a-z0-9_]*
[pylint.SIMILARITIES]
min-similarity-lines=30
[pylint.EXCEPTIONS]
# Allow catching Exception because we use a lot of async tasks, callbacks, and threads, where this is required.
overgeneral-exceptions=BaseException
# -------------------------------------------------- DOC8 --------------------------------------------------
[doc8]
ignore-path = docs/api,./.nox,./pycyphal.egg-info
max-line-length = 120
ignore = D000,D002,D004