feat: standards, shared CI and release tooling for NAPALM drivers
STANDARDS.md binds every repository in the NAPALM org: one default branch, Conventional Commits, the device-types contract, test-driven development, clean-code limits, a quality ratchet for existing code, packaging rules and releases by tag to PyPI. napalm-standard holds what a tool can check: the conformance check (with release rules on a tag), the quality ratchet (ported from netOrk's quality_ratchet.py), and the Gitea release from the CHANGELOG section. .gitea/workflows/driver.yml is the CI every driver calls; template/ is a new driver's starting point and passes the check as it is.
This commit is contained in:
commit
db6b2e4ea7
37 files changed
+2894
No files matched your search
@@ -0,0 +1,50 @@
|
||||
[build-system]
|
||||
requires = ["setuptools>=68"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "napalm-standard"
|
||||
version = "0.1.0"
|
||||
description = "Rules, CI and release tooling shared by the drivers of the NAPALM org"
|
||||
readme = "README.md"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.11"
|
||||
authors = [{ name = "Christian Manivong", email = "christian@manivong.de" }]
|
||||
dependencies = ["packaging>=23"]
|
||||
|
||||
[project.optional-dependencies]
|
||||
dev = ["pytest>=8", "pytest-cov>=5", "ruff>=0.6", "mypy>=1.11"]
|
||||
|
||||
[project.scripts]
|
||||
napalm-standard = "napalm_standard.cli:main"
|
||||
|
||||
[project.urls]
|
||||
Repository = "https://git.netork.io/NAPALM/driver-standard"
|
||||
Issues = "https://git.netork.io/NAPALM/driver-standard/issues"
|
||||
|
||||
[tool.setuptools.packages.find]
|
||||
include = ["napalm_standard*"]
|
||||
|
||||
[tool.setuptools.package-data]
|
||||
napalm_standard = ["py.typed"]
|
||||
|
||||
[tool.ruff]
|
||||
line-length = 100
|
||||
target-version = "py311"
|
||||
|
||||
[tool.ruff.lint]
|
||||
select = ["E", "F", "I", "UP", "B"]
|
||||
|
||||
[tool.mypy]
|
||||
python_version = "3.11"
|
||||
strict = true
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
testpaths = ["tests"]
|
||||
addopts = "--cov=napalm_standard --cov-report=term-missing"
|
||||
|
||||
[tool.coverage.report]
|
||||
fail_under = 95
|
||||
|
||||
[tool.coverage.run]
|
||||
omit = ["napalm_standard/__main__.py"]
|
||||
Reference in new issue
Block a user