chore: adopt the NAPALM driver standard
driver / standard (pull_request) Successful in 14s
driver / lint (pull_request) Successful in 11s
driver / types (pull_request) Successful in 45s
driver / test (3.10) (pull_request) Successful in 44s
driver / test (3.11) (pull_request) Successful in 44s
driver / test (3.12) (pull_request) Successful in 43s
driver / test (3.13) (pull_request) Successful in 37s
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 5m30s
driver / publish (pull_request) Skipped
driver / standard (pull_request) Successful in 14s
driver / lint (pull_request) Successful in 11s
driver / types (pull_request) Successful in 45s
driver / test (3.10) (pull_request) Successful in 44s
driver / test (3.11) (pull_request) Successful in 44s
driver / test (3.12) (pull_request) Successful in 43s
driver / test (3.13) (pull_request) Successful in 37s
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 5m30s
driver / publish (pull_request) Skipped
- CI moves to .gitea/workflows/ci.yml and calls the shared driver workflow of NAPALM/driver-standard; .github/ goes. - requires-python >=3.10 (napalm-device-types needs it), CHANGELOG, py.typed, SPDX license string, Issues and Changelog links; a dev extra with floors. - napalm-device-types >=4.21.1 is declared: officeconnect.py imports SwitchDriver and FingerprintRule from it, but the package did not list it. - urllib3 gets a true floor (>=1.23): unbounded, the lowest job installed a version that does not import on Python 3.10. - mypy strict for the package; napalm_hpe_officeconnect.officeconnect is exempt for now (4 errors: three ClassVar fingerprint attributes the base declares as instance variables, one bare dict), recorded in the quality baseline. Coverage floor 91 % (measured 91.83 %).
This commit is contained in:
1 parent
06a39b49b3
commit
ed928c22b0
7 files changed
+90
-59
No files matched your search
+39
-11
@@ -1,5 +1,5 @@
|
||||
[build-system]
|
||||
requires = ["setuptools>=64", "wheel"]
|
||||
requires = ["setuptools>=77"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
@@ -7,20 +7,18 @@ name = "napalm-hpe-officeconnect"
|
||||
version = "0.1.0"
|
||||
description = "NAPALM driver for HPE OfficeConnect 1820 / 1920S web-managed switches (HTTP only, no CLI)"
|
||||
readme = "README.md"
|
||||
license = { text = "Apache-2.0" }
|
||||
requires-python = ">=3.8"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.10"
|
||||
authors = [
|
||||
{ name = "Christian Manivong" },
|
||||
]
|
||||
classifiers = [
|
||||
"Topic :: Utilities",
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
"Programming Language :: Python :: 3.13",
|
||||
"Operating System :: POSIX :: Linux",
|
||||
"Operating System :: MacOS",
|
||||
]
|
||||
@@ -29,16 +27,17 @@ classifiers = [
|
||||
# which parse with ast.literal_eval — see parsers.extract_data_set.
|
||||
dependencies = [
|
||||
"napalm>=4.0.0",
|
||||
"napalm-device-types>=4.21.1",
|
||||
"requests>=2.25.0",
|
||||
"urllib3",
|
||||
"urllib3>=1.23",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
dev = [
|
||||
"pytest",
|
||||
"pytest-cov",
|
||||
"black",
|
||||
"ruff",
|
||||
"pytest>=8",
|
||||
"pytest-cov>=5",
|
||||
"mypy>=1.11",
|
||||
"ruff>=0.6",
|
||||
]
|
||||
|
||||
[project.entry-points."napalm.drivers"]
|
||||
@@ -46,11 +45,16 @@ hpe_officeconnect = "napalm_hpe_officeconnect:OfficeConnectDriver"
|
||||
|
||||
[project.urls]
|
||||
Repository = "https://git.netork.io/NAPALM/napalm-hpe-officeconnect"
|
||||
Issues = "https://git.netork.io/NAPALM/napalm-hpe-officeconnect/issues"
|
||||
Changelog = "https://git.netork.io/NAPALM/napalm-hpe-officeconnect/src/branch/main/CHANGELOG.md"
|
||||
|
||||
[tool.setuptools.packages.find]
|
||||
where = ["."]
|
||||
include = ["napalm_hpe_officeconnect*"]
|
||||
|
||||
[tool.setuptools.package-data]
|
||||
napalm_hpe_officeconnect = ["py.typed"]
|
||||
|
||||
[tool.ruff]
|
||||
line-length = 100
|
||||
target-version = "py310"
|
||||
@@ -61,3 +65,27 @@ select = ["E", "F", "I", "UP", "B"]
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
# Recorded device output keeps its lines.
|
||||
"tests/**" = ["E501"]
|
||||
|
||||
[tool.mypy]
|
||||
python_version = "3.10"
|
||||
strict = true
|
||||
# napalm itself is untyped, so every driver subclasses Any.
|
||||
disallow_subclassing_any = false
|
||||
|
||||
[[tool.mypy.overrides]]
|
||||
module = ["napalm.*"]
|
||||
ignore_missing_imports = true
|
||||
|
||||
[[tool.mypy.overrides]]
|
||||
# Not yet under strict mypy (quality baseline); may only shrink.
|
||||
module = ["napalm_hpe_officeconnect.officeconnect"]
|
||||
ignore_errors = true
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
testpaths = ["tests"]
|
||||
|
||||
[tool.coverage.run]
|
||||
source = ["napalm_hpe_officeconnect"]
|
||||
|
||||
[tool.coverage.report]
|
||||
fail_under = 91
|
||||
Reference in new issue
Block a user