napalm-device-types is the first repository to adopt the NAPALM driver standard
(https://git.netork.io/NAPALM/driver-standard, STANDARDS.md). It is the pilot: its
CI is the first run of the shared driver workflow.
Changes
Three commits, to keep the mechanical part apart:
style: ruff format and ruff check --fix with the standard's rule set
(E, F, I, UP, B at 100). 77 files, no behaviour change; two tests that read the
source text follow the new spelling (list[...]).
fix: the rest by hand. Long docstring/command lines wrapped; _NEGATION
constant in host_firewall (bandit B105 false positive); _known_hosts_file
takes the key instead of asserting it (B101); nosec B108 for a path on the device.
chore: .github/ -> .gitea/workflows/ci.yml calling the shared workflow;
quality baseline; coverage floor 95 %; CHANGELOG.md; links to git.netork.io;
SPDX license string (the table form fails setuptools from 2027-02-18).
No version bump: the release (4.22.0, first upload to PyPI) is a separate step.
## Summary
napalm-device-types is the first repository to adopt the NAPALM driver standard
(https://git.netork.io/NAPALM/driver-standard, STANDARDS.md). It is the pilot: its
CI is the first run of the shared driver workflow.
## Changes
Three commits, to keep the mechanical part apart:
- **style**: ruff format and ruff check --fix with the standard's rule set
(E, F, I, UP, B at 100). 77 files, no behaviour change; two tests that read the
source text follow the new spelling (`list[...]`).
- **fix**: the rest by hand. Long docstring/command lines wrapped; `_NEGATION`
constant in host_firewall (bandit B105 false positive); `_known_hosts_file`
takes the key instead of asserting it (B101); nosec B108 for a path on the device.
- **chore**: `.github/` -> `.gitea/workflows/ci.yml` calling the shared workflow;
quality baseline; coverage floor 95 %; CHANGELOG.md; links to git.netork.io;
SPDX license string (the table form fails setuptools from 2027-02-18).
No version bump: the release (4.22.0, first upload to PyPI) is a separate step.
## Related Issue
NetOrk/netork#734
## Testing
Locally: 785 tests, coverage 95.15 %, ruff, mypy --strict, bandit clean;
`napalm-standard check` and `ratchet` clean; build + `twine check --strict` pass.
Mechanical: ruff format, and ruff check --fix with the rule set every NAPALM
driver uses (E, F, I, UP, B at line length 100). typing.List/Dict/Optional
become builtin generics and X | None, imports are sorted, the coding cookies
are gone. Two tests that read the source text follow the new spelling.
What ruff cannot fix comes in the next commit.
- Long docstring and command lines are wrapped; recorded device output in
tests/ keeps its lines (E501 is off there).
- host_firewall: the negation token is the named constant _NEGATION. bandit
read token == "!" as a hardcoded password.
- ssh_host_keys: _known_hosts_file takes the expected key as an argument
instead of asserting it; both callers had already returned when it is None.
- ssh_server: the staged path is on the device, not a local temp file
(nosec B108).
- tests: raise ... from exc, zip(strict=True).
- CI moves to .gitea/workflows/ci.yml and calls the shared driver workflow
of NAPALM/driver-standard: conformance, ruff, strict mypy, tests on
3.10-3.13 and at the lowest declared versions, bandit, pip-audit, build,
and on a release tag the upload to PyPI.
- tests/quality_baseline.json records today's long and complex functions
and the one file over 1000 lines; they may shrink, not grow.
- Coverage floor 95 % (measured 95.15 %).
- CHANGELOG.md starts here; project links point at git.netork.io; the
license is the SPDX string PEP 639 wants.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
napalm-device-types is the first repository to adopt the NAPALM driver standard
(https://git.netork.io/NAPALM/driver-standard, STANDARDS.md). It is the pilot: its
CI is the first run of the shared driver workflow.
Changes
Three commits, to keep the mechanical part apart:
(E, F, I, UP, B at 100). 77 files, no behaviour change; two tests that read the
source text follow the new spelling (
list[...])._NEGATIONconstant in host_firewall (bandit B105 false positive);
_known_hosts_filetakes the key instead of asserting it (B101); nosec B108 for a path on the device.
.github/->.gitea/workflows/ci.ymlcalling the shared workflow;quality baseline; coverage floor 95 %; CHANGELOG.md; links to git.netork.io;
SPDX license string (the table form fails setuptools from 2027-02-18).
No version bump: the release (4.22.0, first upload to PyPI) is a separate step.
Related Issue
NetOrk/netork#734
Testing
Locally: 785 tests, coverage 95.15 %, ruff, mypy --strict, bandit clean;
napalm-standard checkandratchetclean; build +twine check --strictpass.