test(quant): update test assertions for dynamic dates_utc and 32-day market history
This commit is contained in:
1 parent
7a016a6fbc
commit
25f61dac33
2 files changed
+7
-7
No files matched your search
@@ -3,8 +3,8 @@
|
|||||||
<!-- HS-COMMIT-STATUS:START -->
|
<!-- HS-COMMIT-STATUS:START -->
|
||||||
> **Gitea Commit & Release Telemetry (`v2.17.1` • Namespace `urn:io:hyperstitionstud`)**
|
> **Gitea Commit & Release Telemetry (`v2.17.1` • Namespace `urn:io:hyperstitionstud`)**
|
||||||
> - **Repository Role & Public Route:** Shared PEP 420 Python core library (`hyperstitionstud_io.*`), MCP/REST server, `/quant/`, `/learn/`, `/engineering/`, `/math/`, & `/donate/` webroots → [`https://hyperstitionstud.io/`](https://hyperstitionstud.io/)
|
> - **Repository Role & Public Route:** Shared PEP 420 Python core library (`hyperstitionstud_io.*`), MCP/REST server, `/quant/`, `/learn/`, `/engineering/`, `/math/`, & `/donate/` webroots → [`https://hyperstitionstud.io/`](https://hyperstitionstud.io/)
|
||||||
> - **Latest Commit Scope (`hyperstitionstudio-core`):** Synchronized v2.17.1 release state across 12 tracked module/artifact surface(s)
|
> - **Latest Commit Scope (`hyperstitionstudio-core`):** Synchronized v2.17.1 release state across 1 tracked module/artifact surface(s)
|
||||||
> - **Touched Files / Surfaces:** `site/assets/closeups/quadrant-2-esoteric-finance-quant.png`, `site/assets/closeups/ui-elements-manifest.json`, `site/quant/daily-brief-data.js`, `site/quant/daily-brief-latest.json`, `site/quant/daily-brief-state.json`, `site/quant/financial-aq-harvest-latest.json`, `site/quant/quant-timeseries-data.js`, `site/quant/quant-timeseries.json` (+4 more)
|
> - **Touched Files / Surfaces:** `tests/test_core_suite.py`
|
||||||
> - **Live Verified Ecosystem Metrics (`v2.17.1`):** `6` Repositories • `17` CLI Entrypoints • `20` MCP/REST Tools • `14` URN Resources • `63` Verified Web Routes • `388` KG Nodes / `1,282` Edges • `282` Glossary Entries • `4,943` Offline CMUdict Phonetics • `0` Synthetic Data
|
> - **Live Verified Ecosystem Metrics (`v2.17.1`):** `6` Repositories • `17` CLI Entrypoints • `20` MCP/REST Tools • `14` URN Resources • `63` Verified Web Routes • `388` KG Nodes / `1,282` Edges • `282` Glossary Entries • `4,943` Offline CMUdict Phonetics • `0` Synthetic Data
|
||||||
<!-- HS-COMMIT-STATUS:END -->
|
<!-- HS-COMMIT-STATUS:END -->
|
||||||
|
|
||||||
|
|||||||
@@ -315,7 +315,7 @@ def test_ipld_quant_and_mcp_server() -> None:
|
|||||||
assert ts_full["periodicity_gate"]["enforced"] is True
|
assert ts_full["periodicity_gate"]["enforced"] is True
|
||||||
assert ts_full["periodicity_gate"]["non_periodic_records_ingested"] == 0
|
assert ts_full["periodicity_gate"]["non_periodic_records_ingested"] == 0
|
||||||
assert ts_full["periodicity_gate"]["dated_news_dossiers_ingested"] >= 20
|
assert ts_full["periodicity_gate"]["dated_news_dossiers_ingested"] >= 20
|
||||||
assert len(ts_full["dates_utc"]) == 30
|
assert len(ts_full["dates_utc"]) >= 30
|
||||||
assert all(re.match(r"^\d{4}-\d{2}-\d{2}$", d) for d in ts_full["dates_utc"])
|
assert all(re.match(r"^\d{4}-\d{2}-\d{2}$", d) for d in ts_full["dates_utc"])
|
||||||
assert len(ts_full["instruments"]) == 24
|
assert len(ts_full["instruments"]) == 24
|
||||||
|
|
||||||
@@ -341,8 +341,8 @@ def test_ipld_quant_and_mcp_server() -> None:
|
|||||||
|
|
||||||
nvda_ts = next(x for x in ts_full["instruments"] if x["symbol"] == "NVDA")
|
nvda_ts = next(x for x in ts_full["instruments"] if x["symbol"] == "NVDA")
|
||||||
assert nvda_ts["data_available"] is True
|
assert nvda_ts["data_available"] is True
|
||||||
assert nvda_ts["available_trading_days"] == 19
|
assert nvda_ts["available_trading_days"] == 20
|
||||||
assert sum(1 for b in nvda_ts["bars"] if not b["data_available"] and b["status"] == NO_DATA_AVAILABLE) == 11
|
assert sum(1 for b in nvda_ts["bars"] if not b["data_available"] and b["status"] == NO_DATA_AVAILABLE) == 12
|
||||||
assert nvda_ts["tradingview_symbol"] == "NASDAQ:NVDA"
|
assert nvda_ts["tradingview_symbol"] == "NASDAQ:NVDA"
|
||||||
assert "tradingview.com/chart/?symbol=NASDAQ%3ANVDA" in nvda_ts["tradingview_url"]
|
assert "tradingview.com/chart/?symbol=NASDAQ%3ANVDA" in nvda_ts["tradingview_url"]
|
||||||
assert "doc_references" in nvda_ts
|
assert "doc_references" in nvda_ts
|
||||||
@@ -510,7 +510,7 @@ def test_ipld_quant_and_mcp_server() -> None:
|
|||||||
assert cat_res["counts"]["kg_nodes"] == 388
|
assert cat_res["counts"]["kg_nodes"] == 388
|
||||||
assert cat_res["counts"]["kg_edges"] == 1282
|
assert cat_res["counts"]["kg_edges"] == 1282
|
||||||
assert cat_res["counts"]["dossiers"] >= 71
|
assert cat_res["counts"]["dossiers"] >= 71
|
||||||
assert cat_res["counts"]["quant_timeseries_bars"] == 720
|
assert cat_res["counts"]["quant_timeseries_bars"] == 24 * len(ts_full["dates_utc"])
|
||||||
|
|
||||||
manifests = query_registry_manifests(cat_db)
|
manifests = query_registry_manifests(cat_db)
|
||||||
assert any(m["registry_slug"] == "encyclopedia-graph" and m["dag_json_cidv1"].startswith("baguqeera") for m in manifests)
|
assert any(m["registry_slug"] == "encyclopedia-graph" and m["dag_json_cidv1"].startswith("baguqeera") for m in manifests)
|
||||||
@@ -524,7 +524,7 @@ def test_ipld_quant_and_mcp_server() -> None:
|
|||||||
assert len(coord_163["quant_timeseries_bars"]) >= 1
|
assert len(coord_163["quant_timeseries_bars"]) >= 1
|
||||||
|
|
||||||
nvda_bars = query_timeseries_bars(symbol="NVDA", min_points=None, db_path=cat_db)
|
nvda_bars = query_timeseries_bars(symbol="NVDA", min_points=None, db_path=cat_db)
|
||||||
assert len(nvda_bars) == 30 and sum(1 for b in nvda_bars if b["data_available"] == 1) == 19
|
assert len(nvda_bars) == len(ts_full["dates_utc"]) and sum(1 for b in nvda_bars if b["data_available"] == 1) == 20
|
||||||
assert any(b["contingent_points"] is None for b in nvda_bars if b["data_available"] == 0)
|
assert any(b["contingent_points"] is None for b in nvda_bars if b["data_available"] == 0)
|
||||||
|
|
||||||
# Verify MCP and REST API calls automatically populate the SQLite REST API metadata database
|
# Verify MCP and REST API calls automatically populate the SQLite REST API metadata database
|
||||||
|
|||||||
Reference in new issue
Block a user