-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
232 lines (218 loc) · 8.23 KB
/
Copy pathpyproject.toml
File metadata and controls
232 lines (218 loc) · 8.23 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
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
[project]
name = "bvlos-sim"
version = "0.33.0"
description = "Open-source BVLOS mission validation and simulation tooling."
readme = "README.md"
requires-python = ">=3.12"
authors = [
{ name = "bvlos-sim contributors" },
]
license = "MIT"
keywords = [
"bvlos",
"drone",
"geofence",
"mission-planning",
"simulation",
"uav",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
# Only the interpreters CI actually runs the suite on are claimed. 3.14
# installs and produces byte-identical output today, but an untested claim
# in this list is a promise nothing verifies, so it is added when the CI
# matrix adds it. requires-python deliberately carries no upper bound: a
# capped interpreter range cannot be relaxed for a wheel already published,
# so a release would become uninstallable on 3.15 before anyone could
# confirm it was actually broken.
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: GIS",
"Topic :: Software Development :: Libraries :: Python Modules",
]
# Capped, not open-ended. uv.lock pins exact versions for contributors and CI,
# but the lock file does not ship in the wheel: `pip install bvlos-sim`
# re-resolves from scratch, so an unbounded `>=` lets a future pydantic 3 or
# shapely 3 install cleanly into a preflight tool and change what a GO means at
# runtime, with no signal. Each cap admits every release of the current major
# and excludes the next one, which is the release series that is allowed to
# break callers. Raising a cap is a deliberate edit here plus a green suite, the
# same discipline [tool.ruff.lint] applies to the rule selection below.
# typer is pre-1.0 and caps at its 1.0 boundary for want of a major to exclude.
dependencies = [
"pydantic>=2.13.4,<3",
"pyproj>=3.7.2,<4",
"pyyaml>=6.0.3,<7",
"rich>=15.0.0,<16",
"shapely>=2.1.2,<3",
"typer>=0.27.0,<1",
]
[project.urls]
Homepage = "https://github.com/Monotox/bvlos-sim"
Repository = "https://github.com/Monotox/bvlos-sim"
Documentation = "https://github.com/Monotox/bvlos-sim/tree/main/docs"
[project.scripts]
bvlos-sim = "bvlos_sim.__main__:main"
bvlos-fetch-all = "bvlos_sim.scripts.fetch_all:main"
bvlos-fetch-geofences = "bvlos_sim.scripts.fetch_geofences:main"
bvlos-fetch-landing-zones = "bvlos_sim.scripts.fetch_landing_zones:main"
bvlos-fetch-obstacles = "bvlos_sim.scripts.fetch_obstacles:main"
bvlos-fetch-population = "bvlos_sim.scripts.fetch_population:main"
bvlos-build-population-grid = "bvlos_sim.scripts.build_population_grid:main"
bvlos-fetch-terrain = "bvlos_sim.scripts.fetch_terrain:main"
bvlos-fetch-wind = "bvlos_sim.scripts.fetch_wind:main"
[build-system]
requires = ["setuptools>=83.0.0"]
build-backend = "setuptools.build_meta"
[project.optional-dependencies]
scripts = [
"requests>=2.32.0",
"srtm.py>=0.3.4",
]
flight-logs = [
"pymavlink==2.4.49",
"pyulog>=1.2.2",
]
sitl = [
"pymavlink==2.4.49",
]
[dependency-groups]
dev = [
"mypy>=1.18.2",
"pytest>=9.1.1",
"ruff>=0.16.0",
"types-PyYAML>=6.0.12",
]
sitl = [
"pymavlink==2.4.49",
]
docs = [
"mkdocs-material>=9.7.7",
# Pulled in transitively by mkdocs-material; named explicitly only to hold
# the floor above CVE-2026-61632 (fixed in 11.0.0). Docs-build only — it
# reaches no shipped wheel.
"pymdown-extensions>=11.0.0",
]
[tool.setuptools.packages.find]
include = ["bvlos_sim*"]
[tool.setuptools.package-data]
# Without this the marker is silently dropped from the wheel and every
# downstream import of bvlos_sim stays untyped despite the annotations.
bvlos_sim = ["py.typed"]
[tool.ruff]
include = ["bvlos_sim/**/*.py", "tests/**/*.py"]
[tool.ruff.lint]
# Pinned rather than inherited. Ruff's default selection widens between
# releases, so leaving it implicit means a routine version bump silently
# changes what "lint passes" means: 0.16.0 added ten rule families and 354
# findings to an unchanged tree, including B008 against the typer.Option
# defaults the CLI is required to use. Adopting a new family is a deliberate
# edit here, not a side effect of a dependency update.
select = ["E4", "E7", "E9", "F"]
[tool.mypy]
python_version = "3.12"
files = ["bvlos_sim"]
# Run with: uv run --locked mypy bvlos_sim
# CI runs exactly that; it must exit 0. mypy and its stubs live in the dev
# group so the lockfile pins them: an unpinned tool turns an unrelated
# upstream release into a red build on a day nobody touched the code.
#
# The gate is a ratchet: everything is checked by default and the list below
# is the set still carrying findings. Entries come off it as they are fixed;
# nothing goes on. A new module is therefore checked the moment it exists,
# which is the opposite of the previous shape, where the default was
# unchecked and a new module joined the gate only if someone remembered.
#
# What is left is real defects, not annotation gaps: Literal-typed
# schema_version fields assigned a plain str, provider unions widened at the
# call site, and un-inferrable lambdas. py.typed advertises the whole
# package, so the pure-data and pure-computation layers a downstream
# consumer imports (schemas, estimator.core, estimator.math) are already
# fully covered.
ignore_errors = false
[[tool.mypy.overrides]]
module = [
"bvlos_sim.adapters.batch_support",
"bvlos_sim.adapters.calibration.fitter",
"bvlos_sim.adapters.cli_sitl_support",
"bvlos_sim.adapters.cli_support",
"bvlos_sim.adapters.commands.batch",
"bvlos_sim.adapters.commands.calibrate",
"bvlos_sim.adapters.commands.schema_versions",
"bvlos_sim.adapters.envelope",
"bvlos_sim.adapters.flight_log.dataflash",
"bvlos_sim.adapters.flight_log.dataflash_binary",
"bvlos_sim.adapters.flight_log.dispatch",
"bvlos_sim.adapters.geojson_export",
"bvlos_sim.adapters.ground_risk_markdown",
"bvlos_sim.adapters.markdown",
"bvlos_sim.adapters.phase_segmentation.segmenter",
"bvlos_sim.adapters.qgc_export",
"bvlos_sim.adapters.qgc_plan",
"bvlos_sim.adapters.scenario_envelope",
"bvlos_sim.adapters.sitl.ardupilot",
"bvlos_sim.adapters.sitl.artifacts",
"bvlos_sim.adapters.sitl.comparison",
"bvlos_sim.adapters.sitl.comparison_telemetry",
"bvlos_sim.adapters.sitl.evidence",
"bvlos_sim.adapters.sora_envelope",
"bvlos_sim.adapters.sora_markdown",
"bvlos_sim.adapters.validation.validator",
"bvlos_sim.estimator.environment.wind",
"bvlos_sim.estimator.execution.divert",
"bvlos_sim.estimator.execution.energy",
"bvlos_sim.estimator.execution.geofence",
"bvlos_sim.estimator.execution.ground_risk",
"bvlos_sim.estimator.execution.landing_zone",
"bvlos_sim.estimator.execution.loiter",
"bvlos_sim.estimator.execution.obstacle",
"bvlos_sim.estimator.execution.propagation.wind",
"bvlos_sim.estimator.execution.sora",
"bvlos_sim.estimator.execution.transit",
"bvlos_sim.schemas.mission",
"bvlos_sim.schemas.sora",
"bvlos_sim.schemas.stochastic",
"bvlos_sim.scripts.build_population_grid",
"bvlos_sim.scripts.cli_batch_audit",
"bvlos_sim.scripts.fetch_geofences",
"bvlos_sim.scripts.fetch_obstacles",
"bvlos_sim.scripts.fetch_terrain",
"bvlos_sim.scripts.fetch_wind",
]
ignore_errors = true
[[tool.mypy.overrides]]
# Optional extras and third-party libraries without shipped stubs.
module = [
"pymavlink.*",
"pyulog.*",
"srtm.*",
"shapely.*",
"requests.*",
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
# bvlos_sim/scripts/* are dual-mode: importable as a package and runnable as
# standalone files, so each falls back to a bare `import _overpass` when the
# package import fails. That fallback is what mypy resolves, and it cannot see
# a module by its unqualified name.
module = [
"_attribution",
"_overpass",
"_provenance",
"fetch_landing_zones",
"fetch_terrain",
"fetch_wind",
]
ignore_missing_imports = true
[tool.pytest.ini_options]
pythonpath = ["."]
testpaths = ["tests"]
markers = [
"live_sitl: tests that require a running ArduPilot SITL container",
]