-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpyproject.toml
152 lines (133 loc) · 4.15 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
[tool.poetry]
name = "remotivelabs-broker"
description = 'RemotiveLabs Broker gRPC API'
version = "0.4.3-beta1"
readme = "README.md"
license = "Apache-2.0"
homepage = "https://remotivelabs.com/"
repository = "https://github.com/remotivelabs/remotivelabs-apis"
documentation = "https://docs.remotivelabs.com/apis/python/remotivelabs/broker"
authors = ["Support <support@remotivelabs.com>"]
keywords = ["automotive", "autotech", "networking", "CAN"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Manufacturing",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Communications",
"Topic :: Internet",
"Topic :: Scientific/Engineering :: Information Analysis",
]
packages = [{ include = "remotivelabs" }]
# specify what files should be included when packaging/publishing the library
include = [
"README.md",
"LICENSE.txt",
"remotivelabs/broker/py.typed",
"remotivelabs/broker/**/*.py",
"remotivelabs/broker/**/*.pyi",
]
[tool.poetry.urls]
Issues = "https://github.com/remotivelabs/remotivelabs-apis/issues"
[tool.poetry.dependencies]
python = "^3.8"
requests = "^2.32"
grpcio = "1.66.2"
# Make sure to use the protobuf version specified in grpcio-tools:
# https://github.com/grpc/grpc/blob/v1.66.2/tools/distrib/python/grpcio_tools/grpc_version.py
protobuf = "5.27.2"
grpc-interceptor = "^0.15" # can be removed when we drop support for remotivelabs.broker.sync
[tool.poetry.group.dev.dependencies]
grpcio-tools = "1.66.2"
types-protobuf = "^5.27.0"
grpc-stubs = "^1.53" # can be removed when we drop support for remotivelabs.broker.sync
[tool.poetry.group.test.dependencies]
pytest = "^8.3"
pytest-cov = "^5.0"
[tool.poetry.group.lint.dependencies]
ruff = "^0.6.9"
pylint = "^3.2.7"
mypy = "^1.11.2"
[tool.poetry.group.docs.dependencies]
pdoc = "^12.2"
json-schema-for-humans = "^1.0"
[tool.poe.tasks]
test = "pytest --cov=remotivelabs.broker"
test-server = "pytest -m server --cov=remotivelabs.broker"
pylint = [{ cmd = "pylint ." }]
lint = [{ cmd = "ruff check ." }, { cmd = "ruff format --check --diff ." }]
format = [{ cmd = "ruff format ." }, { cmd = "ruff check --fix ." }]
mypy = [{ cmd = "mypy -p remotivelabs.broker -p misc -p tests" }]
check = ["lint", "mypy", "pylint"]
[tool.pytest.ini_options]
addopts = "-v -m 'not server'"
markers = [
"server: marks tests that require a live server (deselect with '-m \"not server\"')",
]
[tool.ruff]
line-length = 140
[tool.ruff.lint]
select = [
"ARG",
"B034",
"C901",
"E",
"EXE",
"F",
"FA",
"I",
"N",
"UP032",
"RET",
"W",
]
[tool.pylint]
recursive = true
ignore-paths = ['^.venv/.*$']
[tool.pylint.format]
max-line-length = 140
max-module-lines = 1000
[tool.pylint.messages_control]
disable = [
'wrong-import-order',
'missing-module-docstring',
'missing-class-docstring',
'missing-function-docstring',
'duplicate-code',
'logging-fstring-interpolation',
'too-few-public-methods',
'no-member',
]
[tool.mypy]
python_version = "3.8"
namespace_packages = true
explicit_package_bases = true
mypy_path = "."
packages = ["remotivelabs.broker", "misc", "tests"]
# See https://mypy.readthedocs.io/en/stable/config_file.html
disallow_untyped_calls = false
check_untyped_defs = true
warn_return_any = true
warn_unused_ignores = true
hide_error_codes = false
[[tool.mypy.overrides]]
# A field in diagnostics proto file is accidentally named same as the type (bytes bytes), so we need to ignore the type warning.
module = "remotivelabs.broker.generated.sync.diagnostics_api_pb2"
disable_error_code = ["valid-type"]
[[tool.mypy.overrides]]
# Also, it seems experimental features are missing in type definitions
module = "remotivelabs.broker.generated.*"
disable_error_code = ["attr-defined"]
[[tool.mypy.overrides]]
# We ignore stuff in sync, they are deprecated
module = "remotivelabs.broker.sync.*"
ignore_errors = true
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"