-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpyproject.toml
119 lines (107 loc) · 3.06 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
[project]
name = "AirbrakesV2"
description = "Logic for airbrakes as a part of the NASA Student Launch Competition"
requires-python = ">=3.13"
version = "0.1.0"
readme = "README.md"
dependencies = [
"gpiozero",
"pigpio", # Run sudo pigpiod before running the program
"msgspec",
"numpy",
"colorama",
"psutil",
"scipy",
"pandas",
"faster-fifo; sys_platform != 'win32'",
"textual",
"python-mscl>=67.0.0",
]
[dependency-groups]
dev = [
"pytest",
"pytest-cov",
"ruff",
"pre-commit",
]
# Need to run `sudo apt install `libcap-dev`, `libcamera-dev`,
# `libkms++-dev`, `libfmt-dev`, `libdrm-dev` to build and install everything camera related.
camera = [
"picamera2>=0.3.24",
"rpi-libcamera>=0.1a7",
"rpi-kms>=0.1a1",
]
[project.scripts]
mock = "airbrakes.main:run_mock_flight"
real = "airbrakes.main:run_real_flight"
sim = "airbrakes.main:run_sim_flight"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
# UV:
[tool.uv]
python-preference = "only-managed"
# HATCH:
[tool.hatch.build.targets.wheel]
packages = ["airbrakes"]
[tool.hatch.build.targets.wheel.force-include]
# specify one launch file so that the mock flight can be run as a demo with uvx.
"launch_data/genesis_launch_1.csv" = "/launch_data/genesis_launch_1.csv"
# RUFF:
[tool.ruff]
line-length = 100
target-version = "py313"
show-fixes = true
exclude = ["scripts"]
[tool.ruff.lint]
ignore = ["PLR2004", "PLR0911", "PLR0912", "PLR0913", "PLR0915", "PERF203", "ISC001", "S311"]
select = ["E", "F", "I", "PL", "UP", "RUF", "PTH", "C4", "B", "PIE", "SIM", "RET", "RSE",
"G", "ISC", "PT", "ASYNC", "TCH", "SLOT", "PERF", "PYI", "FLY", "AIR", "Q", "INP",
"W", "YTT", "DTZ", "ARG", "T20", "FURB", "D100", "D101", "D300", "D418",
"D419", "S", "NPY"]
[tool.ruff.lint.per-file-ignores]
"main.py" = ["T201"]
"airbrakes/mock/display.py" = ["T201"]
"tests/*.py" = ["T20", "S101", "D100", "ARG001", "RUF012"]
[tool.pytest.ini_options]
filterwarnings = [
"error", # treat warnings as errors
"ignore:This process:DeprecationWarning", # ignore warning about fork()
"ignore:To reduce servo jitter", # ignore warning about pigpio
"ignore:Covariance of the parameters", # ignore warning about scipt curve_fit
]
[tool.coverage.run]
branch = true
# Unfortunately the multiprocessing support is causing some tests to fail (it seems to make things
# slow)
# concurrency = ["multiprocessing", "thread"]
# sigterm = true
# parallel = true
source = ["airbrakes"]
omit = [
"*/tests/*",
"*/site-packages/*",
"airbrakes/mock/*",
"airbrakes/simulation/*",
"airbrakes/main.py",
]
[tool.coverage.report]
skip_covered = false
skip_empty = true
exclude_lines = [
"def __repr__",
"if self\\.debug",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == \"__main__\":",
"if sys.platform == 'win32'",
]
exclude_also = [
"@overload",
"@abstractmethod",
"if TYPE_CHECKING:",
"from multiprocessing import Queue",
"from queue import Empty",
]
show_missing = true
fail_under = 88