-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathpyproject.toml
More file actions
230 lines (208 loc) · 5.84 KB
/
pyproject.toml
File metadata and controls
230 lines (208 loc) · 5.84 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
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
# pyproject.toml format -> See PEP 621
[project]
name = "ciscoconfparse2"
description = "Parse, Audit, Query, Build, and Modify Cisco IOS-style and JunOS-style configs"
readme = "README.md"
license = "GPL-3.0-only"
requires-python = ">= 3.10"
dynamic = ["version"]
dependencies = [
# NOTE changing attrs versions may require code / test changes
"attrs>24.3.0,<26.0.0",
"dnspython==2.8.0",
"macaddress==2.0.2",
"traitlets==5.14.3",
"loguru>=0.7.2",
"hier_config==2.3.1",
"pyparsing==3.3.2",
"toml==0.10.2",
# NOTE changing typeguard versions may require code / test changes
"typeguard==4.4.4",
"PyYAML>=6.0.2",
"rich>=14.3.0",
# "passlib==1.7.4", <-- deprecating passlib (now unmaintained) in favor of libpass
# https://github.com/notypecheck/passlib
"libpass==1.9.3",
# Hypothesis for hard-core ip_address tests
"hypothesis==6.150.3",
]
authors = [
{ name = "Mike Pennington", email = "mike@pennington.net" },
]
keywords = [
"Parse",
"audit",
"query",
"modify",
"Cisco IOS",
"Cisco",
"NXOS",
"ASA",
"Juniper",
]
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Plugins",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"Intended Audience :: Information Technology",
"Intended Audience :: Telecommunications Industry",
"License :: OSI Approved :: GNU General Public License (GPL)",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Topic :: Communications",
"Topic :: Internet",
"Topic :: System :: Networking",
"Topic :: System :: Networking :: Monitoring",
]
[project.optional-dependencies]
# Ensure wheel is upgraded... ref Github Issue #257
dev = [
"hatch>=1.16.3",
"hatchling>=1.28.0",
"pytest>=9.0.1",
"pre-commit>=4.5.1",
"black==26.1.0",
"ty==0.0.17",
"pyupgrade==3.21.2",
"yamlfix==1.19.1",
#"pylama==8.4.1",
"ruff==0.15.1",
"pylint==4.0.4",
"coverage>=7.3.2",
"pytest-cov>=4.1.0",
"pyroma==5.0.1",
"invoke==2.2.1",
"fabric==3.2.2",
"commitizen>=2.40.0",
"python-lsp-server>=1.12.2",
"tox==4.30.3",
]
doc = [
"Sphinx>=9.0.4",
"sphinx-rtd-theme>=2.0.0",
"numpydoc==1.9.0",
"pydocstyle==6.3.0",
]
[project.scripts]
ccp = "ciscoconfparse2.cli_script:ccp_script_entry"
[build-system]
requires = ["hatchling>=1.27.0"]
build-backend = "hatchling.build"
[project.urls]
homepage = "http://github.com/mpenning/ciscoconfparse2"
changelog = "https://github.com/mpenning/ciscoconfparse2/blob/main/CHANGES.md"
repository = "https://github.com/mpenning/ciscoconfparse2"
documentation = "http://www.pennington.net/py/ciscoconfparse2/"
[tool.hatch.version]
path = "ciscoconfparse2/__about__.py"
scheme = "standard"
[tool.hatch.build.targets.sdist]
exclude = [
"/.github",
"/.git",
"/dev_tools",
"/dist",
]
[tool.hatch.build.targets.wheel]
packages = [
"ciscoconfparse2/",
"tests/",
]
[tool.hatch.envs.default.scripts]
pytest = "cd tests && pytest ."
[tool.pylint]
# Minimum Python version to use for version dependent checks.
# Will default to the version used to run pylint.
py-version = "3.10"
[tool.pylint."messages control"]
disable = """
C0301
"""
[tool.yamlfix]
preserve_quotes = true
line_length = 1000
sequence_style = "block_style"
whitelines = 1
quote_basic_values = true
quote_representation='"'
[tool.black]
line-length=320
[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
]
# Same as Black.
line-length = 320
indent-width = 4
[tool.ruff.format]
# The formatter shares some settings like line-length from the top-level [tool.ruff] section.
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
# Experimental docstring formatter
docstring-code-format = true
[tool.ruff.lint.isort]
combine-as-imports = true
[tool.ruff.lint]
# Enable ruff experimental features
preview = true
# Enable core linting rules:
select = [
"C4", # Catch incorrect use of comprehensions, dict, list, etc
"E", # PyCodeStyle errors
"F", # Pyflakes rules
"FA", # Verifies files use from __future__ import annotations if PEP 563 applies to the file.
"I", # I: isort-compatible import sorting
"PTH", # Use pathlib instead of os.path
"PYI", # Linting rules for some type annotations
"Q", # Linting rules for quoting
"RUF", # Ruff linting rules
"SIM", # Common flake8 simplification rules
"UP", # Warn if certain things can changed due to newer Python versions
"W", # PyCodeStyle warnings
]
extend-select = [
"FA", # Enforce from __future__ import annotations
"ISC", # Good use of string concatenation
"ICN", # Use common import conventions
"RET", # Good return practices
"TID", # Some good import practices
"TC", # Enforce importing certain types in a TYPE_CHECKING block
"TD", # Be diligent with TODO comments
"NPY", # Some numpy-specific things
]
ignore = [
"E266", # Do not modify ###### comments to a single #
"F401", # Ignore obnoxious ruff imports (i.e import foo as foo)
"RET504", # Ignore variable assignment before return
"SIM108", # Do not recommend python ternary if-then-else oneliners
"TD001", # Ignore FIXME complaints
"TD002", # Ignore missing TODO author
"TD003", # Ignore missing TODO issue url
"TD004", # Ignore missing TODO with colon
"RUF052", # Ignore ruff lints for accessing 'private' _variable names
]