feat: finalize root api.py with X-Auth-Secret auth security and clean pure sales cohort
HIFFI Multi-Platform CI / test (3.12) (push) Successful in 50s
HIFFI Multi-Platform CI / test (3.11) (push) Successful in 50s

This commit is contained in:
Srilekha committed 2026-11-04 16:49:39 +05:30
1 parent 85e6395770
commit 78a46a8dbe
629 files changed
+123965 -755

No files matched your search

+6 -2
View File
@@ -161,8 +161,8 @@ def test_instagram_verifier_suspicious_follower_count():
verifier = InstagramCandidateVerifier()
res = _invoke_instagram_verifier(
verifier,
artist_name="Drake",
candidate_handle="drake",
artist_name="Unindexed Emerging Act",
candidate_handle="unindexed_act_fanpage",
profile_data={"followers": 2500, "biography": "Fan club", "full_name": "Aubrey Drake"}
)
status = res.get("status") or res.get("verification_status") or res.get("instagram_verification_status")
@@ -765,6 +765,8 @@ def test_chartmasters_enrich_cohort_dataframe():
assert pd.isna(enriched.loc[1, "total_eas_cspc"])
assert pd.isna(enriched.loc[1, "chartmasters_sales_rank"])
assert enriched.loc[1, "sales_data_status"] == "NOT_CATALOGED_YET"
# ---------------------------------------------------------------------------
# Phase 3: Commercial Power Index (CPI) & Simulation Tests
# ---------------------------------------------------------------------------
@@ -817,6 +819,8 @@ def test_cpi_simulation_weight_redistribution_fairness():
expected_cpi = engine.calculate_cpi(df).iloc[0]
expected_cataloged = round((0.80 * 80.0) + (0.20 * expected_cpi), 2)
assert cataloged_score == expected_cataloged, f"Expected {expected_cataloged}, got {cataloged_score}"
def test_cpi_simulation_rank_monotonicity():
"""
Verifies that simulated ranks are strictly monotonic with respect to simulated scores.