Skip to content

Commit

Permalink
Issue #179/#211/#213 add tests for DriverVectorCube.get_dimension_names
Browse files Browse the repository at this point in the history
  • Loading branch information
soxofaan committed Aug 7, 2023
1 parent f095480 commit 65920ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion openeo_driver/datacube.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ def get_dimension_names(self) -> List[str]:
if self._cube is None:
return [self.DIM_GEOMETRIES]
else:
return list(self._cube.dims)
return list(str(d) for d in self._cube.dims)

def get_bounding_box(self) -> Tuple[float, float, float, float]:
# TODO: cache bounding box?
Expand Down
1 change: 1 addition & 0 deletions tests/test_vectorcube.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ def test_from_geodataframe_default(self, gdf):
def test_from_geodataframe_columns_for_cube(self, gdf, columns_for_cube, expected_cube):
vc = DriverVectorCube.from_geodataframe(gdf, columns_for_cube=columns_for_cube)

assert vc.get_dimension_names() == list(expected_cube["dims"])
assert vc.to_internal_json() == {
"geometries": DictSubSet(
{
Expand Down

0 comments on commit 65920ef

Please sign in to comment.