-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
172 lines (146 loc) · 3.76 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
166
167
168
169
170
171
172
[build-system]
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning>=1.0.0,<2.0.0"]
build-backend = "poetry_dynamic_versioning.backend"
[tool.poetry]
name = "umrx-app-v3"
version = "0.0.0"
description = "Communication with COINES firmware for humans"
authors = [
"Konstantin Selyunin <[email protected]>",
]
readme = "README.md"
repository = "https://github.com/umrx-sw/umrx-v3-py"
[tool.poetry.dependencies]
pyusb = "1.2.1"
python = ">=3.12.0,<3.14.0"
pyserial = "^3.5"
[tool.poetry.dev-dependencies]
coverage = { extras = ["toml"], version = ">=7.2.5" }
ipdb = "^0.13.13"
ipython = "^8.20.0"
poethepoet = ">=0.20.0"
pre-commit = ">=3.3.1"
pudb = "^2023.1"
pytest = ">=7.3.1"
pytest-icdiff = "^0.9"
pytest-mock = ">=3.10.0"
pytest-order = "^1.2.0"
pytest-randomly = "^3.15.0"
pytest-watcher = "^0.4.3"
pytest-xdist = ">=3.2.1"
rich = "^13.7.1"
safety = ">=2.3.4,!=2.3.5"
typeguard = ">=3.0.2"
unittest-parametrize = "^1.4.0"
[tool.poetry-dynamic-versioning]
enable = true
[tool.coverage.report]
fail_under = 50
precision = 1
show_missing = true
skip_covered = true
[tool.coverage.run]
branch = true
command_line = "--module pytest"
data_file = "reports/.coverage"
source = ["src"]
[tool.coverage.xml]
output = "reports/coverage.xml"
[tool.mypy]
junit_xml = "reports/mypy.xml"
strict = true
disallow_subclassing_any = false
disallow_untyped_decorators = false
ignore_missing_imports = true
pretty = true
show_column_numbers = true
show_error_codes = true
show_error_context = true
warn_unreachable = true
exclude = [
"test.*\\.py$", # TOML's double-quoted strings require escaping backslashes
"src.*\\.py$",
]
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
warn_untyped_fields = true
[tool.pytest.ini_options]
addopts = "--color=yes --doctest-modules --exitfirst --failed-first --strict-config --strict-markers --typeguard-packages=umrx_app_v3 --verbosity=2 --junitxml=reports/pytest.xml --log-cli-level=DEBUG"
filterwarnings = [
"error",
"ignore::DeprecationWarning",
"ignore::pytest.PytestUnraisableExceptionWarning",
]
testpaths = ["src", "tests"]
xfail_strict = true
markers =[
"usb_comm: mark tests related to low-level USB config",
"bst_protocol: mark tests for Bosch SensorTec protocol on top of USB data transfer",
"app_board: mark tests for application Board 3.0 test",
"bmi08x: mart test for bmi088 board",
"commands: mark communication commands"
]
[tool.pytest-watcher]
now = true
[tool.ruff]
fix = true
line-length = 120
lint.select = ["ALL"]
lint.ignore = [
"ANN101",
"ANN102",
"ANN401",
"ARG001",
"COM812",
"D100",
"D101",
"D102",
"D103",
"D104",
"D105",
"D106",
"D107",
"FIX002",
"S101",
"S603",
"S607",
"TD002",
"TD003",
"PLR2004",
"ERA001",
"G004",
"EM101"
]
lint.unfixable = ["ERA001", "F841", "T201", "T203"]
src = ["integration_tests", "src", "tests"]
target-version = "py310"
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.lint.pycodestyle]
max-doc-length = 120
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.isort]
combine-as-imports = true
order-by-type = false
known-first-party = ["tests"]
[tool.poe.tasks]
[tool.poe.tasks.lint]
help = "Lint this package with pre-commit"
[[tool.poe.tasks.lint.sequence]]
cmd = "pre-commit run --all-files --color always"
[[tool.poe.tasks.lint.sequence]]
shell = "safety check --continue-on-error --full-report"
[tool.poe.tasks.test]
help = "Test this package"
[[tool.poe.tasks.test.sequence]]
cmd = "coverage run"
[[tool.poe.tasks.test.sequence]]
cmd = "coverage report"
[[tool.poe.tasks.test.sequence]]
cmd = "coverage xml"
[tool.poe.tasks.integration-test]
help = "Run the integration tests"
cmd = "pytest --failed-first --color=yes --log-cli-level=DEBUG integration_tests/*"