Skip to content

Commit

Permalink
update defaul and use int notation
Browse files Browse the repository at this point in the history
  • Loading branch information
ocefpaf committed Feb 22, 2024
1 parent 7fb7dbd commit 2ff73e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions erddapy/core/url.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def get_search_url(
response: str = "html",
search_for: Optional[str] = None,
protocol: str = "tabledap",
items_per_page: int = 1000,
items_per_page: int = 1_000_000,
page: int = 1,
**kwargs,
):
Expand All @@ -175,7 +175,7 @@ def get_search_url(
response: default is HTML.
items_per_page: how many items per page in the return,
default is 1000 for HTML, 1e6 (hopefully all items) for CSV, JSON.
default is 1_000_000 for HTML, 1e6 (hopefully all items) for CSV, JSON.
page: which page to display, default is the first page (1).
kwargs: extra search constraints based on metadata and/or coordinates ke/value.
metadata: `cdm_data_type`, `institution`, `ioos_category`,
Expand Down Expand Up @@ -240,7 +240,7 @@ def get_search_url(
kwargs.update({search_term: lowercase})

# These responses should not be paginated b/c that hinders the correct amount of data silently
# and can surprise users when the number of items is greater than ERDDAP's defaults (1000 items).
# and can surprise users when the number of items is greater than ERDDAP's defaults (1_000_000 items).
# Ideally there should be no pagination for this on the ERDDAP side but for now we settled for a
# "really big" `items_per_page` number.
non_paginated_responses = [
Expand Down
4 changes: 2 additions & 2 deletions erddapy/erddapy.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def get_search_url(
response: OptionalStr = None,
search_for: OptionalStr = None,
protocol: OptionalStr = None,
items_per_page: int = 1000,
items_per_page: int = 1_000_000,
page: int = 1,
**kwargs,
) -> str:
Expand All @@ -206,7 +206,7 @@ def get_search_url(
response: default is HTML.
items_per_page: how many items per page in the return,
default is 1000 for HTML, 1e6 (hopefully all items) for CSV, JSON.
default is 1_000_000 for HTML, 1e6 (hopefully all items) for CSV, JSON.
page: which page to display, default is the first page (1).
kwargs: extra search constraints based on metadata and/or coordinates ke/value.
metadata: `cdm_data_type`, `institution`, `ioos_category`,
Expand Down

0 comments on commit 2ff73e4

Please sign in to comment.