chore: adopt the NAPALM driver standard #21

Merged
christianmanivong merged 5 commits from chore/driver-standard into main 2026-10-23 11:52:52 +00:00
5 Commits
Author SHA1 Message Date
Christian Manivong d576357f9c chore(release): 0.7.0
driver / standard (pull_request) Successful in 14s
driver / lint (pull_request) Successful in 10s
driver / types (pull_request) Successful in 43s
driver / test (3.10) (pull_request) Successful in 45s
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 38s
driver / lowest (pull_request) Successful in 21s
driver / security (pull_request) Successful in 53s
driver / build (pull_request) Successful in 21s
CI / driver (pull_request) Successful in 5m35s
driver / publish (pull_request) Skipped
2026-10-23 11:37:05 +02:00
Christian Manivong 51bcfc5724 fix(deps): a floor on netaddr the lowest versions can import
driver / standard (pull_request) Successful in 14s
driver / lint (pull_request) Successful in 11s
driver / types (pull_request) Successful in 43s
driver / test (3.10) (pull_request) Successful in 58s
driver / test (3.11) (pull_request) Successful in 56s
driver / test (3.12) (pull_request) Successful in 59s
driver / test (3.13) (pull_request) Successful in 48s
driver / lowest (pull_request) Successful in 32s
driver / security (pull_request) Successful in 1m1s
driver / build (pull_request) Successful in 32s
CI / driver (pull_request) Successful in 6m55s
driver / publish (pull_request) Skipped
Unfloored, the CI lowest job installs netaddr 0.3.1, which has no
IPAddress, and every test module fails to import. 0.7.19 has it; 194 tests
pass at the lowest declared versions.
2026-10-23 09:05:22 +02:00
Christian Manivong 6d884898c7 chore: adopt the NAPALM driver standard
driver / standard (pull_request) Successful in 18s
driver / lint (pull_request) Successful in 19s
driver / types (pull_request) Successful in 1m0s
driver / test (3.10) (pull_request) Successful in 1m9s
driver / test (3.11) (pull_request) Successful in 59s
driver / test (3.12) (pull_request) Successful in 46s
driver / test (3.13) (pull_request) Successful in 55s
driver / lowest (pull_request) Failing after 25s
driver / security (pull_request) Successful in 1m0s
driver / build (pull_request) Successful in 26s
CI / driver (pull_request) Failing after 7m18s
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), napalm-device-types
  >=4.21.1, LICENSE file, py.typed, SPDX license string, a dev extra with
  floors, links to git.netork.io (README included), CHANGELOG.md.
- mypy strict for the package; exempt for now, with 130 errors between
  them: napalm_openwrt.config_mixin, .interfaces_mixin, .lldp_mixin,
  .openwrt, .packages_mixin, .routing_mixin, .system_mixin, .vlan_mixin and
  .wireless_mixin. They are recorded in the quality baseline with the long
  and complex functions and the one unannotated public method.
- Coverage floor 65 % (measured 65.03 %).
2026-10-23 08:35:03 +02:00
Christian Manivong 8b8905f0c7 fix: what bandit and the remaining lint rules found
- Long lines are wrapped: the get_environment awk command is split into
  adjacent string literals, the rollback message and the system mixin's
  docstring are wrapped; the command and the text are unchanged.
- The two except Exception: pass (the snmpd community in get_snmp_config,
  the network VLANs in get_ssids) now log at debug level (B110), so a
  swallowed failure leaves a trace.
- tests: raise ... from exc, unused loop variable.
2026-10-23 08:33:29 +02:00
Christian Manivong a212bc8715 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:47 +02:00