* docs: verify and complete project documentation (#31) Align the docs with the shipped V1 implementation (MASTER_SPEC §7.6, Phase 7). - README: fix the Category Splitter output (it emits a Category Map; the per-category strings are produced by the Prompt Builder). - docs/nodes.md: developer node reference with the exact inputs, outputs, and inter-stage data types for all eight nodes. - CONTRIBUTING.md: link the Knowledge Base contribution guide and validation command, the golden-regeneration note, and the node/benchmark references. - tests/test_docs_consistency.py: guards that README and docs/nodes.md mention every registered node and cover the inter-stage types, and that CONTRIBUTING links the Knowledge Base guide -- so docs cannot drift from the code. The wiki ComfyUI-Nodes page is updated to match (Category Splitter emits a Category Map) in the wiki repository. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * chore: retrigger CI (runner backlog) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: kunail0804 <kunail0804@gmail.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
47 lines
1.3 KiB
Python
47 lines
1.3 KiB
Python
"""Guards that the docs describe the actual shipped nodes (issue #31).
|
|
|
|
Catches stale or missing node references so documentation cannot drift from the
|
|
registered ComfyUI nodes.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from pathlib import Path
|
|
|
|
import pytest
|
|
|
|
import nodes
|
|
|
|
REPO_ROOT = Path(__file__).resolve().parent.parent
|
|
NODE_DISPLAY_NAMES = sorted(nodes.NODE_DISPLAY_NAME_MAPPINGS.values())
|
|
|
|
DOCS_LISTING_NODES = [
|
|
REPO_ROOT / "README.md",
|
|
REPO_ROOT / "docs" / "nodes.md",
|
|
]
|
|
|
|
|
|
@pytest.mark.parametrize("doc", DOCS_LISTING_NODES, ids=lambda p: p.name)
|
|
def test_docs_mention_every_node(doc: Path) -> None:
|
|
text = doc.read_text(encoding="utf-8")
|
|
missing = [name for name in NODE_DISPLAY_NAMES if name not in text]
|
|
assert not missing, f"{doc.name} is missing node references: {missing}"
|
|
|
|
|
|
def test_node_reference_covers_inter_stage_types() -> None:
|
|
text = (REPO_ROOT / "docs" / "nodes.md").read_text(encoding="utf-8")
|
|
for type_name in (
|
|
"SCENE",
|
|
"RESOLVED_TAGS",
|
|
"CATEGORY_MAP",
|
|
"KNOWLEDGE_BASE",
|
|
"COMPILER_CONFIG",
|
|
):
|
|
assert type_name in text
|
|
|
|
|
|
def test_contributing_links_the_knowledge_base_guide() -> None:
|
|
text = (REPO_ROOT / "CONTRIBUTING.md").read_text(encoding="utf-8")
|
|
assert "knowledge_base/README.md" in text
|
|
assert "validate_knowledge_base.py" in text
|