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

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

                Author: ASF GitHub Bot
            Created on: 07/Jun/18 20:46
            Start Date: 07/Jun/18 20:46
    Worklog Time Spent: 10m 
      Work Description: alanmyrvold commented on a change in pull request #464: 
[BEAM-4488], [BEAM-4489], [BEAM-4490] Improvements to contribution guide
URL: https://github.com/apache/beam-site/pull/464#discussion_r193883969
 
 

 ##########
 File path: src/contribute/index.md
 ##########
 @@ -78,29 +97,90 @@ necessary things to run those tests. For example:
     $ ./gradlew -p sdks/java/io/cassandra check
     $ ./gradlew -p runners/flink check
 
-### Testing the Python SDK
+You can see what build tasks are available with
+
+    $ ./gradlew tasks
+
+or for a module,
+
+    $ ./gradlew sdks/java/io/cassandra tasks
+
+### Developing with an IDE
+
+Generate an IDEA project .ipr file with:
+
+    $ ./gradlew idea
+
+### Pull requests
+
+When your change is ready to be reviewed and merged, create a pull request.
+Format the pull request title like [BEAM-XXX] Fixes bug in 
ApproximateQuantiles,
+where you replace BEAM-XXX with the appropriate JIRA issue.
+This will automatically link the pull request to the issue.
+
+Pull requests can only be merged by a [beam committer]
+(http://people.apache.org/phonebook.html?unix=beam).
+To find a committer for your area, look for similar code merges or ask on 
+[d...@beam.apache.org]({{ site.baseurl }}/community/contact-us/)
+
+Use @mention in the pull request to notify the reviewer.
+
+The pull request and any changes pushed to it will trigger precommit jobs.
+If a test fails and appears unrelated to your change, you can cause tests
+to be re-run by adding a single line comment on your PR
+
+     retest this please
+
+There are other trigger phrases for post-commit tests found in
+.testinfra/jenkins, but use these sparingly because postcommit
+tests consume shared development resources.
+
+### Developing with the Python SDK
+
+Gradle can build and test python, and is used by the Jenkins jobs, so needs to
+be maintained.
 
 You can directly use the Python toolchain instead of having Gradle orchestrate
-it. This may be faster for you. We recommend setting up a virtual environment
-before testing your code.
+it, which may be faster for you, but it is your preference.
+If you do want to use Python tools directly, we recommend setting up a virtual
+environment before testing your code.
 
 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. 
 
 The following commands should be run in the `sdks/python` directory.
-This command runs all Python tests.
+This installs Python from source and includes the test and gcp dependencies.
+
+On macOS/Linix:
+
+    $ virtualenv env
+    $ . ./env/bin/activate
+    (env) $ pip install .[gcp,test]
 
-    $ python setup.py nosetests
+On Windows:
+
+    > c:\Python27\python.exe -m virtualenv
+    > env\Scripts\activate
+    (env) > pip install .[gcp,test]
+
+This command runs all Python tests. The nose dependency is installed by [test] 
in pip install.
+
+    (env) $ python setup.py nosetests
 
 You can use following command to run a single test method.
 
-    $ python setup.py nosetests --tests <module>:<test class>.<test method>
+    (env) $ python setup.py nosetests --tests <module>:<test class>.<test 
method>
+
+    For example:
+    (env) $ python setup.py nosetests --tests 
apache_beam.io.textio_test:TextSourceTest.test_progress
 
-    Example:
-    $ python setup.py nosetests --tests 
apache_beam.io.textio_test:TextSourceTest.test_progress
+You can deactivate the virtualenv when done.
 
-To check just for lint errors, run the following command.
+    (env) $ deactivate
+    $
+
+To check just for Python lint errors, run the following command.
 
 Review comment:
   done

----------------------------------------------------------------
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: 109856)
    Time Spent: 1h 20m  (was: 1h 10m)

> Contributor's guide needs to document how to install Python SDK from source
> ---------------------------------------------------------------------------
>
>                 Key: BEAM-4488
>                 URL: https://issues.apache.org/jira/browse/BEAM-4488
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-py-core
>            Reporter: Pablo Estrada
>            Assignee: Alan Myrvold
>            Priority: Major
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> Currently it is not documented, though it does appear in the quickstart



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

Reply via email to