Skip to content
Snippets Groups Projects
Commit 64a8f613 authored by Cain, Payton David's avatar Cain, Payton David
Browse files

Update interval names in Timeseries Factory

parent 0ae6401d
No related branches found
No related tags found
2 merge requests!146Release CMO metadata to production,!31Update intervals for Timeseries factories
This commit is part of merge request !31. Comments created here will be created in the context of that merge request.
...@@ -619,7 +619,7 @@ DEFAULT_METADATA = { ...@@ -619,7 +619,7 @@ DEFAULT_METADATA = {
"data_interval_type": "1-minute calculated", "data_interval_type": "1-minute calculated",
"filter_comments": [], "filter_comments": [],
}, },
"hourly": {"data_interval_type": "1-hour calculated"}, "hour": {"data_interval_type": "1-hour calculated"},
}, },
}, },
"BLC": { "BLC": {
......
...@@ -50,7 +50,7 @@ class PlotTimeseriesFactory(TimeseriesFactory): ...@@ -50,7 +50,7 @@ class PlotTimeseriesFactory(TimeseriesFactory):
type : {'definitive', 'provisional', 'quasi-definitive', 'variation'} type : {'definitive', 'provisional', 'quasi-definitive', 'variation'}
data type, optional. data type, optional.
uses default if unspecified. uses default if unspecified.
interval : {'daily', 'hourly', 'minute', 'monthly', 'second'} interval : {'day', 'hour', 'minute', 'month', 'second'}
data interval, optional. data interval, optional.
uses default if unspecified. uses default if unspecified.
Raises Raises
......
...@@ -31,7 +31,7 @@ class TimeseriesFactory(object): ...@@ -31,7 +31,7 @@ class TimeseriesFactory(object):
type : {'definitive', 'provisional', 'quasi-definitive', 'variation'} type : {'definitive', 'provisional', 'quasi-definitive', 'variation'}
default data type, optional. default data type, optional.
default 'variation'. default 'variation'.
interval : {'daily', 'hourly', 'minute', 'monthly', 'second'} interval : {'day', 'hour', 'minute', 'month, 'second'}
data interval, optional. data interval, optional.
default 'minute'. default 'minute'.
urlTemplate : str urlTemplate : str
...@@ -90,7 +90,7 @@ class TimeseriesFactory(object): ...@@ -90,7 +90,7 @@ class TimeseriesFactory(object):
type : {'definitive', 'provisional', 'quasi-definitive', 'variation'} type : {'definitive', 'provisional', 'quasi-definitive', 'variation'}
data type, optional. data type, optional.
uses default if unspecified. uses default if unspecified.
interval : {'daily', 'hourly', 'minute', 'monthly', 'second'} interval : {'day', 'hour', 'minute', 'month', 'second'}
data interval, optional. data interval, optional.
uses default if unspecified. uses default if unspecified.
...@@ -196,7 +196,7 @@ class TimeseriesFactory(object): ...@@ -196,7 +196,7 @@ class TimeseriesFactory(object):
type : {'definitive', 'provisional', 'quasi-definitive', 'variation'} type : {'definitive', 'provisional', 'quasi-definitive', 'variation'}
data type, optional. data type, optional.
uses default if unspecified. uses default if unspecified.
interval : {'daily', 'hourly', 'minute', 'monthly', 'second'} interval : {'day', 'hour', 'minute', 'month', 'second'}
data interval, optional. data interval, optional.
uses default if unspecified. uses default if unspecified.
Raises Raises
...@@ -339,7 +339,7 @@ class TimeseriesFactory(object): ...@@ -339,7 +339,7 @@ class TimeseriesFactory(object):
type : {'variation', 'reported', 'provisional', 'adjusted', type : {'variation', 'reported', 'provisional', 'adjusted',
'quasi-definitive', 'definitive'} 'quasi-definitive', 'definitive'}
data type. data type.
interval : {'minute', 'second', 'hourly', 'daily'} interval : {'minute', 'second', 'hour', 'day'}
data interval. data interval.
channels : list channels : list
list of data channels being requested list of data channels being requested
...@@ -384,7 +384,7 @@ class TimeseriesFactory(object): ...@@ -384,7 +384,7 @@ class TimeseriesFactory(object):
Parameters Parameters
---------- ----------
interval : {'daily', 'hourly', 'minute', 'monthly', 'second'} interval : {'day', 'hour', 'minute', 'month', 'second'}
Returns Returns
------- -------
...@@ -395,14 +395,15 @@ class TimeseriesFactory(object): ...@@ -395,14 +395,15 @@ class TimeseriesFactory(object):
TimeseriesFactoryException TimeseriesFactoryException
if ``interval`` is not supported. if ``interval`` is not supported.
""" """
interval_abbr = None interval_abbr = None
if interval == "daily": if interval == "day":
interval_abbr = "day" interval_abbr = "day"
elif interval == "hourly": elif interval == "hour":
interval_abbr = "hor" interval_abbr = "hor"
elif interval == "minute": elif interval == "minute":
interval_abbr = "min" interval_abbr = "min"
elif interval == "monthly": elif interval == "month":
interval_abbr = "mon" interval_abbr = "mon"
elif interval == "second": elif interval == "second":
interval_abbr = "sec" interval_abbr = "sec"
...@@ -433,7 +434,7 @@ class TimeseriesFactory(object): ...@@ -433,7 +434,7 @@ class TimeseriesFactory(object):
interval_name = "OneMinute" interval_name = "OneMinute"
elif interval == "second": elif interval == "second":
interval_name = "OneSecond" interval_name = "OneSecond"
elif interval == "hourly": elif interval == "hour":
interval_name = "OneHour" interval_name = "OneHour"
else: else:
raise TimeseriesFactoryException('Unsupported interval "%s"' % interval) raise TimeseriesFactoryException('Unsupported interval "%s"' % interval)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment