-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathpyproject.toml
More file actions
180 lines (164 loc) · 6.02 KB
/
Copy pathpyproject.toml
File metadata and controls
180 lines (164 loc) · 6.02 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
[project]
name = "nac-test"
version = "2.0.0"
description = "A CLI tool to render to execute Robot Framework (RF) and PyATS tests for Network as Code (NAC)."
license = { text = "MPL-2.0" }
readme = "README.md"
requires-python = ">=3.10,<3.15"
authors = [
{ name = "Daniel Schmidt", email = "danischm@cisco.com" },
{ name = "Andrea Testino", email = "atestini@cisco.com" },
{ name = "Oliver Boehmer", email = "oboehmer@cisco.com" },
]
maintainers = [
{ name = "Daniel Schmidt", email = "danischm@cisco.com" },
{ name = "Oliver Boehmer", email = "oboehmer@cisco.com" },
]
keywords = ["robot", "pyats", "testing", "automation", "jinja", "templating", "network"]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Testing",
]
dependencies = [
"Jinja2>=3.1.6",
"jmespath>=1.0.1",
"nac-test-pyats-common>=0.3.0",
"nac-yaml>=2.0.0",
"robotframework>=7.4.2",
"robotframework-jmespath",
"robotframework-jsonlibrary>=0.5",
"jsonpath-ng!=1.8.0", # Exclude broken version (h2non/jsonpath-ng#216)
"robotframework-pabot>=5.2.2,<6", # <6 to avoid major upgrades with possibly breaking changes in CLI arg parsing
"robotframework-requests>=0.9.7",
"ruamel.yaml>=0.18.15",
"typer>=0.17.4",
"scrapli-netconf>=2026.1.12",
"asyncssh>=2.22.0",
# PyATS & Genie Ecosystem — not supported on Windows
"pyats>=26.5; sys_platform != 'win32'",
"genie>=26.5; sys_platform != 'win32'",
"psutil>=7.2.2",
"httpx~=0.28",
"aiofiles>=23.2.1", # radkit-client still uses <24.0, so relax to avoid conflicts
"colorama>=0.4.6",
"markdown>=3.10.2",
"typing_extensions>=4.0; python_version < '3.11'",
"filelock>=3.25.2",
"lxml>=6.1.0",
]
[project.urls]
homepage = "https://github.com/netascode/nac-test"
repository = "https://github.com/netascode/nac-test"
documentation = "https://github.com/netascode/nac-test"
[project.scripts]
nac-test = "nac_test.cli.main:app"
[project.optional-dependencies]
dev = [
"ansible-core>=2.17.6",
"bandit[toml]>=1.9.4",
"flask>=3.1.3",
"mypy>=1.17.1",
"nac-test-pyats-common>=0.1.0", # Required for integration tests
"pre-commit>=4.6.0",
"pytest>=9.0.3",
"pytest-cov~=7.1",
"pytest-httpserver>=1.1.5",
"pytest-mock>=3.15.1",
"pytest-xdist>=3.8.0", # Parallel test execution
"ruff>=0.15.10",
"types-aiofiles>=25.1.0.20260409",
"types-markdown>=3.10.2.20260408",
"types-pyyaml>=6.0.12.20250822",
"types-requests>=2.33.0.20260408",
]
[tool.uv]
# pysnmp==6.1.4 (pulled in by genie-libs-sdk) incorrectly declares pytest-cov<5 as a
# runtime dependency. Override it so we can use current pytest-cov releases.
override-dependencies = [
"pytest-cov>=7.1",
]
# Dependency cooldown: ignore packages uploaded less than 3 days ago.
exclude-newer = "3 days"
exclude-newer-package = { nac-yaml = false }
[tool.coverage.run]
source = ["nac_test"]
[tool.coverage.report]
exclude_lines = ["pragma: no cover", "@abstract", "except ImportError:"]
omit = ["*/__main__.py"]
[tool.ruff]
target-version = "py310"
line-length = 88
extend-exclude = ["tests/fixtures/", "tests/integration/fixtures/", "tests/e2e/fixtures/"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
]
ignore = [
"E501", # line too long (handled by formatter)
"UP038", # Use `X | Y` in `isinstance` call instead of `(X, Y)`
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"nac_test/pyats_core/common/types.py" = ["UP007"] # Keep Union for readability in complex type alias
[tool.ruff.lint.isort]
known-first-party = ["nac_test"]
[tool.bandit]
exclude_dirs = ["tests"]
# B101: assert used for type narrowing
# B108: hardcoded tmp directory (expected for temp files)
# B110: try/except/pass (expected for best-effort cleanup)
# B311: random used for jitter, not security
# B324: MD5 used for cache keys, not security
# B403: pickle needed for serialization
# B404: subprocess needed for test execution
# B701: jinja2 without autoescape (not generating HTML)
skips = ["B101", "B108", "B110", "B311", "B324", "B403", "B404", "B701"]
[tool.mypy]
check_untyped_defs = true
disallow_any_generics = true
disallow_incomplete_defs = true
disallow_untyped_calls = true
disallow_untyped_decorators = false
disallow_untyped_defs = true
ignore_errors = false
ignore_missing_imports = true
python_version = "3.10"
strict_optional = true
warn_redundant_casts = true
warn_return_any = true
warn_unused_configs = true
warn_unused_ignores = false
warn_unreachable = true
show_error_context = true
exclude = ["^tests/fixtures/", "^tests/integration/fixtures/", "^tests/e2e/fixtures/"]
[tool.pytest.ini_options]
markers = ["unit", "integration", "e2e", "windows"]
# Exclude fixture files from test collection - they are sample files for testing the resolver
# Exclude nac_test source directory - prevents pytest from trying to collect Test* classes
norecursedirs = ["tests/fixtures", "tests/e2e/fixtures", "nac_test"]
# Suppress PytestCollectionWarning for source classes named Test* that are imported by tests
filterwarnings = [
"ignore:cannot collect test class 'Test(FileMetadata|Discovery|MetadataResolver|ResultCollector|Results|Result|Collector|DataCollector|Status|Error)':pytest.PytestCollectionWarning",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["nac_test"]
[tool.hatch.build.targets.wheel.force-include]
"nac_test/support/nac-test-diagnostic.sh" = "nac_test/support/nac-test-diagnostic.sh"