style: ruff format and ruff check --fix with the standard's rule set (E, F, I, UP, B, line length 100, Python 3.10). Mechanical.
fix: long lines wrapped (the get_environment awk command split into adjacent literals, unchanged on the wire); the two except Exception: pass (snmpd community in get_snmp_config, network VLANs in get_ssids) now log at debug level (bandit B110); tests: raise ... from exc, unused loop variable.
chore: CI moves to .gitea/workflows/ci.yml (shared driver workflow), .github/ removed; requires-python >=3.10, napalm-device-types>=4.21.1, SPDX license, LICENSE, py.typed, dev extra, git.netork.io links, CHANGELOG.md; strict mypy with nine modules exempt for now (130 errors), quality baseline, coverage floor 65 %.
## Summary
napalm-openwrt adopts the NAPALM driver standard (https://git.netork.io/NAPALM/driver-standard).
Epic: NAPALM/driver-standard#2.
## Changes
- **style**: ruff format and `ruff check --fix` with the standard's rule set (E, F, I, UP, B, line length 100, Python 3.10). Mechanical.
- **fix**: long lines wrapped (the `get_environment` awk command split into adjacent literals, unchanged on the wire); the two `except Exception: pass` (snmpd community in `get_snmp_config`, network VLANs in `get_ssids`) now log at debug level (bandit B110); tests: `raise ... from exc`, unused loop variable.
- **chore**: CI moves to `.gitea/workflows/ci.yml` (shared driver workflow), `.github/` removed; `requires-python >=3.10`, `napalm-device-types>=4.21.1`, SPDX license, LICENSE, `py.typed`, dev extra, git.netork.io links, CHANGELOG.md; strict mypy with nine modules exempt for now (130 errors), quality baseline, coverage floor 65 %.
## Related Issue
Closes #20
## Testing
Locally: 194 tests, coverage 65.03 %, ruff, mypy, bandit clean; `napalm-standard check` and `ratchet` clean; build + `twine check --strict` pass. Fixtures only.
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.
- 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.
- 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 %).
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.
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-openwrt adopts the NAPALM driver standard (https://git.netork.io/NAPALM/driver-standard).
Epic: NAPALM/driver-standard#2.
Changes
ruff check --fixwith the standard's rule set (E, F, I, UP, B, line length 100, Python 3.10). Mechanical.get_environmentawk command split into adjacent literals, unchanged on the wire); the twoexcept Exception: pass(snmpd community inget_snmp_config, network VLANs inget_ssids) now log at debug level (bandit B110); tests:raise ... from exc, unused loop variable..gitea/workflows/ci.yml(shared driver workflow),.github/removed;requires-python >=3.10,napalm-device-types>=4.21.1, SPDX license, LICENSE,py.typed, dev extra, git.netork.io links, CHANGELOG.md; strict mypy with nine modules exempt for now (130 errors), quality baseline, coverage floor 65 %.Related Issue
Closes #20
Testing
Locally: 194 tests, coverage 65.03 %, ruff, mypy, bandit clean;
napalm-standard checkandratchetclean; build +twine check --strictpass. Fixtures only.