driver / standard (pull_request) Successful in 15s
driver / lint (pull_request) Successful in 12s
driver / types (pull_request) Successful in 1m38s
driver / test (3.10) (pull_request) Successful in 1m1s
driver / test (3.11) (pull_request) Successful in 52s
driver / test (3.12) (pull_request) Successful in 49s
driver / test (3.13) (pull_request) Successful in 45s
driver / lowest (pull_request) Successful in 29s
driver / security (pull_request) Successful in 47s
driver / build (pull_request) Successful in 22s
CI / driver (pull_request) Successful in 7m11s
driver / publish (pull_request) Skipped
- CI moves to .gitea/workflows/ci.yml and calls the shared driver workflow of NAPALM/driver-standard; .github/ is gone. - setuptools>=77 with the SPDX license string, no License classifier, Python 3.10-3.13 classifiers, napalm-device-types>=4.21.1, a dev extra with floors, links to git.netork.io, LICENSE file, py.typed. - CHANGELOG.md in Keep-a-Changelog form; README names Python 3.10, the Gitea clone URL and the new CI. - mypy strict for the package; exempt for now (52 errors): ha, listening, opnsense, ospf_mixin, ping_mixin, port_forwards, resolver_mixin. Recorded in the quality baseline with the long and complex functions, the 3100-line opnsense.py and one unannotated public method. - Coverage floor 79 % (measured 79.20 %).
97 lines
2.3 KiB
TOML
97 lines
2.3 KiB
TOML
[build-system]
|
|
requires = ["setuptools>=77"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "napalm-opnsense"
|
|
version = "0.4.0"
|
|
description = "NAPALM driver for OPNsense (read-only via REST API)."
|
|
readme = "README.md"
|
|
license = "Apache-2.0"
|
|
requires-python = ">=3.10"
|
|
authors = [
|
|
{ name = "Christian Manivong" },
|
|
]
|
|
classifiers = [
|
|
"Topic :: Utilities",
|
|
"Programming Language :: Python :: 3",
|
|
"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",
|
|
"Typing :: Typed",
|
|
]
|
|
dependencies = [
|
|
"napalm>=4.0.0",
|
|
"napalm-device-types>=4.21.1",
|
|
"requests>=2.28.0",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = [
|
|
"pytest>=8",
|
|
"pytest-cov>=5",
|
|
"mypy>=1.11",
|
|
"ruff>=0.6",
|
|
]
|
|
|
|
[project.entry-points."napalm.drivers"]
|
|
opnsense = "napalm_opnsense.opnsense:OPNsenseDriver"
|
|
|
|
[project.urls]
|
|
Repository = "https://git.netork.io/NAPALM/napalm-opnsense"
|
|
Issues = "https://git.netork.io/NAPALM/napalm-opnsense/issues"
|
|
Changelog = "https://git.netork.io/NAPALM/napalm-opnsense/src/branch/main/CHANGELOG.md"
|
|
|
|
[tool.setuptools.packages.find]
|
|
where = ["."]
|
|
include = ["napalm_opnsense*"]
|
|
|
|
[tool.setuptools.package-data]
|
|
napalm_opnsense = ["py.typed"]
|
|
|
|
[tool.ruff]
|
|
line-length = 100
|
|
target-version = "py310"
|
|
|
|
[tool.ruff.lint]
|
|
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.*", "requests.*"]
|
|
ignore_missing_imports = true
|
|
|
|
[[tool.mypy.overrides]]
|
|
# Not yet under strict mypy (quality baseline); may only shrink.
|
|
module = [
|
|
"napalm_opnsense.ha",
|
|
"napalm_opnsense.listening",
|
|
"napalm_opnsense.opnsense",
|
|
"napalm_opnsense.ospf_mixin",
|
|
"napalm_opnsense.ping_mixin",
|
|
"napalm_opnsense.port_forwards",
|
|
"napalm_opnsense.resolver_mixin",
|
|
]
|
|
ignore_errors = true
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
|
|
[tool.coverage.run]
|
|
source = ["napalm_opnsense"]
|
|
|
|
[tool.coverage.report]
|
|
fail_under = 79
|