Prefer stock display names in IPO reports
Request: Rename the report display-name rule from 中文名 to 股票名, prefer Chinese stock-style short names, and allow sourced English stock names such as MERDEKAGOLD-DRS when no Chinese short name exists. Changes: - Update the hk-ipo-analyst skill to require a 股票名 column and document English stock-name fallback. - Derive missing stock_short_name values from archived market-heat source-page stock names in the analysis dataset. - Preserve source-page stock names into ipo_master when future market-heat archives encounter blank stock_short_name values. - Rename the single-ticker report display helper to stock_display_name. - Refresh the latest report and README so 06228 displays as MERDEKAGOLD-DRS and tables use 股票名. Verification: - python3 /root/.codex/skills/.system/skill-creator/scripts/quick_validate.py .agents/skills/hk-ipo-analyst - git diff --check - .venv/bin/python -m py_compile scripts/archive_t0_5_market_heat.py scripts/build_analysis_dataset.py scripts/generate_ipo_report.py - Rebuilt analysis_model_v0_dataset.csv for 2026-06-23T10:59:36Z - Verified 06228 stock_short_name is MERDEKAGOLD-DRS and latest README matches the dated report
This commit is contained in:
@@ -150,8 +150,8 @@ def fmt_int(value: int | None) -> str:
|
||||
return f"{value:,}"
|
||||
|
||||
|
||||
def chinese_display_name(record: dict[str, str]) -> str:
|
||||
return record.get("stock_short_name") or record.get("company_name_zh") or ""
|
||||
def stock_display_name(record: dict[str, str]) -> str:
|
||||
return record.get("stock_short_name") or record.get("company_name_zh") or record.get("company_name_en") or ""
|
||||
|
||||
|
||||
def company_display_name(record: dict[str, str]) -> str:
|
||||
@@ -425,7 +425,7 @@ def build_report(record: dict[str, str], rows: list[dict[str, str]], stage: str,
|
||||
paths = source_paths(record, stage)
|
||||
source_lines = [f"- `{path}`" for path in paths] or ["- 本阶段没有记录来源路径。"]
|
||||
company_name = company_display_name(record)
|
||||
title_name = chinese_display_name(record) or record.get("company_name_en") or ""
|
||||
title_name = stock_display_name(record)
|
||||
title_prefix = f"{ticker} {title_name}" if title_name else ticker
|
||||
|
||||
lines = [
|
||||
|
||||
Reference in New Issue
Block a user