Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B1E29200AC0 for ; Tue, 10 May 2016 00:15:20 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B0574160A0F; Mon, 9 May 2016 22:15:20 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 044FF1609A8 for ; Tue, 10 May 2016 00:15:19 +0200 (CEST) Received: (qmail 71323 invoked by uid 500); 9 May 2016 22:15:19 -0000 Mailing-List: contact dev-help@climate.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@climate.apache.org Delivered-To: mailing list dev@climate.apache.org Received: (qmail 71312 invoked by uid 99); 9 May 2016 22:15:19 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 May 2016 22:15:19 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id CB1DA180573 for ; Mon, 9 May 2016 22:15:18 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.021 X-Spam-Level: X-Spam-Status: No, score=-4.021 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id t1e0zDRFyj7Z for ; Mon, 9 May 2016 22:15:15 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with SMTP id B17D25F2C5 for ; Mon, 9 May 2016 22:15:14 +0000 (UTC) Received: (qmail 70537 invoked by uid 99); 9 May 2016 22:15:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 May 2016 22:15:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 3AC082C1F6C for ; Mon, 9 May 2016 22:15:13 +0000 (UTC) Date: Mon, 9 May 2016 22:15:13 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@climate.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CLIMATE-785) RCMED.py: Optimize code MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 09 May 2016 22:15:20 -0000 [ https://issues.apache.org/jira/browse/CLIMATE-785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277176#comment-15277176 ] ASF GitHub Bot commented on CLIMATE-785: ---------------------------------------- Github user OCWJenkins commented on the pull request: https://github.com/apache/climate/pull/334#issuecomment-218006252 Can one of the admins verify this patch? > RCMED.py: Optimize code > ----------------------- > > Key: CLIMATE-785 > URL: https://issues.apache.org/jira/browse/CLIMATE-785 > Project: Apache Open Climate Workbench > Issue Type: Improvement > Components: data sources > Reporter: Ibrahim Jarif > Assignee: Ibrahim Jarif > Priority: Trivial > Labels: easyfix > > In ocw/data_source/rcmed.py file > {code} > if time_step.lower() == 'monthly': > if time.day != 1: > start_time_string = time.strftime('%Y%m%d') > start_time_string = start_time_string[:6] + '01' > time = datetime.strptime(start_time_string, '%Y%m%d') > ##TODO: Change the 3 lines above with this line: > ##time = datetime(time.year, time.month, 1) > elif time_step.lower() == 'daily': > if time.hour != 0 or time.minute != 0 or time.second != 0: > start_time_string = time.strftime('%Y%m%d%H%M%S') > start_time_string = start_time_string[:8] + '000000' > time = datetime.strptime(start_time_string, '%Y%m%d%H%M%S') > ##TODO: Change the 3 lines above with this line: > ##time = datetime(time.year, time.month, time.day, 00, 00, 00) > {code} > The commented code can be used in place of the actual code. -- This message was sent by Atlassian JIRA (v6.3.4#6332)