chore: adopt the NAPALM driver standard #5

Merged
christianmanivong merged 4 commits from chore/driver-standard into main 2026-10-23 11:16:24 +00:00
4 Commits
Author SHA1 Message Date
Christian Manivong 40346456d0 chore(release): 0.2.0
driver / standard (pull_request) Successful in 13s
driver / lint (pull_request) Successful in 12s
driver / types (pull_request) Successful in 45s
driver / test (3.10) (pull_request) Successful in 44s
driver / test (3.11) (pull_request) Successful in 45s
driver / test (3.12) (pull_request) Successful in 43s
driver / test (3.13) (pull_request) Successful in 39s
driver / lowest (pull_request) Successful in 24s
driver / security (pull_request) Successful in 47s
driver / build (pull_request) Successful in 22s
CI / driver (pull_request) Successful in 5m35s
driver / publish (pull_request) Skipped
2026-10-23 11:37:04 +02:00
Christian Manivong d43d697700 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
- 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.
2026-10-23 08:49:27 +02:00
Christian Manivong 989e826b34 fix: what bandit and the remaining lint rules found
- get_route_to: "0.0.0.0" and "::" are the unspecified next hop of an
  on-link route as the host reports it, not an address anything binds to
  (nosec B104).
2026-10-23 08:47:56 +02:00
Christian Manivong 3b87a9ad77 style: ruff format and the lint rules of the driver standard
Mechanical: the rule set every NAPALM driver uses (E, F, I, UP, B at line
length 100, Python 3.10), with E501 off under tests/. The code was already
formatted and clean under it; what ruff cannot fix comes in the next commit.
2026-10-23 08:47:43 +02:00