-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
172 lines (147 loc) · 3.64 KB
/
Copy pathpyproject.toml
File metadata and controls
172 lines (147 loc) · 3.64 KB
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
[project]
name = "robo_orchard_build"
dynamic = ["version"]
description = "Building tools for the RoboOrchard project"
readme = "README.md"
authors = [{ name = "The RoboOrchard Team" }]
dependencies = ["setuptools"]
license = "Apache-2.0"
license-files = ["LICENSE"]
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
]
requires-python = ">=3.10"
[project.optional-dependencies]
protobuf = [
"protobuf<6.0dev,>=5.26.1",
"grpcio-tools>=1.70.0", # for proto schemas
"mypy-protobuf",
]
pydantic = ["protobuf-to-pydantic"]
cpp = [
"jinja2",
"cpplint>=2.0.0",
"meson>=1.7.0",
"ninja",
"pybind11",
"filelock",
"pybind11-stubgen>=2.5.1",
"black>=24.4.2",
"isort>=5.13.2",
"clang-format",
]
all = ["robo_orchard_build[protobuf,pydantic,cpp]"]
[project.scripts]
RoboOrchardBuild-cpplint = "robo_orchard_build.lint.cpp_lint:main"
[project.urls]
Homepage = "https://github.com/HorizonRobotics/robo_orchard_build"
Repository = "https://github.com/HorizonRobotics/robo_orchard_build"
Issues = "https://github.com/HorizonRobotics/robo_orchard_build/issues"
[build-system]
requires = ["setuptools >= 77.0.3"]
build-backend = "setuptools.build_meta"
[tool.setuptools]
include-package-data = true
package-dir = { "robo_orchard_build" = "robo_orchard_build" }
[tool.ruff]
exclude = [
# common
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
# project
"3rdparty/*",
"dummy/*",
"*.pyi",
"*_pb2.py",
]
# Same as Black.
line-length = 79
indent-width = 4
# required python 3.10
target-version = "py310"
[tool.ruff.lint]
select = [
"E", # flake8-errors
"F", # pyflake
"I", # isort
"B", # flake8-bugber
"TID", # flake8-tidy-imports
"D", # pydocstyle
"Q", # flake8-quotes
"W", # flake8-warnings
]
ignore = [
"D104",
"D107",
"D202",
"D105",
"D100",
"D102",
"D103",
"D101",
"D301",
"F403",
"B904", # Within an `except` clause, raise exceptions with `raise ... from err` or `raise ... from None` to distinguish them from errors in exception handling
"B028", # No explicit `stacklevel` keyword argument found
"D417", # requires documentation for every function parameter.
]
[tool.ruff.lint.isort]
known-third-party = []
no-lines-before = ["future", "standard-library"]
combine-as-imports = true
force-wrap-aliases = true
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.flake8-tidy-imports]
# Disallow all relative imports.
ban-relative-imports = "all"
[tool.ruff.lint.flake8-quotes]
avoid-escape = false
[tool.ruff.lint.mccabe]
max-complexity = 18
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["TID252", "F401"]
[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
docstring-code-format = true
[tool.pyright]
enableExperimentalFeatures = false
typeCheckingMode = "basic"
reportRedeclaration = false
include = ["robo_orchard_build", "tests"]
# Do not include extraPaths because it will conflict with the vscode settings.
# extraPaths = [
# "."
# ]