fix: drop PyYAML dep so verify job pytest passes
CI & Release / Verify documentation (push) Skipped
CI & Release / Verify simulator (push) Skipped
CI & Release / Trivy scan (push) Skipped
CI & Release / Semantic Release (push) Skipped
CI & Release / Verify documentation (pull_request) Successful in 4s
CI & Release / Verify simulator (pull_request) Successful in 11s
CI & Release / Trivy scan (pull_request) Successful in 8s
CI & Release / Semantic Release (pull_request) Skipped

Store doc rules in bin/docs_rules.json (stdlib json). test_check_docs no
longer fails in the simulator job that only installs simulator/requirements.txt.
This commit is contained in:
2026-07-10 11:02:55 +01:00
parent df04736336
commit 826cef0c3e
7 changed files with 61 additions and 72 deletions
+13 -9
View File
@@ -2,6 +2,7 @@
from __future__ import annotations
import json
import sys
from pathlib import Path
@@ -59,15 +60,18 @@ def test_broken_link_detected(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -
(docs / "bad.md").write_text("See [missing](missing.md).\n")
rules = tmp_path / "bin"
rules.mkdir()
(rules / "docs_rules.yaml").write_text(
"markdown_paths:\n - docs/**/*.md\n"
"glossary:\n file: docs/00-glossary.md\n"
"banned_link_targets: []\n"
"glossary_section_anchors: []\n"
"preferred_term_anchors: []\n"
"readability:\n forbid_bare_see_refs: false\n"
(rules / "docs_rules.json").write_text(
json.dumps(
{
"markdown_paths": ["docs/**/*.md"],
"glossary": {"file": "docs/00-glossary.md"},
"banned_link_targets": [],
"glossary_section_anchors": [],
"preferred_term_anchors": [],
"readability": {"forbid_bare_see_refs": False},
}
)
)
checker = SCRIPTS / "check_docs.py"
monkeypatch.setattr("check_docs.ROOT", tmp_path)
monkeypatch.setattr("check_docs.RULES_PATH", rules / "docs_rules.yaml")
monkeypatch.setattr("check_docs.RULES_PATH", rules / "docs_rules.json")
assert run_checks() == 1