KV/RIS-Erweiterung: 614 WKO-KV-Dokumente + 59 RIS-Gesetze (D9)
- Korpus 601 -> 1274 Layer-2-Eintraege: kv-kvt-001...614 (ein Cluster kollektivvertraege, Branche als Tag) und ris-<cluster-prefix>-nn auf der bestehenden Cluster-Map + 7 neue Cluster (zvr/avr/agg/lst/abo/ nso/kvt); LAW_MAP dokumentiert die 59 Gesetz-Zuordnungen. - kv/ris-Eintraege sind quellentreu generiert (D9) - Gesetze sind amtliche Werke, KV-Lohntabellen zahlenexakt; Tool-Output in tools/ (ingest_sources.py, build_registry.py, kb_common.py), eingefrorene ID-Kataloge tools/catalogs/*.json (nur Metadaten). - kb.json/INDEX.md regeneriert (1274 Eintraege, 76 Cluster); agent/kb.py: ID-Raeume kv|ris, source akzeptiert html-only. - Tests 41 -> 49 (Konverter, LAW_MAP-Abdeckung, neue ID-Raeume, Korpus-Integrationszahl).
This commit is contained in:
+7
-3
@@ -13,7 +13,7 @@ from pathlib import Path
|
||||
|
||||
import yaml
|
||||
|
||||
ID_RE = re.compile(r"^(lb|wk)-[a-z0-9]+-\d+$")
|
||||
ID_RE = re.compile(r"^(lb|wk|kv|ris)-[a-z0-9]+-\d+$")
|
||||
STAND_RE = re.compile(r"^\d{4}-\d{2}$")
|
||||
REQUIRED_KEYS = (
|
||||
"id", "batch", "title", "work", "chapter", "topic", "author",
|
||||
@@ -97,8 +97,12 @@ def load_entry(path: Path) -> KBEntry:
|
||||
raise KbValidationError(f"{path.name}: invalid id '{meta['id']}'")
|
||||
if not STAND_RE.match(meta["stand"]):
|
||||
raise KbValidationError(f"{path.name}: stand '{meta['stand']}' not YYYY-MM")
|
||||
if not isinstance(meta["source"], dict) or not {"pdf", "text"} <= set(meta["source"]):
|
||||
raise KbValidationError(f"{path.name}: source needs pdf+text")
|
||||
if not isinstance(meta["source"], dict) or not (
|
||||
{"pdf", "html", "text"} & set(meta["source"])
|
||||
):
|
||||
raise KbValidationError(
|
||||
f"{path.name}: source needs at least one of pdf/html/text"
|
||||
)
|
||||
for key in ("legal_bases", "tags", "cross_refs"):
|
||||
if not isinstance(meta[key], list):
|
||||
raise KbValidationError(f"{path.name}: '{key}' must be a list")
|
||||
|
||||
Reference in New Issue
Block a user