chore: adopt the NAPALM driver standard
driver / standard (pull_request) Successful in 13s
driver / lint (pull_request) Successful in 11s
driver / types (pull_request) Successful in 44s
driver / test (3.10) (pull_request) Successful in 47s
driver / test (3.11) (pull_request) Successful in 44s
driver / test (3.12) (pull_request) Successful in 44s
driver / test (3.13) (pull_request) Successful in 39s
driver / lowest (pull_request) Failing after 21s
driver / security (pull_request) Successful in 47s
driver / build (pull_request) Successful in 22s
CI / driver (pull_request) Failing after 5m32s
driver / publish (pull_request) Skipped
driver / standard (pull_request) Successful in 13s
driver / lint (pull_request) Successful in 11s
driver / types (pull_request) Successful in 44s
driver / test (3.10) (pull_request) Successful in 47s
driver / test (3.11) (pull_request) Successful in 44s
driver / test (3.12) (pull_request) Successful in 44s
driver / test (3.13) (pull_request) Successful in 39s
driver / lowest (pull_request) Failing after 21s
driver / security (pull_request) Successful in 47s
driver / build (pull_request) Successful in 22s
CI / driver (pull_request) Failing after 5m32s
driver / publish (pull_request) Skipped
- The distribution is renamed to napalm-netgear-switches: napalm-netgear on PyPI belongs to another project. The import package napalm_netgear and the napalm.drivers entry points netgear_smart and netgear_plus stay; [tool.napalm-standard] package names the import package for the check. README install line and CHANGELOG say the new name. - 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), floor napalm-device-types>=4.21.1, LICENSE file, py.typed, SPDX license string, links to git.netork.io, a dev extra with floors, CHANGELOG.md. - mypy strict for the package; napalm_netgear.netgear_plus and napalm_netgear.netgear_smart are exempt for now (139 errors), recorded in the quality baseline with their long and complex functions and the 2070-line netgear_smart module. Coverage floor 48 % (measured 48.23 %). Closes #14
This commit is contained in:
1 parent
672bc04261
commit
10a3b1efbf
8 files changed
+320
-69
No files matched your search
+42
-15
@@ -1,32 +1,31 @@
|
||||
[build-system]
|
||||
requires = ["setuptools>=64", "wheel"]
|
||||
requires = ["setuptools>=77"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "napalm-netgear"
|
||||
# "napalm-netgear" on PyPI belongs to someone else (STANDARDS.md §8).
|
||||
name = "napalm-netgear-switches"
|
||||
version = "0.5.0"
|
||||
description = "NAPALM driver for Netgear switches (Plus/Smart)"
|
||||
readme = "README.md"
|
||||
license = { text = "Apache-2.0" }
|
||||
requires-python = ">=3.8"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.10"
|
||||
authors = [
|
||||
{ name = "Christian Manivong" },
|
||||
]
|
||||
classifiers = [
|
||||
"Topic :: Utilities",
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"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",
|
||||
"Operating System :: POSIX :: Linux",
|
||||
"Operating System :: MacOS",
|
||||
]
|
||||
dependencies = [
|
||||
"napalm>=4.0.0",
|
||||
"napalm-device-types>=4.19.0",
|
||||
"napalm-device-types>=4.21.1",
|
||||
"netmiko>=4.0.0",
|
||||
"paramiko>=5.0.0", # CVE-2026-44405
|
||||
"netaddr",
|
||||
@@ -34,24 +33,28 @@ dependencies = [
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
dev = [
|
||||
"pytest",
|
||||
"pytest-cov",
|
||||
"black",
|
||||
"ruff",
|
||||
]
|
||||
dev = ["pytest>=8", "pytest-cov>=5", "mypy>=1.11", "ruff>=0.6"]
|
||||
|
||||
[project.entry-points."napalm.drivers"]
|
||||
netgear_smart = "napalm_netgear:NetgearSmartDriver"
|
||||
netgear_plus = "napalm_netgear:NetgearPlusDriver"
|
||||
|
||||
[project.urls]
|
||||
Repository = "https://github.com/napalm-automation-community/napalm-netgear"
|
||||
Repository = "https://git.netork.io/NAPALM/napalm-netgear"
|
||||
Issues = "https://git.netork.io/NAPALM/napalm-netgear/issues"
|
||||
Changelog = "https://git.netork.io/NAPALM/napalm-netgear/src/branch/main/CHANGELOG.md"
|
||||
|
||||
[tool.napalm-standard]
|
||||
# The distribution name differs from the import package.
|
||||
package = "napalm_netgear"
|
||||
|
||||
[tool.setuptools.packages.find]
|
||||
where = ["."]
|
||||
include = ["napalm_netgear*"]
|
||||
|
||||
[tool.setuptools.package-data]
|
||||
napalm_netgear = ["py.typed"]
|
||||
|
||||
[tool.ruff]
|
||||
line-length = 100
|
||||
target-version = "py310"
|
||||
@@ -62,3 +65,27 @@ 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.*", "netaddr.*", "py_netgear_plus.*"]
|
||||
ignore_missing_imports = true
|
||||
|
||||
[[tool.mypy.overrides]]
|
||||
# Not yet under strict mypy (quality baseline); may only shrink.
|
||||
module = ["napalm_netgear.netgear_plus", "napalm_netgear.netgear_smart"]
|
||||
ignore_errors = true
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
testpaths = ["tests"]
|
||||
|
||||
[tool.coverage.run]
|
||||
source = ["napalm_netgear"]
|
||||
|
||||
[tool.coverage.report]
|
||||
fail_under = 48
|
||||
Reference in new issue
Block a user