Skip to content

Commit

Permalink
chore: change function name
Browse files Browse the repository at this point in the history
  • Loading branch information
RaczeQ committed Jul 29, 2024
1 parent 3061469 commit d6b3017
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion quackosm/osm_extracts/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ def find_smallest_containing_bbbike_extracts(
)


def find_smallest_containing_extract(
def find_smallest_containing_extracts(
geometry: Union[BaseGeometry, BaseMultipartGeometry],
source: Union[OsmExtractSource, str],
allow_uncovered_geometry: bool = False,
Expand Down
4 changes: 2 additions & 2 deletions quackosm/pbf_file_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
from quackosm.osm_extracts import (
OsmExtractSource,
download_extracts_pbf_files,
find_smallest_containing_extract,
find_smallest_containing_extracts,
)

__all__ = [
Expand Down Expand Up @@ -572,7 +572,7 @@ def convert_geometry_to_parquet(
)
return result_file_path.with_suffix(".geoparquet")

matching_extracts = find_smallest_containing_extract(
matching_extracts = find_smallest_containing_extracts(
self.geometry_filter,
self.osm_extract_source,
allow_uncovered_geometry=self.allow_uncovered_geometry,
Expand Down
6 changes: 3 additions & 3 deletions tests/base/test_osm_extracts.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from quackosm.osm_extracts import (
OsmExtractSource,
display_available_extracts,
find_smallest_containing_extract,
find_smallest_containing_extracts,
find_smallest_containing_extracts_total,
get_extract_by_query,
)
Expand Down Expand Up @@ -127,7 +127,7 @@ def test_wrong_osm_extract_source(): # type: ignore
) # type: ignore
def test_single_smallest_extract(source: str, geometry: BaseGeometry, expected_extract_id: str):
"""Test if extracts matching works correctly for geometries within borders."""
extracts = find_smallest_containing_extract(geometry, source)
extracts = find_smallest_containing_extracts(geometry, source)
assert len(extracts) == 1
assert extracts[0].id == expected_extract_id, f"{extracts[0].id} vs {expected_extract_id}"

Expand All @@ -153,7 +153,7 @@ def test_multiple_smallest_extracts(
source: str, geometry: BaseGeometry, expected_extract_file_names: list[str]
):
"""Test if extracts matching works correctly for geometries between borders."""
extracts = find_smallest_containing_extract(geometry, source)
extracts = find_smallest_containing_extracts(geometry, source)
assert len(extracts) == len(expected_extract_file_names)
ut.assertListEqual([extract.file_name for extract in extracts], expected_extract_file_names)

Expand Down

0 comments on commit d6b3017

Please sign in to comment.