You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by ro...@apache.org on 2016/10/20 17:55:16 UTC

[1/2] incubator-beam git commit: Add alias (--extra_packages) for --extra_package

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 <ma...@google.com>
Authored: Wed Oct 19 21:49:10 2016 -0700
Committer: Maria Garcia Herrero <ma...@google.com>
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)


[2/2] incubator-beam git commit: Closes #1142

Posted by ro...@apache.org.
Closes #1142


Project: http://git-wip-us.apache.org/repos/asf/incubator-beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-beam/commit/51383548
Tree: http://git-wip-us.apache.org/repos/asf/incubator-beam/tree/51383548
Diff: http://git-wip-us.apache.org/repos/asf/incubator-beam/diff/51383548

Branch: refs/heads/python-sdk
Commit: 5138354875919610c7a463a0fb5eefdabaf2e74c
Parents: 8af818a c70fd90
Author: Robert Bradshaw <ro...@google.com>
Authored: Thu Oct 20 10:54:51 2016 -0700
Committer: Robert Bradshaw <ro...@google.com>
Committed: Thu Oct 20 10:54:51 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(-)
----------------------------------------------------------------------