Skip to content

testing.results: compare GeoJSON (vector cube) assets in assert_job_results_allclose - #956

Open
raashish1601 wants to merge 1 commit into
Open-EO:masterfrom
raashish1601:feature/862-vector-cube-compare
Open

raashish1601 wants to merge 1 commit into
Open-EO:masterfrom
raashish1601:feature/862-vector-cube-compare

Conversation

@raashish1601

Copy link
Copy Markdown

Closes #862

assert_job_results_allclose skipped GeoJSON assets with an "Unhandled job result asset" warning, so vector cube results (e.g. vectorcube.geojson) were never compared.

This adds a GeoJSON comparison to _compare_job_results. Both files are loaded as JSON and compared recursively: numeric values (coordinates, numeric properties) use the same rtol/atol as the raster comparisons, other values must be equal, and key or length differences are reported with their JSON path, e.g. Value mismatch at '/features/0/properties/value': 1.5 != 1.0 (actual != expected).

Tests: added cases for a match within tolerance, value differences, the atol handling and structure differences (keys, feature count). pytest tests/testing/test_results.py passes, and darker/isort/flake8 are clean. Also added a changelog entry.

AI assistance: this PR was drafted with the help of an AI coding agent (Claude Code, Anthropic). It wrote the change and tests and ran them locally as described above.

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.

support vector cube comparison in openeo.testing.results

1 participant