From 2235077e478573cc1a347dd6170366151d9b12ab Mon Sep 17 00:00:00 2001 From: Stefan Jansen Date: Thu, 24 Sep 2026 12:59:07 -0400 Subject: [PATCH 1/2] test: validate provider URLs structurally --- tests/test_aqr_provider.py | 5 ++++- tests/test_kalshi_unit.py | 7 +++++-- tests/test_wiki_prices_provider.py | 7 +++++-- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/tests/test_aqr_provider.py b/tests/test_aqr_provider.py index aa285a9..7c60bcd 100644 --- a/tests/test_aqr_provider.py +++ b/tests/test_aqr_provider.py @@ -5,6 +5,7 @@ from io import BytesIO from pathlib import Path from unittest.mock import MagicMock, patch +from urllib.parse import urlparse import pandas as pd import polars as pl @@ -530,4 +531,6 @@ def test_default_path(self): def test_base_url(self): """Test BASE_URL is valid AQR URL.""" - assert "aqr.com" in AQRFactorProvider.BASE_URL + parsed = urlparse(AQRFactorProvider.BASE_URL) + assert parsed.scheme == "https" + assert parsed.hostname == "www.aqr.com" diff --git a/tests/test_kalshi_unit.py b/tests/test_kalshi_unit.py index c31c2c7..c2a3a44 100644 --- a/tests/test_kalshi_unit.py +++ b/tests/test_kalshi_unit.py @@ -16,6 +16,7 @@ from datetime import datetime from unittest.mock import MagicMock, patch +from urllib.parse import urlparse import polars as pl import pytest @@ -62,8 +63,10 @@ def test_rate_limit_default(self): def test_base_url(self): """Test base URL is correct.""" provider = KalshiProvider() - assert "elections.kalshi.com" in provider.BASE_URL - assert "trade-api/v2" in provider.BASE_URL + parsed = urlparse(provider.BASE_URL) + assert parsed.scheme == "https" + assert parsed.hostname == "api.elections.kalshi.com" + assert parsed.path == "/trade-api/v2" provider.close() diff --git a/tests/test_wiki_prices_provider.py b/tests/test_wiki_prices_provider.py index 7b7c94f..a9edd54 100644 --- a/tests/test_wiki_prices_provider.py +++ b/tests/test_wiki_prices_provider.py @@ -3,6 +3,7 @@ from datetime import datetime from pathlib import Path from unittest.mock import MagicMock, patch +from urllib.parse import urlparse import polars as pl import pytest @@ -645,5 +646,7 @@ def test_default_paths_exist(self): def test_nasdaq_export_url(self): """Test NASDAQ_EXPORT_URL is valid.""" - assert "nasdaq.com" in WikiPricesProvider.NASDAQ_EXPORT_URL - assert "WIKI/PRICES" in WikiPricesProvider.NASDAQ_EXPORT_URL + parsed = urlparse(WikiPricesProvider.NASDAQ_EXPORT_URL) + assert parsed.scheme == "https" + assert parsed.hostname == "data.nasdaq.com" + assert parsed.path == "/api/v3/datatables/WIKI/PRICES.csv" From 6a98c56bfadfcc17d59611e8e8dab737bf09ea81 Mon Sep 17 00:00:00 2001 From: Stefan Jansen Date: Thu, 24 Sep 2026 14:51:51 -0400 Subject: [PATCH 2/2] ci: refresh ecosystem qualification policy --- .github/workflows/ecosystem.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ecosystem.yml b/.github/workflows/ecosystem.yml index 3605038..fe84b47 100644 --- a/.github/workflows/ecosystem.yml +++ b/.github/workflows/ecosystem.yml @@ -17,7 +17,7 @@ jobs: qualification: permissions: contents: read - uses: ml4t/ecosystem/.github/workflows/qualify-library.yml@955d8ce160c48b6907bc67ca90db219ebe7acfb9 # 2026-09-19 policy snapshot + uses: ml4t/ecosystem/.github/workflows/qualify-library.yml@a3080f8e09b197098c9d796240e746aca516492e # 2026-09-23 policy snapshot with: import-package: ml4t.data prerelease-exception: python-315-polars diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9290be7..e2bca84 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -64,7 +64,7 @@ jobs: needs: preflight permissions: contents: read - uses: ml4t/ecosystem/.github/workflows/qualify-library.yml@955d8ce160c48b6907bc67ca90db219ebe7acfb9 # 2026-09-19 policy snapshot + uses: ml4t/ecosystem/.github/workflows/qualify-library.yml@a3080f8e09b197098c9d796240e746aca516492e # 2026-09-23 policy snapshot with: import-package: ml4t.data prerelease-exception: python-315-polars