完整数据版补上研究口径的推运、次小运和细分盘(#92)。
研究章在渲染时计算,不写入资料包。四种星座大运次小运和 Kalachakra 第三层不改原来的主运、子运。D81、D108、D144 只留在研究章。 自测:test_research_timing、星座大运、域读取、卫生预算、真恒星、jhora 扫描、API 增长、六章标题、英文版。三张虚构盘中英出稿都低于 180 秒。PyJHora 已导入但未做逐层对照。 Co-Authored-By: Grok (agent loop)
This commit is contained in:
co-authored by
Grok (agent loop)
parent
85e8adddbc
commit
d45e65a9ec
@@ -1866,6 +1866,9 @@ def _render_pl9_ai_density_raw_data_markdown_en(packet: dict, language: str = "e
|
||||
if isinstance(varga, dict):
|
||||
lines.extend(["## Divisional Charts Numeric Tables", ""])
|
||||
for chart_name, chart_payload in varga.items():
|
||||
# D81 / D108 / D144 stay in the research chapter only.
|
||||
if any(token in str(chart_name).upper() for token in ("D81", "D108", "D144")):
|
||||
continue
|
||||
positions = chart_payload.get("positions") if isinstance(chart_payload, dict) else None
|
||||
if not isinstance(positions, dict):
|
||||
positions = chart_payload if isinstance(chart_payload, dict) else None
|
||||
@@ -2377,6 +2380,17 @@ def _append_parity_chapters(markdown: str, packet: dict, language: str) -> str:
|
||||
return markdown.rstrip() + "\n\n" + extra + "\n"
|
||||
|
||||
|
||||
def _append_research_chapters(markdown: str, packet: dict, language: str) -> str:
|
||||
try:
|
||||
from scripts.research_timing.render import render_research_chapters
|
||||
except ModuleNotFoundError: # pragma: no cover
|
||||
from research_timing.render import render_research_chapters
|
||||
extra = render_research_chapters(packet, language).strip()
|
||||
if not extra:
|
||||
return markdown
|
||||
return markdown.rstrip() + "\n\n" + extra + "\n"
|
||||
|
||||
|
||||
def render_full_data_markdown(packet: dict) -> str:
|
||||
"""Upstream `pl9_ai_density` branch at 23be1807, on this site's parity body."""
|
||||
if _pl9_report_language(packet if isinstance(packet, dict) else {}) != "en":
|
||||
@@ -2417,6 +2431,7 @@ def render_full_data_markdown(packet: dict) -> str:
|
||||
_pl9_english_report_title(packet),
|
||||
)
|
||||
rendered = _append_parity_chapters(rendered, packet, "en")
|
||||
rendered = _append_research_chapters(rendered, packet, "en")
|
||||
return _apply_local_report_conventions(rendered, language="en")
|
||||
zh_structured_appendix = re.sub(
|
||||
r"^#\s+.*?(?:\n{2,}|\n)",
|
||||
@@ -2439,6 +2454,7 @@ def render_full_data_markdown(packet: dict) -> str:
|
||||
)
|
||||
rendered = _sanitize_pl9_ai_density_markdown(zh_markdown, _pl9_public_report_title(packet))
|
||||
rendered = _append_parity_chapters(rendered, packet, "zh")
|
||||
rendered = _append_research_chapters(rendered, packet, "zh")
|
||||
return _apply_local_report_conventions(rendered, language="zh")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user