[ 
https://issues.apache.org/jira/browse/CLIMATE-649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14658612#comment-14658612
 ] 

ASF GitHub Bot commented on CLIMATE-649:
----------------------------------------

Github user MJJoyce commented on a diff in the pull request:

    https://github.com/apache/climate/pull/220#discussion_r36333951
  
    --- Diff: ocw-cli/cli_app.py ---
    @@ -1138,30 +1080,36 @@ def settings_screen(header):
                   new_start_time = screen.getstr()
                   try:
                        new_start_time = datetime.strptime(new_start_time, 
'%Y-%m-%d')
    -                   new_start_time_int = 
int("{0}{1}".format(new_start_time.year, new_start_time.month))
    -                   fix_min_time_int = 
int("{0}{1}".format(fix_min_time.year, fix_min_time.month))
    -                   fix_max_time_int = 
int("{0}{1}".format(fix_max_time.year, fix_max_time.month))
    -                   all_overlap_end_time_int = 
int("{0}{1}".format(all_overlap_end_time.year, all_overlap_end_time.month))
    -                   if new_start_time_int < fix_min_time_int \
    -                   or new_start_time_int > fix_max_time_int \
    -                   or new_start_time_int > all_overlap_end_time_int:
    -                        note = "Start time has not changed. "
    +                   #new_start_time_int = 
int("{0}{1}".format(new_start_time.year, new_start_time.month))
    +                   #fix_min_time_int = 
int("{0}{1}".format(fix_min_time.year, fix_min_time.month))
    +                   #fix_max_time_int = 
int("{0}{1}".format(fix_max_time.year, fix_max_time.month))
    +                   #all_overlap_end_time_int = 
int("{0}{1}".format(all_overlap_end_time.year, all_overlap_end_time.month))
    +                   #if new_start_time_int < fix_min_time_int \
    +                   #or new_start_time_int > fix_max_time_int \
    +                   #or new_start_time_int > all_overlap_end_time_int:
    +                   if new_start_time < fix_min_time \
    +                   or new_start_time > fix_max_time \
    +                   or new_start_time > all_overlap_end_time:
    +                        note = "Start time has not changed."
                        else:
                             all_overlap_start_time = new_start_time
                             note = "Start time has changed successfully. "
                   except:
    -                   note = "Start time has not changed. "
    +                   note = "Start time has not changed."
                   screen.addstr(26, x/2, "Enter End Time [max time:{0}] 
(Format YYYY-MM-DD):".format(fix_max_time))
                   new_end_time = screen.getstr()
                   try:
                        new_end_time = datetime.strptime(new_end_time, 
'%Y-%m-%d')
    -                   new_end_time_int = 
int("{0}{1}".format(new_end_time.year, new_end_time.month))
    -                   fix_min_time_int = 
int("{0}{1}".format(fix_min_time.year, fix_min_time.month))
    -                   fix_max_time_int = 
int("{0}{1}".format(fix_max_time.year, fix_max_time.month))
    -                   all_overlap_start_time_int = 
int("{0}{1}".format(all_overlap_start_time.year, all_overlap_start_time.month))
    -                   if new_end_time_int > fix_max_time_int \
    -                   or new_end_time_int < fix_min_time_int \
    -                   or new_end_time_int < all_overlap_start_time_int:
    +                   #new_end_time_int = 
int("{0}{1}".format(new_end_time.year, new_end_time.month))
    --- End diff --
    
    See my message above regarding commented code @huikyole


> Update CLI
> ----------
>
>                 Key: CLIMATE-649
>                 URL: https://issues.apache.org/jira/browse/CLIMATE-649
>             Project: Apache Open Climate Workbench
>          Issue Type: Improvement
>          Components: command line interface
>    Affects Versions: 1.0.0
>            Reporter: Huikyo Lee
>            Assignee: Huikyo Lee
>            Priority: Critical
>             Fix For: 0.5
>
>
> Updates include following changes.
> - It is assumed that there is only one observation data
> - time period does not have to be a multiple of 12.
> - regridding process needs to be corrected. Only two regridding options 
> ('Observation' and 'User specified') are available in this new version.
> - For calculation of metrics and drawing a plot use external package, CLI 
> calls example_package.py



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to