Skip to content

fix(ci): repair integration test suite after v2 SearchResult refactor#66

Merged
chrislyonsKY merged 2 commits intomainfrom
fix/integration-tests-v2-api
Apr 20, 2026
Merged

fix(ci): repair integration test suite after v2 SearchResult refactor#66
chrislyonsKY merged 2 commits intomainfrom
fix/integration-tests-v2-api

Conversation

@chrislyonsKY
Copy link
Copy Markdown
Owner

Summary

Fixes all 11 failures in the weekly scheduled integration run on main (run 24655630991).

Three distinct root causes:

  1. Stale pandas API in test_integration.py (9 failures). v2.0.0 changed abovepy.search() to return a SearchResult workflow object, but the integration suite still called tiles.columns and tiles.iloc[0][...]. Routed through SearchResult.tiles (the underlying GeoDataFrame).

  2. Missing osgeo in CI (1 failure — test_mosaic_vrt). _build_vrt imports from osgeo import gdal; GDAL Python bindings aren't bundled with rasterio and aren't in any optional-dep group. Wrapped the import to raise MosaicError with install guidance, and marked the test pytest.importorskip("osgeo") so it skips rather than hard-fails when bindings aren't present.

  3. Real Phase 1 LAZ coverage gap (1 failure — test_laz_products[laz_phase1]). Phase 1 LiDAR was flown county-by-county 2010–2017 and Franklin County (Frankfort) was not in that batch, so the Frankfort fixture cannot return Phase 1 LAZ tiles. Switched test_laz_products to pike_county_bbox, which has all three phases.

Verification

Ran full suite locally against the live STAC API on commit f8c72f6:

python -m pytest tests/test_integration.py -m integration
34 passed, 1 skipped in 79.86s

The single skip is test_mosaic_vrt — expected behavior when osgeo is not installed. Unit tests (pytest tests/ --ignore=tests/test_integration.py): 481 passed. ruff check, ruff format --check, and mypy src/abovepy/ all clean.

Test plan

  • Run the CI workflow via workflow_dispatch on this branch to exercise the integration job in the real CI environment before merge.
  • Confirm scheduled Monday run passes after merge (next fires 2026-04-27 06:00 UTC).

The v2.0.0 refactor changed `abovepy.search()` to return a SearchResult
workflow object instead of a bare GeoDataFrame, but the integration suite
still accessed `.columns` and `.iloc` directly. Route those through
SearchResult.tiles (the underlying GeoDataFrame).

Also switch test_laz_products to pike_county_bbox. Phase 1 LiDAR was flown
county-by-county 2010-2017 and Franklin County (Frankfort) was not in
that batch, so the Frankfort fixture cannot return Phase 1 LAZ tiles.
Pike County has coverage for all three phases.

Fixes 10 of 11 failures in the weekly scheduled integration run on main.
_build_vrt imports `from osgeo import gdal`, which is not bundled with
rasterio and not in any optional-dependency group. On systems without
the GDAL Python bindings (including the CI integration runner) the
import would fail with a bare ModuleNotFoundError.

Wrap the import and raise MosaicError with install guidance instead.
The `.tif` path through `_merge_tiles` does not need GDAL bindings, so
the message points users there as a fallback.
@codacy-production
Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/abovepy/_mosaic.py 0.00% 5 Missing ⚠️

📢 Thoughts on this report? Let us know!

@chrislyonsKY chrislyonsKY merged commit e75fb60 into main Apr 20, 2026
26 checks passed
@chrislyonsKY chrislyonsKY deleted the fix/integration-tests-v2-api branch April 20, 2026 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants