chore: adopt the NAPALM driver standard #3

Merged
christianmanivong merged 4 commits from chore/driver-standard into main 2026-10-23 09:36:20 +00:00
4 Commits
Author SHA1 Message Date
Christian Manivong b08ae66318 chore(release): 0.6.0
driver / standard (pull_request) Successful in 13s
driver / lint (pull_request) Successful in 11s
driver / types (pull_request) Successful in 46s
driver / test (3.10) (pull_request) Successful in 51s
driver / test (3.11) (pull_request) Successful in 50s
driver / test (3.12) (pull_request) Successful in 50s
driver / test (3.13) (pull_request) Successful in 45s
driver / lowest (pull_request) Successful in 24s
driver / security (pull_request) Successful in 49s
driver / build (pull_request) Successful in 22s
CI / driver (pull_request) Successful in 6m1s
driver / publish (pull_request) Skipped
2026-10-23 10:29:00 +02:00
Christian Manivong 8dac2e67dd 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 46s
driver / test (3.10) (pull_request) Successful in 51s
driver / test (3.11) (pull_request) Successful in 55s
driver / test (3.12) (pull_request) Successful in 49s
driver / test (3.13) (pull_request) Successful in 43s
driver / lowest (pull_request) Successful in 26s
driver / security (pull_request) Successful in 49s
driver / build (pull_request) Successful in 22s
CI / driver (pull_request) Successful in 6m5s
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; py.typed; Repository, Issues and Changelog links on
  git.netork.io; napalm-device-types>=4.21.1 from PyPI.
- True floors, found by running the tests at them: redfish>=3.4.1 (older
  releases return no response with max_retry=0) and pyghmi>=1.5.1 (1.5.0
  imports python-dateutil without declaring it).
- The test extra becomes the dev extra of the standard, plus responses,
  which the tests mock the BMC with. pytest puts the repo root on the
  path, so tests.conftest also imports under a bare pytest.
- mypy strict; exempt for now (50 errors, most of them getters returning
  dicts where the role declares TypedDicts): napalm_redfish.bmc, .driver,
  .ipmi, .transport and parsers.common, .environment, .manager, .system.
  They are recorded in tests/quality_baseline.json with seven functions
  over complexity 10.
- Coverage floor 94 % (measured 94.27 %).
- The README's development steps install from PyPI.
2026-10-23 08:46:19 +02:00
Christian Manivong 01b2a2ae58 fix: what bandit and the remaining lint rules found
- ipmi: a failed logout on close is logged at debug level instead of
  passed over (B110); the session still times out on the BMC.
- ipmi: the pyghmi imports are this driver's protocol, the fallback for
  BMCs without Redfish, documented as insecure in the module and in
  docs/security.md (nosec B415).
- parsers.accounts: the empty password is NAPALM's get_users field;
  Redfish never returns one (nosec B105).
2026-10-23 08:40:23 +02:00
Christian Manivong 09029ca0a4 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). Mapping and
Iterable come from collections.abc, imports are sorted. What ruff cannot
fix comes in the next commit.
2026-10-23 08:39:45 +02:00