chore: adopt the NAPALM driver standard
driver / standard (pull_request) Successful in 15s
driver / lint (pull_request) Successful in 15s
driver / types (pull_request) Successful in 55s
driver / test (3.10) (pull_request) Successful in 1m6s
driver / test (3.11) (pull_request) Successful in 59s
driver / test (3.12) (pull_request) Successful in 47s
driver / test (3.13) (pull_request) Successful in 44s
driver / lowest (pull_request) Successful in 24s
driver / security (pull_request) Successful in 52s
driver / build (pull_request) Successful in 29s
CI / driver (pull_request) Successful in 6m47s
driver / publish (pull_request) Skipped

- CI moves to .gitea/workflows/ci.yml and calls the shared driver workflow
  of NAPALM/driver-standard. .github/ goes with publish.yml and tests.yml:
  PyPI Trusted Publishing never worked from Gitea.
- requirements.txt goes: it only repeated the pyproject dependencies, with
  an older napalm-device-types floor and without paramiko.
- LICENSE file (the README already pointed to it), CHANGELOG, py.typed,
  SPDX license string, links to git.netork.io (README included);
  napalm-device-types >=4.21.1, a dev extra with floors.
- netaddr gets a true floor (>=0.7.10): unbounded, the lowest job
  installed a version without IPAddress, which napalm imports.
- mypy strict for the package; napalm_tplink_jetstream.tplink_jetstream is
  exempt for now (96 errors), recorded in the quality baseline with its
  long functions and the 2000-line module. Coverage floor 36 % (measured
  36.71 %).
This commit is contained in:
Christian Manivong committed 2026-10-23 08:48:12 +02:00
1 parent bef2f23ab2
commit 4e171bff30
10 files changed
+351 -101

No files matched your search

+39 -10
View File
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools>=64", "wheel"]
requires = ["setuptools>=77"]
build-backend = "setuptools.build_meta"
[project]
@@ -7,47 +7,52 @@ name = "napalm-tplink-jetstream"
version = "0.4.0"
description = "NAPALM driver for TP-Link Jetstream managed switches"
readme = "README.md"
license = { text = "Apache-2.0" }
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.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",
"netaddr>=0.7.10",
]
[project.optional-dependencies]
dev = [
"pytest",
"pytest-cov",
"black",
"ruff",
"pytest>=8",
"pytest-cov>=5",
"mypy>=1.11",
"ruff>=0.6",
]
[project.entry-points."napalm.drivers"]
tplink_jetstream = "napalm_tplink_jetstream:TPLinkJetstreamDriver"
[project.urls]
Repository = "https://github.com/chrismanivong/napalm-tplink-jetstream"
Repository = "https://git.netork.io/NAPALM/napalm-tplink-jetstream"
Issues = "https://git.netork.io/NAPALM/napalm-tplink-jetstream/issues"
Changelog = "https://git.netork.io/NAPALM/napalm-tplink-jetstream/src/branch/main/CHANGELOG.md"
[tool.setuptools.packages.find]
where = ["."]
include = ["napalm_tplink_jetstream*"]
[tool.setuptools.package-data]
napalm_tplink_jetstream = ["py.typed"]
[tool.ruff]
line-length = 100
target-version = "py310"
@@ -58,3 +63,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.*", "netmiko.*", "paramiko.*", "netaddr.*"]
ignore_missing_imports = true
[[tool.mypy.overrides]]
# Not yet under strict mypy (quality baseline); may only shrink.
module = ["napalm_tplink_jetstream.tplink_jetstream"]
ignore_errors = true
[tool.pytest.ini_options]
testpaths = ["tests"]
[tool.coverage.run]
source = ["napalm_tplink_jetstream"]
[tool.coverage.report]
fail_under = 36