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 54s
driver / test (3.10) (pull_request) Successful in 59s
driver / test (3.11) (pull_request) Successful in 55s
driver / test (3.12) (pull_request) Successful in 57s
driver / lowest (pull_request) Successful in 30s
driver / test (3.13) (pull_request) Successful in 49s
driver / build (pull_request) Successful in 25s
driver / security (pull_request) Successful in 57s
CI / driver (pull_request) Successful in 3m6s
driver / publish (pull_request) Skipped

- CI moves to .gitea/workflows/ci.yml and calls the shared driver workflow
  of NAPALM/driver-standard; napalm-device-types and napalm-linux come from
  git until napalm-linux 0.15.0 is on PyPI.
- requires-python >=3.10 (napalm-device-types needs it), SPDX license
  string, setuptools>=77, LICENSE file, py.typed, Issues and Changelog
  links.
- Dependencies: napalm-device-types>=4.22.0, napalm-linux>=0.15.0; the
  floors napalm>=4.0, netmiko>=4.0.0 and paramiko>=5.0.0 stay and pass
  the tests at exactly those versions. The dev extra gets floors and
  drops black (ruff formats).
- mypy strict for the whole package, no exempt module. install_package
  and uninstall_package keep napalm-device-types' PackagesMixin
  signatures, which LinuxDriver's differ from: type: ignore[override]
  on those two lines, with the reason above them.
- Coverage floor 76 % (measured 76.19 %); the quality baseline is empty
  apart from it.
This commit is contained in:
Christian Manivong committed 2026-10-23 12:09:52 +02:00
1 parent 991cae7e8d
commit dd785da94f
8 files changed
+256 -66

No files matched your search

+28 -14
View File
@@ -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-qnap-qts"
version = "0.5.0"
description = "NAPALM driver for QNAP NAS systems running QTS via SSH"
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" },
]
@@ -27,13 +27,12 @@ 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",
@@ -43,31 +42,30 @@ classifiers = [
# processes, Docker) from LinuxDriver rather than reimplementing it.
dependencies = [
"napalm>=4.0",
"napalm-device-types>=2.6.0",
"napalm-linux>=0.9.0",
"napalm-device-types>=4.22.0",
"napalm-linux>=0.15.0",
"netmiko>=4.0.0",
"paramiko>=5.0.0", # CVE-2026-44405
]
[project.optional-dependencies]
dev = [
"pytest",
"pytest-cov",
"black",
"ruff",
"mypy",
]
dev = ["pytest>=8", "pytest-cov>=5", "mypy>=1.11", "ruff>=0.6"]
[project.entry-points."napalm.drivers"]
qnap_qts = "napalm_qnap_qts:QnapQtsDriver"
[project.urls]
Repository = "https://git.netork.io/NAPALM/napalm-qnap-qts"
Issues = "https://git.netork.io/NAPALM/napalm-qnap-qts/issues"
Changelog = "https://git.netork.io/NAPALM/napalm-qnap-qts/src/branch/main/CHANGELOG.md"
[tool.setuptools.packages.find]
where = ["."]
include = ["napalm_qnap_qts*"]
[tool.setuptools.package-data]
napalm_qnap_qts = ["py.typed"]
[tool.pytest.ini_options]
testpaths = ["tests"]
@@ -81,3 +79,19 @@ 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.*"]
ignore_missing_imports = true
[tool.coverage.run]
source = ["napalm_qnap_qts"]
[tool.coverage.report]
fail_under = 76