feat(datascience): auto-commit con 7 cambios

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-03 00:48:43 +02:00
parent 5a4f82cf76
commit 8a78a70ef6
7 changed files with 817 additions and 8 deletions
@@ -17,7 +17,7 @@ from __future__ import annotations
from .. import model
CHAPTER_VERSION = "1.1.0"
CHAPTER_VERSION = "1.1.1"
CHAPTER_ID = "glosario"
CHAPTER_TITLE = "Glosario"
@@ -89,14 +89,19 @@ def build_glosario(profile: dict, ctx: dict):
"Cada término va resaltado en el texto y, al pulsarlo, salta a su "
"definición en esta sección.")),
]
# One clickable destination per term, alphabetically by visible label. A term
# registered without a definition is completed from the canonical baseline.
for term in glossary.terms(by="label"):
# One clickable destination per term, alphabetically by *visible* label. The
# baseline resolution must happen BEFORE sorting: a term registered bare (no
# label) carries its key as label in the collector, so ordering by the
# collector's label would place it by its key instead of by the human label
# supplied by the baseline catalog. Resolve first, then sort by the final label.
resolved = []
for term in glossary.terms(by="order"):
label, definition = _resolve_term(term)
resolved.append((label, definition, model._safe_str(term.get("key"))))
resolved.sort(key=lambda e: model._safe_str(e[0]).lower())
for label, definition, key in resolved:
blocks.append(model.GlossaryEntry(
key=model._safe_str(term.get("key")),
label=label,
definition=definition))
key=key, label=label, definition=definition))
return model.Chapter(id=CHAPTER_ID, title=CHAPTER_TITLE,
version=CHAPTER_VERSION, blocks=blocks)