-
Notifications
You must be signed in to change notification settings - Fork 149
/
pyproject.toml
165 lines (145 loc) · 4.54 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
[project]
name = "symforce"
description = "Fast symbolic computation, code generation, and nonlinear optimization for robotics"
authors = [{ name = "Skydio, Inc.", email = "[email protected]" }]
license = { text = "Apache 2.0" }
keywords = [
"python",
"computer-vision",
"cpp",
"robotics",
"optimization",
"structure-from-motion",
"motion-planning",
"code-generation",
"slam",
"autonomous-vehicles",
"symbolic-computation",
]
# For a list of valid classifiers see https://pypi.org/classifiers/
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Software Development :: Code Generators",
"Topic :: Software Development :: Embedded Systems",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Education :: Computer Aided Instruction (CAI)",
"Programming Language :: Python",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: C++",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
]
requires-python = ">=3.8"
dynamic = ["version", "readme", "dependencies", "optional-dependencies"]
[project.urls]
"Bug Tracker" = "https://github.com/symforce-org/symforce/issues"
Source = "https://github.com/symforce-org/symforce"
# --------------------------------------------------------------------------------
# Ruff
# --------------------------------------------------------------------------------
[tool.ruff]
line-length = 100
exclude = ["third_party", "build", ".eggs", "lcmtypes", "*.pyi"]
extend-include = ["*.ipynb"]
[tool.ruff.lint]
preview = true
typing-modules = ["symforce.typing"]
select = [
"A", # flake8
"B", # flake8-bugbear
"E4", # pycodestyle - ERROR - Imports - E401, E402
"E7", # pycodestyle - ERROR - Statements - E701-E743
"E9", # pycodestyle - ERROR - Runtime - E901, E902
"F", # pyflakes - ALL - F401-F901
"I", # isort
"PLC", # pylint - convention
"PLE", # pylint - error
"PLR", # pylint - refactor
"PLW", # pylint - warning
"RUF100", # unused-noqa
"SLF", # flake8-self
]
ignore = [
# Leave ignored:
"B008", # function-call-in-default-argument
"E402", # Module level import not at top of file
"E731", # Do not assign a `lambda` expression, use a `def`
"E741", # Ambiguous variable name: `x`
"PLC0415", # import-outside-top-level
"PLC2701", # Private name import `_x` from external module `y`
"PLR2004", # magic-value-comparison
"PLW1514", # unspecified-encoding
"PLW1641", # eq-without-hash
"PLW2901", # redefined-loop-name
# Maybe enable later
"ARG", # flake8-unused-arguments
"B011", # Do not `assert False`, raise `AssertionError()`
]
[tool.ruff.lint.flake8-builtins]
builtins-ignorelist = ["__doc__"]
[tool.ruff.lint.per-file-ignores]
# Unused imports in __init__.py
"__init__.py" = ["F401"]
# Unbound loop variables in benchmark notebooks
"symforce/benchmarks/notebooks/*.ipynb" = ["B023"]
# Imports shadowing builtins (like display)
"**/*.ipynb" = ["A004"]
[tool.ruff.lint.isort]
known-first-party = ["sym", "symforce"]
force-single-line = true
section-order = [
"future",
"standard-library",
"third-party",
"generated",
"first-party",
"local-folder",
]
[tool.ruff.lint.isort.sections]
"generated" = ["lcmtypes"]
[tool.ruff.lint.pylint]
max-args = 10
max-branches = 20
max-locals = 20
max-public-methods = 100
max-returns = 10
# --------------------------------------------------------------------------------
# Mypy
# --------------------------------------------------------------------------------
[tool.mypy]
python_version = "3.8"
warn_unused_configs = true
warn_unused_ignores = true
disallow_untyped_defs = true
mypy_path = [".", "gen/python", "$SYMFORCE_LCMTYPES_DIR", "symforce/pybind"]
explicit_package_bases = true
[[tool.mypy.overrides]]
module = [
"IPython.*",
"argh.*",
"clang_format",
"graphviz.*",
"matplotlib.*",
"mpl_toolkits.*",
"numba.*",
"ruff.*",
"scipy.*",
"skymarshal.*",
"symengine.*",
"sympy.*",
"torch.*", # We don't require torch to be installed
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "lcmtypes"
follow_imports = "silent"