Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default stride to 1 in griddap #192

Merged
merged 1 commit into from
Jul 5, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions erddapy/erddapy.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def parse_dates(date_time: Union[datetime, str]) -> float:

def _griddap_get_constraints(
dataset_url: str,
step: int = 1000,
step: int,
) -> Tuple[Dict, List, List]:
"""
Fetch metadata of griddap dataset and set initial constraints
Expand Down Expand Up @@ -228,11 +228,13 @@ def __init__(
def griddap_initialize(
self,
dataset_id: OptionalStr = None,
step: int = 1,
):
"""Fetch metadata of dataset and initialise constraints and variables

Args:
dataset_id: a dataset unique id."""
dataset_id: a dataset unique id.
step: step used to subset dataset"""

dataset_id = dataset_id if dataset_id else self.dataset_id
if self.protocol != "griddap":
Expand All @@ -246,7 +248,7 @@ def griddap_initialize(
self.constraints,
self.dim_names,
self.variables,
) = _griddap_get_constraints(metadata_url)
) = _griddap_get_constraints(metadata_url, step)
self._constraints_original = self.constraints.copy()
self._variables_original = self.variables.copy()

Expand Down