-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
235 lines (200 loc) · 6.09 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
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
233
234
235
[tool.poetry]
name = "pywificli"
version = "0.1.0"
description = "Cross Platform Wifi \"Driver\""
authors = ["Tim Camise <[email protected]>"]
license = "MIT"
readme = "README.md"
repository = "https://github.com/TODO"
documentation = "https://gopro.github.io/TODO"
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",
]
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.scripts]
pywificli-scan = "pywificli.scripts.scan_ssids:entrypoint"
[tool.poetry.dependencies]
python = "^3.10"
rich = "^13"
packaging = "^24"
[tool.poetry.group.dev.dependencies]
pydoclint = "^0"
pydocstyle = { extras = ["toml"], version = "^6" }
pytest = "^7"
pytest-cov = "^3"
pytest-asyncio = "^0.17"
pytest-html = "^3"
coverage = { extras = ["toml"], version = "^6" }
black = "*"
pylint = "*"
mypy = "*"
types-attrs = "*"
types-pytz = "*"
sphinx = "^7"
sphinx-rtd-theme = "^2"
coverage-badge = "^1"
poethepoet = "^0"
pytest-timeout = "^2"
isort = "*"
[tool.poe.tasks.tests]
# cmd = "pytest tests/unit --cov-fail-under=70"
cmd = "pytest tests/unit"
help = "Run unit tests"
[tool.poe.tasks._types]
cmd = "mypy pywificli"
help = "Check types"
[tool.poe.tasks._pylint]
cmd = "pylint pywificli"
help = "Run pylint"
[tool.poe.tasks._format_code]
cmd = "black pywificli tests noxfile.py docs/conf.py"
help = "Apply black formatting to source code"
[tool.poe.tasks._sort_imports]
cmd = "isort pywificli tests"
help = "Sort imports with isort"
[tool.poe.tasks.format]
sequence = ["_format_code", "_sort_imports"]
help = "Format code and sort imports"
[tool.poe.tasks.lint]
sequence = ["_types", "_pylint"]
help = "Perform all static code analysis"
[tool.poe.tasks._pydocstyle]
cmd = "pydocstyle --config pyproject.toml -v pywificli"
help = "check docstrings style"
[tool.poe.tasks._doclint]
cmd = "pydoclint pywificli"
help = "validate docstrings"
[tool.poe.tasks.docstrings]
sequence = ["_pydocstyle", "_doclint"]
help = "Analyze docstrings for consistency and errors"
[tool.poe.tasks.sphinx]
cmd = "sphinx-build -W --keep-going -a -n -E -b html docs docs/build"
help = "Build sphinx documentation."
[tool.poe.tasks._coverage]
cmd = "coverage-badge -f -o docs/_static/coverage.svg"
help = "update coverage badge"
[tool.poe.tasks._clean_artifacts]
cmd = "rm -rf **/__pycache__ *.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_docs]
cmd = "rm -f docs/modules.rst && rm -rf docs/build"
help = "Clean built docs output"
[tool.poe.tasks._clean_build]
cmd = "rm -rf dist"
help = "Clean module build output"
[tool.poe.tasks.docs]
sequence = ["docstrings", "sphinx"]
help = "Validate docstrings and build docs"
[tool.poe.tasks.clean]
sequence = ["_clean_artifacts", "_clean_tests", "_clean_docs", "_clean_build"]
help = "Clean everything"
[tool.poe.tasks.all]
sequence = ["format", "lint", "tests", "_coverage", "docs"]
help = "Format, check types, lint, check docstrings, and run unit tests"
[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"
timeout = 10
addopts = [
"-s",
"--capture=tee-sys",
"--cov=pywificli",
"--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 = ["pywificli"]
omit = ["pywificli/demos*"]
[tool.coverage.html]
directory = ".reports/coverage"
[tool.coverage.report]
exclude_lines = ["raise NotImplementedError"]
[tool.pylint.'MASTER']
no-docstring-rgx = "__|main|parse_arguments|entrypoint"
load-plugins = "pylint.extensions.docparams"
accept-no-param-doc = "yes"
accept-no-return-doc = "yes"
default-docstring-type = "google"
ignore = ["tests"]
[tool.pylint.'MESSAGES CONTROL']
disable = [
"use-maxsplit-arg",
"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 = 160
[tool.black]
line-length = 120
exclude = ".venv"
[tool.pydocstyle]
convention = "google"
add-ignore = "D415, D107, D105"
match-dir = '(?!.*demos).*'
[tool.isort]
profile = "black"
[tool.pydoclint]
style = 'google'
require-return-section-when-returning-nothing = false