feat(donate,quant,tutorials,citations): implement /donate/, Option 3 stadium-pill navbar, 5-episode /quant/ canvas tour, and passage-encoded deep citations (v2.0.19)
This commit is contained in:
1 parent
1182ba0cf2
commit
2114de35bb
17 files changed
+3270
-13
No files matched your search
@@ -45,6 +45,7 @@ def test_offline_urn_namespaces_and_no_external_https_fonts() -> None:
|
||||
cfg = load_workspace_config()
|
||||
for html_p in (
|
||||
cfg.core_dir / "site" / "index.html",
|
||||
cfg.core_dir / "site" / "donate" / "index.html",
|
||||
cfg.core_dir / "site" / "learn" / "index.html",
|
||||
cfg.core_dir / "site" / "quant" / "index.html",
|
||||
cfg.core_dir / "site" / "gallery" / "index.html",
|
||||
@@ -58,6 +59,17 @@ def test_offline_urn_namespaces_and_no_external_https_fonts() -> None:
|
||||
assert "by Lemurs." in txt, f"Missing global Lemurs footer in {html_p}"
|
||||
assert ("♥" in txt or "♥" in txt), f"Missing Unicode heart in {html_p}"
|
||||
|
||||
for nav_p in (
|
||||
cfg.core_dir / "site" / "index.html",
|
||||
cfg.core_dir / "site" / "learn" / "index.html",
|
||||
cfg.core_dir / "site" / "quant" / "index.html",
|
||||
):
|
||||
nav_txt = nav_p.read_text(encoding="utf-8")
|
||||
assert "btn-donate-pill" in nav_txt, f"Missing distinct stadium-pill Donate button in {nav_p}"
|
||||
assert "donate-pill-emblem" in nav_txt, f"Missing circular 1:2 Donate emblem in {nav_p}"
|
||||
assert "nav-donate-sep" in nav_txt, f"Missing vertical divider before Donate pill in {nav_p}"
|
||||
assert "margin-left: auto" in nav_txt, f"Missing right-justification margin-left: auto in {nav_p}"
|
||||
|
||||
schemas_dir = cfg.core_dir / "schemas" / "v1"
|
||||
for sp in schemas_dir.glob("*.schema.json"):
|
||||
s_obj = json.loads(sp.read_text(encoding="utf-8"))
|
||||
@@ -237,11 +249,22 @@ def test_ipld_quant_and_mcp_server() -> None:
|
||||
nvda_ts = next(x for x in ts_full["instruments"] if x["symbol"] == "NVDA")
|
||||
assert nvda_ts["tradingview_symbol"] == "NASDAQ:NVDA"
|
||||
assert "tradingview.com/chart/?symbol=NASDAQ%3ANVDA" in nvda_ts["tradingview_url"]
|
||||
assert "doc_references" in nvda_ts
|
||||
assert "#page=" in nvda_ts["doc_references"]["encyclopedia_deep_link"]
|
||||
assert "search=" in nvda_ts["doc_references"]["encyclopedia_deep_link"]
|
||||
assert "?select=aq:137" in nvda_ts["doc_references"]["knowledge_graph_deep_link"]
|
||||
assert "#:~:text=" in nvda_ts["doc_references"]["exemplar_dossier_deep_link"]
|
||||
assert "struct_isometric_armor" in nvda_ts["structural_vector"]
|
||||
assert "ts_duty_cycle_pct" in nvda_ts["timeseries_moments"]
|
||||
assert "fund_manager" in nvda_ts["lens_projections"]
|
||||
assert "pokedex_scanner" in nvda_ts["lens_projections"]
|
||||
|
||||
sample_wire_day = next(d for d in ts_full["daily_wire_series"] if d["sample_equations"])
|
||||
sample_eq = sample_wire_day["sample_equations"][0]
|
||||
assert "#:~:text=" in sample_eq["dossier_deep_link"]
|
||||
assert "?highlight=" in sample_eq["api_highlight_link"]
|
||||
assert any("?select=aq:" in gl for gl in sample_eq["graph_hub_links"])
|
||||
|
||||
# Verify 100% lens-removal invariance when pokedex_scanner, tierzoo_ecology, and fantasy_sabermetrics are disabled
|
||||
ts_stripped = build_quant_timeseries_bundle(enabled_lenses=("neutral_math", "fund_manager"), write_files=False)
|
||||
assert ts_stripped["enabled_lenses"] == ["neutral_math", "fund_manager"]
|
||||
@@ -272,6 +295,9 @@ def test_ipld_quant_and_mcp_server() -> None:
|
||||
d_code, d_ctype, d_body = dispatch_rest_v1("GET", "/api/v1/dossiers/65?format=raw")
|
||||
assert d_code == 200 and "text/markdown" in d_ctype and "292" in d_body
|
||||
|
||||
hl_code, _, hl_body = dispatch_rest_v1("GET", "/api/v1/dossiers/65?highlight=292")
|
||||
assert hl_code == 200 and hl_body["data"]["match_count"] >= 1 and len(hl_body["data"]["matched_passages"]) >= 1
|
||||
|
||||
err_code, _, err_body = dispatch_rest_v1("GET", "/api/v1/ciphers/evaluate")
|
||||
assert err_code == 422 and err_body["ok"] is False
|
||||
|
||||
|
||||
Reference in new issue
Block a user