[ 
https://issues.apache.org/jira/browse/BEAM-3985?focusedWorklogId=90509&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-90509
 ]

ASF GitHub Bot logged work on BEAM-3985:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 12/Apr/18 17:45
            Start Date: 12/Apr/18 17:45
    Worklog Time Spent: 10m 
      Work Description: asfgit closed pull request #412: [BEAM-3985] Document 
Gradle commands for testing and linting.
URL: https://github.com/apache/beam-site/pull/412
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/src/contribute/contribution-guide.md 
b/src/contribute/contribution-guide.md
index 51456b57a6..68cb082d12 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.
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 90509)
    Time Spent: 3h 20m  (was: 3h 10m)

> Update developer guide to reference new Python linting enviroments
> ------------------------------------------------------------------
>
>                 Key: BEAM-3985
>                 URL: https://issues.apache.org/jira/browse/BEAM-3985
>             Project: Beam
>          Issue Type: Task
>          Components: sdk-py-core, website
>            Reporter: holdenk
>            Assignee: Udi Meiri
>            Priority: Minor
>          Time Spent: 3h 20m
>  Remaining Estimate: 0h
>
> tox.ini changed, but [https://beam.apache.org/contribute/contribution-guide/] 
> still references the told envs.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to