stack: Typ project und Collection kb/gtd/ (#123)
CI / verify (push) Successful in 45s
Release / release (push) Successful in 36s

Files changed:
- CHANGES.md
- README.md
- VERSION
- kb/CONTRACT.md
- kb/CONVENTIONS.md
- kb/entities/COLLECTION.md
- kb/gtd/COLLECTION.md
- kb/gtd/INDEX.md
- kb/index.md
- tools/CONTRACT.md
- tools/chemenu/kb_collections.py
- tools/chemenu/tests/test_conventions.py
- tools/chemenu/tests/test_docs_verify.py
- tools/chemenu/tests/test_kb_collections.py
- tools/chemenu/tests/test_new_page.py
- tools/chemenu/tests/test_type_resolver.py
- tools/chemenu/tests/test_types_cmd.py
- types/project.md
- types/project.schema.yaml
- types/type-spec.md
This commit is contained in:
torben committed 2026-09-19 21:13:24 +02:00
1 parent 3c9d669729
commit ee24b6e5b8
20 files changed
+507 -38

No files matched your search

+8 -4
View File
@@ -41,10 +41,11 @@ def kb_root(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> Path:
kb.mkdir()
monkeypatch.setattr(config, "ROOT", tmp_path)
monkeypatch.setattr(config, "KB_DIR", kb)
# Which collection the stack requires is *derived* from where the required
# `source` type writes, so these tests need the shipped `types/` reachable -
# a fixture tree without one derives an empty requirement and would assert
# against a rule that is not running. See conftest.use_shipped_type_specs.
# Which collections the stack requires are *derived* from where each
# required type (`source`, `project`) writes, so these tests need the
# shipped `types/` reachable - a fixture tree without one derives an empty
# requirement and would assert against a rule that is not running. See
# conftest.use_shipped_type_specs.
use_shipped_type_specs(monkeypatch)
conventions.reset_cache()
yield kb
@@ -153,6 +154,7 @@ def test_a_missing_stack_required_collection_is_reported(kb_root):
def test_a_correct_declaration_reports_nothing(kb_root):
_collection(kb_root, "sources", profile="sources", required=True)
_collection(kb_root, "gtd", profile="none", required=True)
_collection(kb_root, "entities", profile="entities")
assert kb_collections.declaration_issues(kb_root) == []
@@ -210,6 +212,7 @@ def test_outbound_on_a_collection_that_cannot_carry_labels_is_a_finding(kb_root)
def test_outbound_is_fine_on_a_collection_whose_type_offers_related(kb_root):
_collection(kb_root, "sources", profile="sources", required=True)
_collection(kb_root, "gtd", profile="none", required=True)
_authorising(kb_root, "entities", " any: [uses]")
assert kb_collections.declaration_issues(kb_root) == []
@@ -217,4 +220,5 @@ def test_outbound_is_fine_on_a_collection_whose_type_offers_related(kb_root):
def test_a_collection_without_outbound_is_not_a_finding(kb_root):
"""Absence is the declaration `kb/sources/` makes: no authored edges here."""
_collection(kb_root, "sources", profile="sources", required=True)
_collection(kb_root, "gtd", profile="none", required=True)
assert kb_collections.declaration_issues(kb_root) == []