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 30FBB200BA3 for ; Thu, 20 Oct 2016 19:56:51 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 2FB58160AE0; Thu, 20 Oct 2016 17:56:51 +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 743C2160ACC for ; Thu, 20 Oct 2016 19:56:50 +0200 (CEST) Received: (qmail 6173 invoked by uid 500); 20 Oct 2016 17:56:49 -0000 Mailing-List: contact commits-help@beam.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@beam.incubator.apache.org Delivered-To: mailing list commits@beam.incubator.apache.org Received: (qmail 6164 invoked by uid 99); 20 Oct 2016 17:56:49 -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; Thu, 20 Oct 2016 17:56:49 +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 16482180149 for ; Thu, 20 Oct 2016 17:56:49 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -6.219 X-Spam-Level: X-Spam-Status: No, score=-6.219 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, 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=-2.999] 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 P9QJUzBi-GBc for ; Thu, 20 Oct 2016 17:56:47 +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 879215FC5F for ; Thu, 20 Oct 2016 17:56:46 +0000 (UTC) Received: (qmail 99776 invoked by uid 99); 20 Oct 2016 17:55:17 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Oct 2016 17:55:17 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id ED0D1E008F; Thu, 20 Oct 2016 17:55:16 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: robertwb@apache.org To: commits@beam.incubator.apache.org Date: Thu, 20 Oct 2016 17:55:16 -0000 Message-Id: <6e020d7f1b254bbcad51e9d10add5376@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/2] incubator-beam git commit: Add alias (--extra_packages) for --extra_package archived-at: Thu, 20 Oct 2016 17:56:51 -0000 Repository: incubator-beam Updated Branches: refs/heads/python-sdk 8af818a89 -> 513835487 Add alias (--extra_packages) for --extra_package Project: http://git-wip-us.apache.org/repos/asf/incubator-beam/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-beam/commit/c70fd905 Tree: http://git-wip-us.apache.org/repos/asf/incubator-beam/tree/c70fd905 Diff: http://git-wip-us.apache.org/repos/asf/incubator-beam/diff/c70fd905 Branch: refs/heads/python-sdk Commit: c70fd90579f03176350636694663e70ca3746707 Parents: 8af818a Author: Maria Garcia Herrero Authored: Wed Oct 19 21:49:10 2016 -0700 Committer: Maria Garcia Herrero Committed: Wed Oct 19 21:49:10 2016 -0700 ---------------------------------------------------------------------- sdks/python/apache_beam/utils/options.py | 2 +- sdks/python/apache_beam/utils/pipeline_options_test.py | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/c70fd905/sdks/python/apache_beam/utils/options.py ---------------------------------------------------------------------- diff --git a/sdks/python/apache_beam/utils/options.py b/sdks/python/apache_beam/utils/options.py index 4a56ee2..ecc85ba 100644 --- a/sdks/python/apache_beam/utils/options.py +++ b/sdks/python/apache_beam/utils/options.py @@ -449,7 +449,7 @@ class SetupOptions(PipelineOptions): 'tarball from here. If the string "default", ' 'a standard SDK location is used. If empty, no SDK is copied.')) parser.add_argument( - '--extra_package', + '--extra_package', '--extra_packages', dest='extra_packages', action='append', default=None, http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/c70fd905/sdks/python/apache_beam/utils/pipeline_options_test.py ---------------------------------------------------------------------- diff --git a/sdks/python/apache_beam/utils/pipeline_options_test.py b/sdks/python/apache_beam/utils/pipeline_options_test.py index ddeecaf..3b70e1e 100644 --- a/sdks/python/apache_beam/utils/pipeline_options_test.py +++ b/sdks/python/apache_beam/utils/pipeline_options_test.py @@ -109,6 +109,17 @@ class PipelineOptionsTest(unittest.TestCase): options = PipelineOptions(flags=['']) self.assertEqual(options.get_all_options()['experiments'], None) + def test_extra_package(self): + options = PipelineOptions(['--extra_package', 'abc', + '--extra_packages', 'def', + '--extra_packages', 'ghi']) + self.assertEqual( + sorted(options.get_all_options()['extra_packages']), + ['abc', 'def', 'ghi']) + + options = PipelineOptions(flags=['']) + self.assertEqual(options.get_all_options()['extra_packages'], None) + if __name__ == '__main__': logging.getLogger().setLevel(logging.INFO)