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: open() raises ConnectionException ... from the SoCo error (B904); the swallowed exception in _check_wired_connection is logged at debug level (B110); nosec for the empty password default (B107, a Sonos speaker takes no login); tests raise AssertionError instead of assert False (B011).
chore: CI in .gitea/ calling the shared workflow, .github/ removed; napalm-device-types >=4.21.1 declared (the driver imports it, it was never a dependency); requires-python >=3.10; LICENSE, README, CHANGELOG, py.typed, SPDX license, setuptools>=77, dev extra floors, URLs on git.netork.io; strict mypy with napalm_sonos.sonos_driver exempt; coverage floor 71 %; quality baseline.
## Summary
napalm-sonos 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**: `open()` raises `ConnectionException ... from` the SoCo error (B904); the swallowed exception in `_check_wired_connection` is logged at debug level (B110); nosec for the empty password default (B107, a Sonos speaker takes no login); tests raise `AssertionError` instead of `assert False` (B011).
- **chore**: CI in .gitea/ calling the shared workflow, .github/ removed; napalm-device-types >=4.21.1 declared (the driver imports it, it was never a dependency); requires-python >=3.10; LICENSE, README, CHANGELOG, py.typed, SPDX license, setuptools>=77, dev extra floors, URLs on git.netork.io; strict mypy with napalm_sonos.sonos_driver exempt; coverage floor 71 %; quality baseline.
## Related Issue
Closes #5
## Testing
Locally: 24 tests, coverage 71.30 %, ruff, mypy, 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, Python 3.10). What ruff
cannot fix comes in the next commit.
- open() raises ConnectionException from the SoCo error (B904), so the
cause stays attached.
- _check_wired_connection: the except Exception: pass (B110) now logs at
debug level, so a swallowed failure leaves a trace. A module logger is
new.
- nosec for the empty password default (B107): a Sonos speaker takes no
login, the argument exists for NAPALM's constructor signature.
- tests: raise AssertionError instead of assert False (B011).
- CI moves to .gitea/workflows/ci.yml and calls the shared driver workflow
of NAPALM/driver-standard; .github/ is gone.
- napalm-device-types >=4.21.1 is now declared: the driver imports
MediaDriver, PortSpec and FingerprintRule from it, and CI used to
install it by hand.
- requires-python >=3.10 (napalm-device-types needs it), LICENSE, README,
CHANGELOG, py.typed, SPDX license string, setuptools>=77, version floors
on the dev extra, links to git.netork.io; .gitignore as in the template.
- mypy strict for the package; napalm_sonos.sonos_driver is exempt for now
(5 errors, two of them return types that differ from MediaDriver's),
recorded in the quality baseline.
- Coverage floor 71 % (measured 71.30 %).
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-sonos adopts the NAPALM driver standard (https://git.netork.io/NAPALM/driver-standard).
Epic: NAPALM/driver-standard#2.
Changes
open()raisesConnectionException ... fromthe SoCo error (B904); the swallowed exception in_check_wired_connectionis logged at debug level (B110); nosec for the empty password default (B107, a Sonos speaker takes no login); tests raiseAssertionErrorinstead ofassert False(B011).Related Issue
Closes #5
Testing
Locally: 24 tests, coverage 71.30 %, ruff, mypy, bandit clean;
napalm-standard checkandratchetclean; build +twine check --strictpass.