You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by me...@apache.org on 2018/04/12 17:41:13 UTC

[beam-site] branch mergebot updated (843eada -> c7cf51f)

This is an automated email from the ASF dual-hosted git repository.

mergebot-role pushed a change to branch mergebot
in repository https://gitbox.apache.org/repos/asf/beam-site.git.


    from 843eada  This closes #417
     add 6dcda43  Prepare repository for deployment.
     new 29600fd  Document Gradle command for testing Beam SDK.
     new c7cf51f  This closes #412

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 content/documentation/programming-guide/index.html |  3 +-
 src/contribute/contribution-guide.md               | 82 ++++++++++++----------
 2 files changed, 45 insertions(+), 40 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
mergebot-role@apache.org.

[beam-site] 02/02: This closes #412

Posted by me...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mergebot-role pushed a commit to branch mergebot
in repository https://gitbox.apache.org/repos/asf/beam-site.git

commit c7cf51fbaee36036933b9a23748eeb9d8f90c59f
Merge: 6dcda43 29600fd
Author: Mergebot <me...@apache.org>
AuthorDate: Thu Apr 12 10:40:55 2018 -0700

    This closes #412

 src/contribute/contribution-guide.md | 82 +++++++++++++++++++-----------------
 1 file changed, 43 insertions(+), 39 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
mergebot-role@apache.org.

[beam-site] 01/02: Document Gradle command for testing Beam SDK.

Posted by me...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mergebot-role pushed a commit to branch mergebot
in repository https://gitbox.apache.org/repos/asf/beam-site.git

commit 29600fdd2880fa65a221ab2e0491f4048da61250
Author: Udi Meiri <eh...@google.com>
AuthorDate: Thu Apr 5 18:38:07 2018 -0700

    Document Gradle command for testing Beam SDK.
    
    Also update Python SDK instructions and reorganize them a bit.
---
 src/contribute/contribution-guide.md | 82 +++++++++++++++++++-----------------
 1 file changed, 43 insertions(+), 39 deletions(-)

diff --git a/src/contribute/contribution-guide.md b/src/contribute/contribution-guide.md
index 51456b5..68cb082 100644
--- a/src/contribute/contribution-guide.md
+++ b/src/contribute/contribution-guide.md
@@ -176,9 +176,9 @@ changes.
 
 You are now ready to start developing!
 
-#### [Python SDK Only] Set up a virtual environemt
+#### [Python SDK Only] Set up a virtual environment
 
-We recommend setting up a virtual envioment for developing Python SDK. Please
+We recommend setting up a virtual environment for developing Python SDK. Please
 see instructions available in [Quickstart (Python)]({{ site.baseurl
 }}/get-started/quickstart-py/) for setting up a virtual environment.
 
@@ -218,64 +218,68 @@ push. You'll run:
 
 	$ git push <GitHub_user> <my-branch> --force
 
-### Building
-
-#### Python SDK
-
-Before testing SDK code changes remotely, you must build the Beam tarball. From
-the root of the git repository, run:
-
-```
-cd sdks/python/
-python setup.py sdist
-```
-
-Pass the `--sdk_location` flag to use the newly built version. For example:
-
-```
-python setup.py sdist > /dev/null && \
-    python -m apache_beam.examples.wordcount ... \
-        --sdk_location dist/apache-beam-2.5.0.dev0.tar.gz
-```
-
 ### Testing
 
 All code should have appropriate unit testing coverage. New code should have
 new tests in the same contribution. Bug fixes should include a regression test
 to prevent the issue from reoccurring.
 
-#### Java SDK
+The entire set of tests can be run with this command at the root of the git
+repository.
 
-For contributions to the Java code, run checks locally via Gradle.
+    $ ./gradlew check --rerun-tasks
 
-    $ ./gradlew :beam-sdks-java-core:check --rerun-tasks
+You can also limit tests to certain language SDKs.
+
+    $ ./gradlew beam-sdks-java-core:check --rerun-tasks
+    $ ./gradlew beam-sdks-python:check --rerun-tasks
+    $ ./gradlew beam-sdks-go:check --rerun-tasks
 
 #### Python SDK
 
-For contributions to the Python code, you can use command given below to run
-unit tests locally. If you update any of the [cythonized](http://cython.org)
-files in Python SDK, you must install "cython" package before running following
+For contributions to the Python code, you can use the commands below to run unit
+tests locally. The above Gradle commands should also work, but these commands
+may run faster for you.
+
+If you update any of the [cythonized](http://cython.org)
+files in Python SDK, you must install the `cython` package before running following
 command to properly test your code. We recommend setting up a virtual
 environment before testing your code.
 
-    $ python setup.py test
+The following commands should be run in the `sdks/python` directory.
+This command runs all Python tests.
+
+    $ python setup.py nosetests
 
 You can use following command to run a single test method.
 
-    $ python setup.py test -s <module>.<test class>.<test method>
+    $ python setup.py nosetests --tests <module>:<test class>.<test method>
+
+    Example:
+    $ python setup.py nosetests --tests apache_beam.io.textio_test:TextSourceTest.test_progress
 
-To Check for lint errors locally, install "tox" package and run following
-command.
+To check just for lint errors, run the following command.
 
-    $ pip install tox
-    $ tox -e py27-lint,py3-lint
+    $ ../../gradlew lint
 
+##### Remote testing
 
-Beam supports running Python SDK tests using Gradle. For this, navigate to root
-directory of your Apache Beam clone and execute following command. Currently
-this cannot be run from a virtual environment.
+This step is only required for testing SDK code changes remotely (not using
+directrunner). In order to do this you must build the Beam tarball. From the
+root of the git repository, run:
+
+```
+$ cd sdks/python/
+$ python setup.py sdist
+```
 
-    $ ./gradlew :beam-sdks-python:check --rerun-tasks
+Pass the `--sdk_location` flag to use the newly built version. For example:
+
+```
+$ python setup.py sdist > /dev/null && \
+    python -m apache_beam.examples.wordcount ... \
+        --sdk_location dist/apache-beam-2.5.0.dev0.tar.gz
+```
 
 ## Review
 
@@ -307,7 +311,7 @@ following format:
 
 	[BEAM-<JIRA-issue-#>] <Title of the pull request>
 
-Please include a descriptive pull request message to help make the comitter’s
+Please include a descriptive pull request message to help make the committer’s
 job easier when reviewing. It’s fine to refer to existing design docs or the
 contents of the associated JIRA as appropriate.
 

-- 
To stop receiving notification emails like this one, please contact
mergebot-role@apache.org.