chore: adopt the NAPALM driver standard
driver / standard (pull_request) Successful in 15s
driver / lint (pull_request) Successful in 11s
driver / types (pull_request) Successful in 44s
driver / test (3.10) (pull_request) Successful in 46s
driver / test (3.11) (pull_request) Successful in 45s
driver / test (3.12) (pull_request) Successful in 42s
driver / test (3.13) (pull_request) Successful in 38s
driver / lowest (pull_request) Successful in 22s
driver / security (pull_request) Successful in 45s
driver / build (pull_request) Successful in 22s
CI / driver (pull_request) Successful in 5m30s
driver / publish (pull_request) Skipped
driver / standard (pull_request) Successful in 15s
driver / lint (pull_request) Successful in 11s
driver / types (pull_request) Successful in 44s
driver / test (3.10) (pull_request) Successful in 46s
driver / test (3.11) (pull_request) Successful in 45s
driver / test (3.12) (pull_request) Successful in 42s
driver / test (3.13) (pull_request) Successful in 38s
driver / lowest (pull_request) Successful in 22s
driver / security (pull_request) Successful in 45s
driver / build (pull_request) Successful in 22s
CI / driver (pull_request) Successful in 5m30s
driver / publish (pull_request) Skipped
- CI moves to .gitea/workflows/ci.yml and calls the shared driver workflow of NAPALM/driver-standard; .github/ is gone. - requires-python >=3.10 (napalm-device-types needs it), LICENSE file, py.typed, setuptools>=77 with the SPDX license string, Issues and Changelog links on git.netork.io, napalm-device-types>=4.21.1 from PyPI, floors on the dev extra. - mypy strict for the whole package, no module exempt: optional_args is dict[str, Any] | None. - tests/quality_baseline.json records get_facts and get_route_to, over complexity 10. Coverage floor 95 % (measured 95.67 %). - CHANGELOG.md in Keep a Changelog form; the README says no host output is recorded yet, links napalm-device-types in the NAPALM org and pypsrp on PyPI.
This commit is contained in:
1 parent
989e826b34
commit
d43d697700
9 files changed
+288
-67
No files matched your search
+32
-12
@@ -1,5 +1,5 @@
|
||||
[build-system]
|
||||
requires = ["setuptools>=68", "wheel"]
|
||||
requires = ["setuptools>=77"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
@@ -7,8 +7,8 @@ name = "napalm-windows"
|
||||
version = "0.1.0"
|
||||
description = "NAPALM driver for Windows hosts via PowerShell Remoting (WinRM)"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.9"
|
||||
license = { text = "Apache-2.0" }
|
||||
requires-python = ">=3.10"
|
||||
license = "Apache-2.0"
|
||||
authors = [
|
||||
{ name = "Christian Manivong", email = "christian@manivong.de" },
|
||||
]
|
||||
@@ -26,29 +26,28 @@ classifiers = [
|
||||
"Development Status :: 3 - Alpha",
|
||||
"Intended Audience :: Developers",
|
||||
"Intended Audience :: System Administrators",
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Operating System :: OS Independent",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
"Programming Language :: Python :: 3.13",
|
||||
"Topic :: System :: Networking",
|
||||
"Topic :: System :: Systems Administration",
|
||||
"Typing :: Typed",
|
||||
]
|
||||
dependencies = [
|
||||
"napalm>=4.0",
|
||||
"napalm-device-types>=2.4.0",
|
||||
"napalm-device-types>=4.21.1",
|
||||
"pypsrp>=0.8",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
dev = [
|
||||
"pytest",
|
||||
"pytest-cov",
|
||||
"ruff",
|
||||
"mypy",
|
||||
"pytest>=8",
|
||||
"pytest-cov>=5",
|
||||
"mypy>=1.11",
|
||||
"ruff>=0.6",
|
||||
]
|
||||
|
||||
[project.entry-points."napalm.drivers"]
|
||||
@@ -56,13 +55,15 @@ windows = "napalm_windows:WindowsDriver"
|
||||
|
||||
[project.urls]
|
||||
Repository = "https://git.netork.io/NAPALM/napalm-windows"
|
||||
Issues = "https://git.netork.io/NAPALM/napalm-windows/issues"
|
||||
Changelog = "https://git.netork.io/NAPALM/napalm-windows/src/branch/main/CHANGELOG.md"
|
||||
|
||||
[tool.setuptools.packages.find]
|
||||
where = ["."]
|
||||
include = ["napalm_windows*"]
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
testpaths = ["tests"]
|
||||
[tool.setuptools.package-data]
|
||||
napalm_windows = ["py.typed"]
|
||||
|
||||
[tool.ruff]
|
||||
line-length = 100
|
||||
@@ -74,3 +75,22 @@ select = ["E", "F", "I", "UP", "B"]
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
# Recorded device output keeps its lines.
|
||||
"tests/**" = ["E501"]
|
||||
|
||||
[tool.mypy]
|
||||
python_version = "3.10"
|
||||
strict = true
|
||||
# napalm itself is untyped, so every driver subclasses Any.
|
||||
disallow_subclassing_any = false
|
||||
|
||||
[[tool.mypy.overrides]]
|
||||
module = ["napalm.*", "pypsrp.*"]
|
||||
ignore_missing_imports = true
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
testpaths = ["tests"]
|
||||
|
||||
[tool.coverage.run]
|
||||
source = ["napalm_windows"]
|
||||
|
||||
[tool.coverage.report]
|
||||
fail_under = 95
|
||||
Reference in new issue
Block a user