style: ruff format (24 files) and ruff check --fix with the standard's rule set (E, F, I, UP, B, line length 100); Mapping/Iterable from collections.abc, sorted imports. Mechanical.
fix: a failed IPMI logout on close is logged at debug level instead of passed over (B110). The pyghmi imports are the driver's protocol, the documented fallback for BMCs without Redfish (nosec B415 ×3). The empty password in get_users is NAPALM's field; Redfish never returns one (nosec B105).
chore: CI in .gitea/workflows/ci.yml calling the shared workflow (the repo had none); setuptools>=77, SPDX license string, py.typed, Repository/Issues/Changelog links, 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). test extra replaced by the standard dev extra plus responses; pythonpath = ["."] so tests.conftest imports under a bare pytest too. Strict mypy with 8 modules exempt (50 errors, mostly getters returning dicts where the role declares TypedDicts): napalm_redfish.bmc, .driver, .ipmi, .transport, .parsers.common, .parsers.environment, .parsers.manager, .parsers.system. Coverage floor 94 %; tests/quality_baseline.json (seven functions over complexity 10).
Locally: 247 tests, coverage 94.27 %, ruff, mypy, bandit clean; napalm-standard check and ratchet clean; build + twine check --strict pass. The tests also pass at the lowest declared versions on Python 3.10 (fixtures and DMTF mockups only).
## Summary
napalm-redfish adopts the NAPALM driver standard (https://git.netork.io/NAPALM/driver-standard).
Epic: NAPALM/driver-standard#2.
## Changes
- **style**: `ruff format` (24 files) and `ruff check --fix` with the standard's rule set (E, F, I, UP, B, line length 100); `Mapping`/`Iterable` from `collections.abc`, sorted imports. Mechanical.
- **fix**: a failed IPMI logout on close is logged at debug level instead of passed over (B110). The pyghmi imports are the driver's protocol, the documented fallback for BMCs without Redfish (nosec B415 ×3). The empty `password` in `get_users` is NAPALM's field; Redfish never returns one (nosec B105).
- **chore**: CI in `.gitea/workflows/ci.yml` calling the shared workflow (the repo had none); setuptools>=77, SPDX license string, `py.typed`, Repository/Issues/Changelog links, `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). `test` extra replaced by the standard `dev` extra plus `responses`; `pythonpath = ["."]` so `tests.conftest` imports under a bare `pytest` too. Strict mypy with 8 modules exempt (50 errors, mostly getters returning dicts where the role declares TypedDicts): `napalm_redfish.bmc`, `.driver`, `.ipmi`, `.transport`, `.parsers.common`, `.parsers.environment`, `.parsers.manager`, `.parsers.system`. Coverage floor 94 %; `tests/quality_baseline.json` (seven functions over complexity 10).
## Related Issue
Closes #2
## Testing
Locally: 247 tests, coverage 94.27 %, ruff, mypy, bandit clean; `napalm-standard check` and `ratchet` clean; build + `twine check --strict` pass. The tests also pass at the lowest declared versions on Python 3.10 (fixtures and DMTF mockups 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). Mapping and
Iterable come from collections.abc, imports are sorted. What ruff cannot
fix comes in the next commit.
- 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).
- 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.
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-redfish adopts the NAPALM driver standard (https://git.netork.io/NAPALM/driver-standard).
Epic: NAPALM/driver-standard#2.
Changes
ruff format(24 files) andruff check --fixwith the standard's rule set (E, F, I, UP, B, line length 100);Mapping/Iterablefromcollections.abc, sorted imports. Mechanical.passwordinget_usersis NAPALM's field; Redfish never returns one (nosec B105)..gitea/workflows/ci.ymlcalling the shared workflow (the repo had none); setuptools>=77, SPDX license string,py.typed, Repository/Issues/Changelog links,napalm-device-types>=4.21.1from PyPI. True floors found by running the tests at them:redfish>=3.4.1(older releases return no response withmax_retry=0) andpyghmi>=1.5.1(1.5.0 imports python-dateutil without declaring it).testextra replaced by the standarddevextra plusresponses;pythonpath = ["."]sotests.conftestimports under a barepytesttoo. Strict mypy with 8 modules exempt (50 errors, mostly getters returning dicts where the role declares TypedDicts):napalm_redfish.bmc,.driver,.ipmi,.transport,.parsers.common,.parsers.environment,.parsers.manager,.parsers.system. Coverage floor 94 %;tests/quality_baseline.json(seven functions over complexity 10).Related Issue
Closes #2
Testing
Locally: 247 tests, coverage 94.27 %, ruff, mypy, bandit clean;
napalm-standard checkandratchetclean; build +twine check --strictpass. The tests also pass at the lowest declared versions on Python 3.10 (fixtures and DMTF mockups only).