-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathpyproject.toml
More file actions
170 lines (154 loc) · 4.61 KB
/
pyproject.toml
File metadata and controls
170 lines (154 loc) · 4.61 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
[project]
name = "python2025"
version = "0.1.0"
description = ""
authors = [{ name = "Your Name", email = "you@example.com" }]
readme = "README.md"
requires-python = ">=3.12,<4.0"
dependencies = [
"pyyaml (>=6.0.2,<7.0.0)",
"pydantic (>=2.11.4,<3.0.0)",
"scrapli[community,paramiko,textfsm] (>=2025.1.30,<2026.0.0)",
"scrapli-community (>=2025.1.30,<2026.0.0)",
"requests (>=2.32.3,<3.0.0)",
"uvloop (>=0.21.0,<0.22.0)",
"confluent-kafka (>=2.10.0,<3.0.0)",
"aiokafka (>=0.12.0,<0.13.0)",
"wemake-python-styleguide (>=1.1.0,<2.0.0)",
"netaddr (>=1.3.0,<2.0.0)",
"redis (>=6.2.0,<7.0.0)",
"rq (>=2.4.0,<3.0.0)",
"paramiko (>=3.5.1,<4.0.0)",
"jinja2 (>=3.1.6,<4.0.0)",
"scrapli-replay (>=2024.7.30,<2025.0.0)",
"nornir (>=3.5.0,<4.0.0)",
"nornir-utils (>=0.2.0,<0.3.0)",
"nornir-jinja2 (>=0.2.0,<0.3.0)",
"nornir-scrapli (>=2025.1.30,<2026.0.0)",
"tqdm (>=4.67.1,<5.0.0)",
"nornir-csv (>=0.3.0,<0.4.0)",
"nornir-rich (>=0.2.0,<0.3.0)",
"rich (<14.0.0)",
"nornir-netconf (>=2.1.0,<3.0.0)",
"nornir-netbox (>=0.3.0,<0.4.0)",
"ctreepo (>=0.3.30,<0.4.0)",
"aiofiles (>=24.1.0,<25.0.0)",
"aiopath (>=0.7.7,<0.8.0)",
"aiohttp (>=3.12.15,<4.0.0)",
"httpx (>=0.28.1,<0.29.0)",
"grpcio (>=1.75.1,<2.0.0)",
"protobuf (>=6.32.1,<7.0.0)",
"grpcio-reflection (>=1.75.1,<2.0.0)",
"google-api-core (>=2.26.0,<3.0.0)",
]
[tool.poetry]
package-mode = false
[tool.poetry.group.dev.dependencies]
ipython = "^9.2.0"
ruff = "^0.11.9"
types-netaddr = "^1.3.0.20240530"
types-pyyaml = "^6.0.12.20250516"
black = "^25.1.0"
flake8 = "^7.2.0"
flake8-pyproject = "^1.2.3"
radon = "^6.0.1"
mypy = "^1.16.1"
types-requests = "^2.32.4.20250611"
pytest = "^8.4.1"
pytest-asyncio = "^1.1.0"
scrapli-replay = "^2024.7.30"
pytest-mock = "^3.15.0"
pytest-cov = "^6.3.0"
coverage = "^7.10.6"
pytest-dotenv = "^0.5.2"
grpcio-tools = "^1.75.1"
mypy-protobuf = "^3.6.0"
grpc-stubs = "^1.53.0.6"
[tool.black]
line-length = 120
[tool.flake8]
exclude = ["venv", ".venv", ".git", "__pycache__"]
select = "WPS"
ignore = [
"WPS421", # Found wrong function call: {}
"WPS102", # Found incorrect module name pattern
]
per-file-ignores = [
"03.output_collect.py:WPS221,WPS407", # отключаем на уровне файла
]
max-jones-score = 10 # WPS200
max-line-complexity = 10 # WPS221
max-cognitive-score = 10 # WPS231
allowed-domain-names = [ # некоторые проверки позволяют себя настраивать
"value",
"data",
"item",
"result",
]
[tool.ruff]
# https://docs.astral.sh/ruff/settings
extend-exclude = ["__init__.py"]
line-length = 120
lint.pydocstyle.convention = "google"
lint.select = [
"N", # pep8-naming
"B", # flake8-bugbear
"A", # flake8-builtins
"E", # pycodestyle.error
"W", # pycodestyle.warning
"F", # pyflakes
"S", # flake8-bandit
"D", # pydocstyle
"I", # isort
"C90", # maccabe
"C4", # flake8-comprehensions
"COM", # flake8-commas
"DTZ", # flake8-datetimez
"ERA", # flake8-eradicate
"SLOT", # flake8-slots
"SLF", # flake8-self
]
lint.ignore = [
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D105", # Missing docstring in magic method
"D106", # Missing docstring in public nested class
"D107", # Missing docstring in `__init__`
"S101", # Use of `assert` detected
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
"ERA001", # Remove commented-out code
]
[tool.coverage.run]
command_line = "-m unittest discover -s ./tests/s10_cov/ -v"
# command_line = "-m pytest"
branch = true
[tool.coverage.report]
skip_empty = true
omit = [
"*/.local/*",
# папка с тестами
"./tests/*",
]
exclude_also = [
# исключаем main секцию вместо # pragma: no cover
'if __name__ == .__main__.:',
]
[tool.pytest.ini_options]
markers = [
"api: тесты api",
"slow: медленные тесты",
"redis: тесты с запущенным редисом",
"mock_ssh: тесты с mock-ssh scrapli сервером",
]
asyncio_mode = "auto" # auto | strict (default)
testpaths = ["tests"]
# console_output_style = "count"
addopts = "-ra --strict-markers -v"
filterwarnings = ["ignore::DeprecationWarning"]
# xfail_strict = true
# asyncio_default_fixture_loop_scope = "module"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"