-
Notifications
You must be signed in to change notification settings - Fork 196
Expand file tree
/
Copy pathpyproject.toml
More file actions
184 lines (161 loc) · 4.89 KB
/
pyproject.toml
File metadata and controls
184 lines (161 loc) · 4.89 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
[tool.poetry]
name = "open-gopro-tutorials"
version = "0.4.0"
description = "Open GoPro Python Tutorials"
authors = ["Tim Camise <tcamise@gopro.com>"]
license = "MIT"
readme = "README.md"
packages = [{ include = "tutorial_modules" }]
repository = "https://github.com/gopro/OpenGoPro/tree/main/demos/python/tutorial"
documentation = "https://gopro.github.io/OpenGoPro/tutorials/"
classifiers = [
"Intended Audience :: Developers",
"Topic :: Communications",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: Microsoft :: Windows :: Windows 10",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
[tool.poetry.dependencies]
python = ">=3.10,<3.13"
bleak = "0.22.3"
requests = "^2"
rich = "^13"
pytz = "*"
tzlocal = "*"
protobuf = "^5"
[tool.poetry.group.dev.dependencies]
mypy-protobuf = "*"
poethepoet = "^0"
black = "*"
isort = "*"
mypy = "*"
pytest = "^7"
pytest-asyncio = "^0"
pytest-html = "^3"
pytest-cov = "^4"
coverage = { extras = ["toml"], version = "^6" }
pylint = "^3"
types-requests = "*"
types-pytz = "*"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.poe.tasks.tests]
cmd = "pytest tests --cov-fail-under=60"
help = "Run end-to-end tests. Requires ssid=${SSID} and password=${ssid} args to connect to AP"
[tool.poe.tasks._types]
cmd = "mypy tutorial_modules"
help = "Check types"
[tool.poe.tasks._pylint]
cmd = "pylint --no-docstring-rgx=main|_ tutorial_modules"
help = "Run pylint"
[tool.poe.tasks._sort_imports]
cmd = "isort open_gopro tests"
help = "Sort imports with isort"
[tool.poe.tasks.format]
cmd = "black tutorial_modules tests"
help = "Apply black formatting to source code"
[tool.poe.tasks._clean_artifacts]
cmd = "rm -rf **/__pycache__ *.csv *.mp4 *.jpg *.log .mypy_cache .nox"
help = "Clean testing artifacts and pycache"
[tool.poe.tasks._clean_tests]
cmd = "rm -rf .reports && rm -rf .pytest_cache"
help = "Clean test reports"
[tool.poe.tasks._clean_build]
cmd = "rm -rf dist"
help = "Clean module build output"
[tool.poe.tasks.clean]
sequence = ["_clean_artifacts", "_clean_tests", "_clean_build"]
help = "Clean everything"
[tool.poe.tasks.lint]
sequence = ["format", "_sort_imports", "_types", "_pylint",]
help = "Format, check types, lint, and check docstrings"
[tool.mypy]
ignore_missing_imports = true
warn_redundant_casts = true
disallow_untyped_calls = false
disallow_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_decorators = false
warn_unused_ignores = true
warn_unreachable = false
show_error_context = true
pretty = true
[tool.pytest.ini_options]
log_auto_indent = true
log_cli = true
log_cli_level = "ERROR"
log_cli_format = "%(asctime)s %(levelname)s %(message)s"
log_cli_date_format = "%H:%M:%S"
log_file_level = "DEBUG"
log_file_format = "%(threadName)13s: %(name)40s:%(lineno)5d %(asctime)s.%(msecs)03d %(levelname)-8s | %(message)s"
log_file_date_format = "%H:%M:%S"
filterwarnings = "ignore::DeprecationWarning"
addopts = [
"-s",
"--capture=tee-sys",
"--cov=tutorial_modules",
"--cov-report=term",
"--cov-report=html",
"--html=.reports/test_report.html",
"--self-contained-html",
"--asyncio-mode=auto",
]
[tool.coverage.run]
data_file = ".reports/coverage/.coverage"
branch = true
source = ["tutorial_modules"]
[tool.coverage.html]
directory = ".reports/coverage"
[tool.coverage.report]
exclude_lines = ["raise NotImplementedError"]
[tool.pylint.'MASTER']
load-plugins = "pylint.extensions.docparams"
accept-no-param-doc = "yes"
accept-no-return-doc = "yes"
default-docstring-type = "google"
ignore = ["tests", "proto"]
[tool.pylint.'MESSAGES CONTROL']
disable = [
"missing-module-docstring",
"unnecessary-lambda",
"unnecessary-lambda-assignment",
"too-many-ancestors",
"no-name-in-module",
"too-many-nested-blocks",
"unspecified-encoding",
"consider-using-with",
"abstract-method",
"useless-type-doc",
"cyclic-import",
"logging-fstring-interpolation",
"logging-format-interpolation",
"duplicate-code",
"global-statement",
"too-few-public-methods",
"too-many-public-methods",
"too-many-arguments",
"too-many-instance-attributes",
"too-many-branches",
"too-many-locals",
"too-many-lines",
"too-many-statements",
"fixme",
"protected-access",
"invalid-name",
"unsubscriptable-object",
]
[tool.pylint.'FORMAT']
max-line-length = 300 # Handled by black
[tool.black]
line-length = 120
exclude = ".venv"
[tool.isort]
profile = "black"