| [metadata] |
| name = pyuavcan |
| version = file: pyuavcan/VERSION |
| author = UAVCAN Consortium |
| author_email = consortium@uavcan.org |
| url = https://uavcan.org |
| description = A full-featured implementation of the UAVCAN protocol stack in Python. |
| long_description = file: README.md |
| long_description_content_type = text/markdown |
| license = MIT |
| keywords = |
| 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] ~= 3.3 |
| |
| transport_serial = |
| pyserial ~= 3.4 |
| cobs ~= 1.1.4 |
| |
| transport_udp = |
| libpcap >= 1.10.0b15, < 2.0.0 |
| |
| [options] |
| 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.1 |
| numpy ~= 1.17, < 1.20 |
| # TODO: allow NumPy v1.20 -- requires fixing type annotations and many meaningless false-positives. No runtime effects. |
| |
| [options.packages.find] |
| # https://setuptools.readthedocs.io/en/latest/setuptools.html#find-namespace-packages |
| include = |
| pyuavcan |
| pyuavcan.* |
| |
| [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 = pyuavcan 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. |
| # 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 |
| |
| # -------------------------------------------------- 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_missing_imports = True |
| |
| [mypy-pydsdl] |
| ignore_missing_imports = True |
| |
| [mypy-nunavut] |
| ignore_missing_imports = True |
| |
| [mypy-nunavut.*] |
| ignore_missing_imports = True |
| |
| [mypy-numpy] |
| ignore_missing_imports = True |
| |
| [mypy-ruamel.*] |
| ignore_missing_imports = True |
| implicit_reexport = True |
| |
| [mypy-serial] |
| ignore_missing_imports = True |
| |
| [mypy-coloredlogs] |
| ignore_missing_imports = True |
| |
| # -------------------------------------------------- COVERAGE -------------------------------------------------- |
| [coverage:run] |
| data_file = .coverage |
| branch = True |
| parallel = True |
| source = |
| pyuavcan |
| 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 |
| |
| [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 |