forked from aristanetworks/avd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
162 lines (146 loc) · 4.12 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
[project]
name="pyavd"
dynamic = ["version"]
authors=[{ name = "Arista Networks", email = "[email protected]"}]
description="Arista Validated Designs"
readme = "README.md"
license = { file = "pyavd/LICENSE" }
classifiers = [
"Operating System :: OS Independent",
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Programming Language :: Python",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Testing",
]
keywords = ["pyavd"]
requires-python = ">=3.10"
dependencies = [
"aristaproto>=0.1.1",
"cryptography>=38.0.4",
"deepmerge>=1.1.0",
"Jinja2>=3.0",
"requests>=2.27.0",
]
[project.urls]
homepage = "https://avd.arista.com"
repository = "https://github.com/aristanetworks/avd"
[dependency-groups]
pytest = [
"ansible-core>=2.15.0,<2.19.0",
"pytest",
"pytest-asyncio",
"PyYAML>=6.0.0",
"pydantic>=2.3.0",
"referencing>=0.35.0",
]
coverage = [
"coverage[toml]",
]
[project.optional-dependencies]
ansible = [
"ansible-core>=2.15.0,<2.19.0",
"pyavd[ansible-collection]",
]
ansible-collection = [
"anta>=1.1.0",
"cvprac>=1.4.0",
"netaddr>=0.7.19",
"PyYAML>=6.0.0",
"treelib>=1.5.5",
# jsonschema is required for the arista.cvp Ansible collection
"jsonschema>=3.2.0",
]
[build-system]
requires = [
"setuptools>=66.1",
"wheel",
"jinja2>=3.0",
"jsonschema-rs>=0.24",
"referencing>=0.35.0",
"deepmerge>=1.1.0",
"pyyaml>=6.0.0",
"mkdocstrings[python]",
"pydantic>=2.3.0",
"cryptography>=38.0.4",
"aristaproto>=0.1.1",
"ruff==0.7.2",
]
build-backend = "custom_build_backend"
backend-path = ["scripts"]
[tool.setuptools]
include-package-data = true
[tool.setuptools.package-data]
"*" = [
"avd_meta_schema.pickle",
"eos_cli_config_gen.schema.pickle",
"eos_designs.schema.pickle",
]
[tool.setuptools.packages.find]
include = ["pyavd*"]
[tool.setuptools.dynamic]
version = {attr = "pyavd.__version__"}
[tool.black]
# Black has been replaced with Ruff.
# This section should be removed later, but kept here to avoid IDE extensions from messing up the code.
line-length = 160
force-exclude = '''pyavd/_cv/api/.*'''
[tool.isort]
# Isort has been replaced with Ruff.
# This section should be removed later, but kept here to avoid IDE extensions from messing up the code.
profile = "black"
skip_gitignore = true
line_length = 160
known_first_party = ["pyavd", "schema_tools"]
extend_skip_glob = [
"pyavd/_cv/api/**/*"
]
[tool.coverage.run]
branch = true
[tool.coverage.report]
show_missing = true
fail_under = 85
include = [
"pyavd/*"
]
omit = [
"pyavd/_cv/api/*"
]
# Regexes for lines to exclude from consideration
exclude_also = [
# Have to re-enable the standard pragma
"pragma: no cover",
# Don't complain about missing debug-only code:
"def __repr__",
"if self\\.debug",
# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError",
# Don't complain if non-runnable code isn't run:
"if 0:",
"if __name__ == .__main__.:",
# Don't complain about abstract methods, they aren't run:
"@(abc\\.)?abstractmethod",
# Don't complain about TYPE_CHECKING blocks
"if TYPE_CHECKING:",
# Don't complain about Jinja2 internalcode
# Note that except KeyError is a bit sad but this is the pattern
"except KeyError:",
"@internalcode",
"raise TemplateRuntimeError",
"^blocks = {}",
"^debug_info =.*",
]
[tool.ruff]
# Extend the `pyproject.toml` file in the parent directory...
# Should not be needed, but the ruff vscode extension does not seem to respect the ruff behavior of ignoring files without tool.ruff
extend = "../pyproject.toml"
[tool.pytest.ini_options]
markers = [
"molecule_scenarios: Create test case fixtures 'molecule_host' or 'molecule_scenario' for the given molecule scenarios.",
]
asyncio_default_fixture_loop_scope = "function"