From 5f97cff8d7cfd0cffe266f1fc547b27a9fb600e0 Mon Sep 17 00:00:00 2001 From: agessaman Date: Wed, 22 Jul 2026 14:55:58 -0700 Subject: [PATCH] ci: install the geo extra so location tests match a real install Tests (all four Python versions) failed on test_over_budget_same_state_omits_prefix while passing locally. Root cause: CI installed only ".[test]", leaving out the optional geo extra (us, pycountry). normalize_us_state() returns (None, None) when `us` is absent, so "Washington" no longer normalizes to "WA" and the AQI prefix-budget path wrongly concluded the resolved state differed from default_state, keeping the "Seattle, WA: " prefix. Install ".[test,geo]" in both the test matrix and the mypy job. This also un-skips ~27 geo-dependent tests that were silently skipping in CI and which pass with the extra present. Also ignore _debug/, a local scratch directory for captured configs and logs that should never be committed. --- .github/workflows/test.yml | 7 +++++-- .gitignore | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e376187..e0ff648 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -100,7 +100,7 @@ jobs: - name: Install dependencies run: | pip install --upgrade pip - pip install -e ".[test]" + pip install -e ".[test,geo]" pip install mypy - name: mypy — strict overrides on typed modules @@ -152,7 +152,10 @@ jobs: - name: Install dependencies run: | pip install --upgrade pip - pip install -e ".[test]" + # `geo` (us, pycountry) is optional at runtime but drives US state and + # country normalization; without it ~27 location tests skip and the AQI + # prefix-budget behavior silently differs from a real install. + pip install -e ".[test,geo]" - name: Run tests with coverage run: pytest tests/ -v --tb=short diff --git a/.gitignore b/.gitignore index e0ed502..4912d10 100644 --- a/.gitignore +++ b/.gitignore @@ -185,3 +185,6 @@ local/service_plugins/* # Local engineering audit reports (may contain security-sensitive findings) /PROJECT_REVIEW_*.md + +# Local debugging scratch (captured configs and logs — may contain real settings) +_debug/