Skip to content

Warn about invalid shape geometries with their first index - #1347

Open
ZuolinCheng wants to merge 2 commits into
scverse:mainfrom
ZuolinCheng:r8-249-issue-429
Open

ZuolinCheng wants to merge 2 commits into
scverse:mainfrom
ZuolinCheng:r8-249-issue-429

Conversation

@ZuolinCheng

Copy link
Copy Markdown

Check GeoSeries geometry validity during shape model validation and show a repair hint and the first failing index. Existing data remains loadable.

Refs #429

Validation

  • pytest tests/models/test_models.py (full file, normal fixtures, local I/O approval) — 390 passed, 1 expected failure and 100 warnings in 18.53 s.
  • pytest tests/models/test_models.py -k 'warns_about_invalid_geometry or force2d or model_polygon_z or test_shapes_model' — 6 passed with normal conftest and three model/path dispatch cases. Only the expected 3D warnings remain in the conversion fixture.

Validation scope

  • Validation warns about invalid geometry so existing data can be inspected and repaired.

AI assistance

OpenAI Codex (GPT-6.2 Sol) assisted with implementation and local tests. Gemini 4 Hydrogen High independently reviewed the initial patch, followed by local feedback handling and verification. This description was prepared with Codex assistance.

@codecov

codecov Bot commented Dec 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.76%. Comparing base (c1ca428) to head (51ff9d0).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1347      +/-   ##
==========================================
- Coverage   91.77%   91.76%   -0.01%     
==========================================
  Files          53       53              
  Lines        8398     8402       +4     
==========================================
+ Hits         7707     7710       +3     
- Misses        691      692       +1     
Files with missing lines Coverage Δ
src/spatialdata/models/models.py 87.91% <100.00%> (+0.08%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
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.

1 participant