Skip to content

Commit

Permalink
added time_rule parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
cehbrecht committed Sep 10, 2021
1 parent 82a79f7 commit e27cbaa
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions rook/processes/wps_subset.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,19 @@ def __init__(self):
LiteralInput(
"time",
"Time Period",
abstract="The time period to subset over separated by /"
"Example: 1860-01-01/1900-12-30",
abstract="The time interval (start/end) to subset over separated by '/'"
" or a list of time points separated by ','."
" The format is according to the ISO-8601 standard."
" Example: 1860-01-01/1900-12-30 or 1860-01-01, 1870-01-01, 1880-01-01",
data_type="string",
min_occurs=0,
max_occurs=1,
),
LiteralInput(
"time_rule",
"Time Rule",
abstract="An optional time rule to describe divisions of the time period (like seasons)."
" Example: months:01,02,03 or years:1970,1980|months=01|days:01",
data_type="string",
min_occurs=0,
max_occurs=1,
Expand Down Expand Up @@ -131,6 +142,8 @@ def _handler(self, request, response):
# show me the environment used by the process in debug mode
LOGGER.debug(f"Environment used in subset: {os.environ}")

LOGGER.info(f"time rule: {request.inputs['time_rule'][0].data}")

# from roocs_utils.exceptions import InvalidParameterValue, MissingParameterValue
collection = parse_wps_input(
request.inputs, "collection", as_sequence=True, must_exist=True
Expand Down

0 comments on commit e27cbaa

Please sign in to comment.