diff --git a/docs/conf.py b/docs/conf.py index 6f9a35d..a822a70 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -15,7 +15,7 @@ author = 'Riley Hales, PhD' # The full version, including alpha/beta/rc tags -release = '1.6.2' +release = '1.6.3' master_doc = 'index' # -- General configuration --------------------------------------------------- diff --git a/geoglows/__init__.py b/geoglows/__init__.py index a0ee1f5..95e484e 100644 --- a/geoglows/__init__.py +++ b/geoglows/__init__.py @@ -12,6 +12,6 @@ 'bias', 'plots', 'data', 'analyze', 'streams', 'tables', 'streamflow', 'get_metadata_table_path', 'set_metadata_table_path', ] -__version__ = '1.6.2' +__version__ = '1.6.3' __author__ = 'Riley Hales' __license__ = 'BSD 3-Clause Clear License' diff --git a/geoglows/_download_decorators.py b/geoglows/_download_decorators.py index 501ea70..3bfde37 100644 --- a/geoglows/_download_decorators.py +++ b/geoglows/_download_decorators.py @@ -27,14 +27,6 @@ def _forecast(function): - def _river_id_is_iterable(river_id): - return bool( - isinstance(river_id, list) or - isinstance(river_id, tuple) or - isinstance(river_id, set) or - isinstance(river_id, np.ndarray) - ) - def from_aws(*args, **kwargs): product_name = function.__name__.replace("_", "").lower() if product_name == 'forecastrecords': @@ -42,7 +34,7 @@ def from_aws(*args, **kwargs): return from_rest(*args, **kwargs) river_id = args[0] if len(args) > 0 else kwargs.get('river_id', None) - if river_id is None: + if river_id is None and product_name != 'dates': raise ValueError('River ID must be provided to retrieve forecast data.') return_format = kwargs.get('format', 'df') @@ -126,7 +118,7 @@ def from_rest(*args, **kwargs): product_name = function.__name__.replace("_", "").lower() river_id = args[0] if len(args) > 0 else kwargs.get('river_id', None) - if river_id is None: + if river_id is None and product_name != 'dates': raise ValueError('River ID must be provided to retrieve forecast data.') if not isinstance(river_id, (int, np.int64, )): raise ValueError('Multiple river_ids are not available via REST API. Provide a single 9 digit integer.') diff --git a/geoglows/data.py b/geoglows/data.py index 1dea868..cf5f8fa 100644 --- a/geoglows/data.py +++ b/geoglows/data.py @@ -5,7 +5,7 @@ import xarray as xr from ._constants import get_metadata_table_path -from ._download_decorators import _forecast, _retrospective +from ._download_decorators import _forecast, _retrospective, DEFAULT_REST_ENDPOINT, DEFAULT_REST_ENDPOINT_VERSION from .analyze import ( daily_averages as calc_daily_averages, @@ -27,6 +27,9 @@ 'return_periods', 'metadata_tables', + + 'DEFAULT_REST_ENDPOINT', + 'DEFAULT_REST_ENDPOINT_VERSION', ]