chore: adopt the NAPALM driver standard #5

Merged
christianmanivong merged 4 commits from chore/driver-standard into main 2026-10-23 10:28:53 +00:00
4 Commits
Author SHA1 Message Date
Christian Manivong d56da13b4c 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 53s
driver / test (3.10) (pull_request) Successful in 55s
driver / test (3.11) (pull_request) Successful in 58s
driver / test (3.12) (pull_request) Successful in 52s
driver / test (3.13) (pull_request) Successful in 48s
driver / lowest (pull_request) Successful in 29s
driver / security (pull_request) Successful in 56s
driver / build (pull_request) Successful in 30s
CI / driver (pull_request) Successful in 6m46s
driver / publish (pull_request) Skipped
2026-10-23 10:29:08 +02:00
Christian Manivong 75869eae06 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 45s
driver / test (3.11) (pull_request) Successful in 47s
driver / test (3.12) (pull_request) Successful in 44s
driver / test (3.13) (pull_request) Successful in 41s
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
- CI moves to .gitea/workflows/ci.yml and calls the shared driver workflow
  of NAPALM/driver-standard; .github/ is gone.
- license = "Apache-2.0" and a LICENSE file: the package declared no
  license at all. README and CHANGELOG.md, py.typed, links to
  git.netork.io, a dev extra with floors; .venv/ and build output ignored.
- Floors on every dependency: napalm-device-types>=4.21.1 (had none),
  napalm>=4.0 (what napalm-device-types needs) and requests>=2.28.0.
  Without them the lowest CI job resolves napalm 0.10, which does not
  build; the tests pass at exactly these floors.
- mypy strict for the package; napalm_yealink.yealink is exempt for now
  (20 errors), recorded in the quality baseline with get_facts'
  complexity. Coverage floor 42 % (measured 42.61 %).

Closes #4
2026-10-23 08:46:20 +02:00
Christian Manivong 946dff5d08 fix: what bandit and the remaining lint rules found
- The MD5 of the password is what the phone's login API expects, the wire
  format and no protection of ours (the session runs over HTTPS):
  hashlib.md5(..., usedforsecurity=False) (B324). The digest is the same.
- A failed logout in close() and an unreadable system info in get_facts()
  now log at debug level (B110), so a swallowed failure leaves a trace; the
  module gets its logger.
- The comment on the "yealink" fingerprint rule moves above it (ruff
  format had split the line around it) and is in English.
2026-10-23 08:42:31 +02:00
Christian Manivong 4a4f9378c5 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:42:02 +02:00