chore: adopt the NAPALM driver standard #15

Merged
christianmanivong merged 5 commits from chore/driver-standard into main 2026-10-23 10:03:35 +00:00
5 Commits
Author SHA1 Message Date
Christian Manivong d79391238f chore(release): 0.6.0
driver / standard (pull_request) Successful in 14s
driver / lint (pull_request) Successful in 13s
driver / types (pull_request) Successful in 45s
driver / test (3.10) (pull_request) Successful in 47s
driver / test (3.11) (pull_request) Successful in 45s
driver / test (3.12) (pull_request) Successful in 44s
driver / test (3.13) (pull_request) Successful in 37s
driver / lowest (pull_request) Successful in 22s
driver / security (pull_request) Successful in 46s
driver / build (pull_request) Successful in 22s
CI / driver (pull_request) Successful in 5m35s
driver / publish (pull_request) Skipped
2026-10-23 10:29:06 +02:00
Christian Manivong 0de16e0b79 fix(deps): a floor on netaddr the lowest CI job can use
driver / standard (pull_request) Successful in 13s
driver / lint (pull_request) Successful in 12s
driver / types (pull_request) Successful in 42s
driver / test (3.10) (pull_request) Successful in 46s
driver / test (3.11) (pull_request) Successful in 46s
driver / test (3.12) (pull_request) Successful in 44s
driver / test (3.13) (pull_request) Successful in 38s
driver / lowest (pull_request) Successful in 23s
driver / security (pull_request) Successful in 45s
driver / build (pull_request) Successful in 22s
CI / driver (pull_request) Successful in 5m31s
driver / publish (pull_request) Skipped
Without one, uv's lowest-direct resolution installs netaddr 0.3.1, which
has no IPAddress, and every test module fails to import. 0.7.19 has
IPAddress, IPNetwork and AddrFormatError, and the tests pass at exactly
the declared floors on Python 3.10.
2026-10-23 08:46:45 +02:00
Christian Manivong 10a3b1efbf chore: adopt the NAPALM driver standard
driver / standard (pull_request) Successful in 13s
driver / lint (pull_request) Successful in 11s
driver / types (pull_request) Successful in 44s
driver / test (3.10) (pull_request) Successful in 47s
driver / test (3.11) (pull_request) Successful in 44s
driver / test (3.12) (pull_request) Successful in 44s
driver / test (3.13) (pull_request) Successful in 39s
driver / lowest (pull_request) Failing after 21s
driver / security (pull_request) Successful in 47s
driver / build (pull_request) Successful in 22s
CI / driver (pull_request) Failing after 5m32s
driver / publish (pull_request) Skipped
- The distribution is renamed to napalm-netgear-switches: napalm-netgear
  on PyPI belongs to another project. The import package napalm_netgear
  and the napalm.drivers entry points netgear_smart and netgear_plus stay;
  [tool.napalm-standard] package names the import package for the check.
  README install line and CHANGELOG say the new name.
- 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), floor
  napalm-device-types>=4.21.1, LICENSE file, py.typed, SPDX license string,
  links to git.netork.io, a dev extra with floors, CHANGELOG.md.
- mypy strict for the package; napalm_netgear.netgear_plus and
  napalm_netgear.netgear_smart are exempt for now (139 errors), recorded
  in the quality baseline with their long and complex functions and the
  2070-line netgear_smart module. Coverage floor 48 % (measured 48.23 %).

Closes #14
2026-10-23 08:36:28 +02:00
Christian Manivong 672bc04261 fix: what bandit and the remaining lint rules found
- Netgear Plus: a failed logout on close() now logs at debug level (B110),
  so a swallowed failure leaves a trace; the module gets its logger.
- nosec for the firmware CDN probe (B310): the URL is built on the fixed
  https base _FW_CDN_BASE, model and version only fill its path, so no
  file:// or custom scheme can reach urlopen.
- nosec for the empty password in get_users (B105): it is NAPALM's field,
  the CLI never shows a password; a false positive.
- The v7 LLDP table in a docstring loses one leading space per line to fit
  line length 100.
- tests: a second TestGetLldpNeighbors class shadowed the first, whose two
  tests never ran; the v7 one is now TestGetLldpNeighborsV7 and both run
  (and pass). raise ... from exc in the netmiko stand-in.
2026-10-23 08:34:17 +02:00
Christian Manivong fa10d6617b 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:32:43 +02:00