chore: adopt the NAPALM driver standard #9

Merged
christianmanivong merged 4 commits from chore/driver-standard into main 2026-10-23 09:57:17 +00:00
4 Commits
Author SHA1 Message Date
Christian Manivong 06c55fabbe chore(release): 0.5.0
driver / standard (pull_request) Successful in 14s
driver / lint (pull_request) Successful in 11s
driver / types (pull_request) Successful in 51s
driver / test (3.10) (pull_request) Successful in 50s
driver / test (3.11) (pull_request) Successful in 48s
driver / test (3.12) (pull_request) Successful in 44s
driver / test (3.13) (pull_request) Successful in 43s
driver / lowest (pull_request) Successful in 22s
driver / security (pull_request) Successful in 48s
driver / build (pull_request) Successful in 23s
CI / driver (pull_request) Successful in 5m55s
driver / publish (pull_request) Skipped
2026-10-23 10:29:05 +02:00
Christian Manivong 4e171bff30 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 %).
2026-10-23 08:48:12 +02:00
Christian Manivong bef2f23ab2 fix: what bandit and the remaining lint rules found
- set_interface: the except Exception: pass around reading the old
  untagged VLANs now logs at debug level (B110), with a module logger.
- nosec for the empty password field of get_users (B105, now a named
  constant); a false positive.
- Two docstrings quoting tabular device output keep their lines (noqa
  E501); a long docstring and an error message are shortened or split;
  the unused duplex column is named _duplex.
- tests: a get_facts test named SHOW_INTERFACE, which does not exist; it
  is SHOW_INTERFACE_STATUS. raise ... from exc.
2026-10-23 08:46:36 +02:00
Christian Manivong e53a4b4cc6 style: ruff format and the lint rules of the driver standard
Mechanical: ruff format, and ruff check --fix with the rule set every NAPALM
driver uses (E, F, I, UP, B at line length 100, Python 3.10). What ruff
cannot fix comes in the next commit.
2026-10-23 08:45:32 +02:00