chore: adopt the NAPALM driver standard
driver / standard (pull_request) Successful in 13s
driver / lint (pull_request) Successful in 12s
driver / types (pull_request) Successful in 43s
driver / test (3.10) (pull_request) Successful in 46s
driver / test (3.11) (pull_request) Successful in 48s
driver / test (3.12) (pull_request) Successful in 43s
driver / test (3.13) (pull_request) Successful in 39s
driver / lowest (pull_request) Successful in 23s
driver / security (pull_request) Successful in 46s
driver / build (pull_request) Successful in 22s
CI / driver (pull_request) Successful in 5m37s
driver / publish (pull_request) Skipped

- CI arrives in .gitea/workflows/ci.yml and calls the shared driver
  workflow of NAPALM/driver-standard; the repo had none before.
- setuptools>=77 and the SPDX license string PEP 639 wants, without the
  License classifier; napalm-device-types>=4.21.1 from PyPI; Issues and
  Changelog links on git.netork.io. LICENSE, NOTICE and py.typed were
  already there and stay.
- The test extra becomes the dev extra of the standard, plus responses,
  which the tests mock AMT with.
- mypy strict with the untyped imports (napalm, requests, defusedxml)
  named instead of ignored globally; napalm_amt.driver is exempt for now
  (5 errors: getters return dicts where the role declares TypedDicts),
  recorded in tests/quality_baseline.json with get_event_log's
  complexity of 11.
- Coverage floor 95 % (measured 95.87 %).
- CHANGELOG.md in Keep a Changelog form; the README's development steps
  install from PyPI.
This commit is contained in:
christianmanivong committed 2026-10-23 08:37:32 +02:00
1 parent 76f85051cc
commit c9a7ee4378
6 files changed
+83 -21

No files matched your search

+25 -13
View File
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools>=64"]
requires = ["setuptools>=77"]
build-backend = "setuptools.build_meta"
[project]
@@ -7,17 +7,15 @@ name = "napalm-amt"
version = "0.1.1"
description = "NAPALM driver for Intel Active Management Technology (AMT) over WS-Management"
readme = "README.md"
license = { file = "LICENSE" }
license = "Apache-2.0"
requires-python = ">=3.10"
dependencies = [
"napalm>=5.0",
# Not on PyPI: install from git before this package (see README).
"napalm-device-types>=4.16",
"napalm-device-types>=4.21.1",
"requests>=2.31",
"defusedxml>=0.7",
]
classifiers = [
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Topic :: System :: Hardware",
"Topic :: System :: Networking",
@@ -25,12 +23,12 @@ classifiers = [
[project.urls]
Repository = "https://git.netork.io/NAPALM/napalm-amt"
Issues = "https://git.netork.io/NAPALM/napalm-amt/issues"
Changelog = "https://git.netork.io/NAPALM/napalm-amt/src/branch/main/CHANGELOG.md"
[project.optional-dependencies]
test = [
"pytest>=7",
"responses>=0.23",
]
# responses mocks AMT's HTTP answers in the tests.
dev = ["pytest>=8", "pytest-cov>=5", "mypy>=1.11", "ruff>=0.6", "responses>=0.23"]
[project.entry-points."napalm.drivers"]
amt = "napalm_amt:AmtDriver"
@@ -41,9 +39,6 @@ include = ["napalm_amt*"]
[tool.setuptools.package-data]
napalm_amt = ["py.typed"]
[tool.pytest.ini_options]
testpaths = ["tests"]
[tool.ruff]
line-length = 100
target-version = "py310"
@@ -58,6 +53,23 @@ select = ["E", "F", "I", "UP", "B"]
[tool.mypy]
python_version = "3.10"
strict = true
ignore_missing_imports = true
# napalm itself is untyped, so every driver subclasses Any.
disallow_subclassing_any = false
[[tool.mypy.overrides]]
module = ["napalm.*", "requests.*", "defusedxml.*"]
ignore_missing_imports = true
[[tool.mypy.overrides]]
# Not yet under strict mypy (quality baseline); may only shrink.
module = ["napalm_amt.driver"]
ignore_errors = true
[tool.pytest.ini_options]
testpaths = ["tests"]
[tool.coverage.run]
source = ["napalm_amt"]
[tool.coverage.report]
fail_under = 95