Compare GeoJSON assets in job result tests#913
Conversation
|
Thanks for the notification. I tried to inspect the Jenkins console, but I reproduced the PR branch locally:
GitHub also shows two workflows awaiting maintainer approval. Could you please approve/re-run the workflows and retry the Jenkins build? If Jenkins still fails, sharing the first relevant traceback from the console would help me address it. Thanks! |
569a926 to
e11ee92
Compare
# Conflicts: # CHANGELOG.md
e11ee92 to
8c80538
Compare
| """Load a vector data file as a GeoPandas GeoDataFrame.""" | ||
| try: | ||
| import geopandas | ||
| except ImportError as e: |
There was a problem hiding this comment.
why is this? geopandas is a base requirement, not an extra,
no need for this guard
| """Compare vector geometries and their attribute data.""" | ||
| actual_gdf = _load_geodataframe(actual) | ||
| expected_gdf = _load_geodataframe(expected) | ||
| import geopandas.testing |
There was a problem hiding this comment.
avoid local import when not necessary
| if issues: | ||
| all_issues.append(f"Issues for file {filename!r}:") | ||
| all_issues.extend(issues) | ||
| elif expected_path.suffix.lower() == ".geojson": |
There was a problem hiding this comment.
I'm not sure having ".geojson" is enough as an indicator for being loadable as geodataframe.
e.g. will a GeoJSON file with just a Polygon load here?
I think only Features and FeatureCollection objects can be loaded
Summary
.geojsonassets inassert_job_results_allcloseinstead of treating them as unhandled filesTesting
python -m pytest tests/testing -q(84 passed)pre-commit run --files CHANGELOG.md openeo/testing/results.py tests/testing/test_results.pyFixes #862