[
https://issues.apache.org/jira/browse/BEAM-3738?focusedWorklogId=81382&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-81382
]
ASF GitHub Bot logged work on BEAM-3738:
----------------------------------------
Author: ASF GitHub Bot
Created on: 16/Mar/18 21:28
Start Date: 16/Mar/18 21:28
Worklog Time Spent: 10m
Work Description: aaltay commented on a change in pull request #4877:
[BEAM-3738] Enable py3 lint and cleanup tox.ini.
URL: https://github.com/apache/beam/pull/4877#discussion_r175218495
##########
File path: sdks/python/tox.ini
##########
@@ -17,142 +17,101 @@
[tox]
# new environments will be excluded by default unless explicitly added to
envlist.
-# TODO (after BEAM-3671) add lint_py3 back in.
-envlist = py27,py27gcp,py27cython,lint_py2,docs
+envlist = py27,py27-{gcp,cython,lint},py3-lint,docs
toxworkdir = {toxinidir}/target/.tox
[pycodestyle]
# Disable all errors and warnings except for the ones related to blank lines.
# pylint does not check the number of blank lines.
select = E3
+# Shared environment options.
+[testenv]
+# Set [] options for pip install, e.g., pip install apache-beam[test].
+extras = test
+# Always recreate the virtual environment.
+recreate = True
+# Pass these environment variables to the test environment.
+passenv = TRAVIS*
+# Don't warn that these commands aren't installed.
+whitelist_externals =
+ find
+ time
+
[testenv:py27]
-# autocomplete_test depends on nose when invoked directly.
-deps =
- nose==1.3.7
- grpcio-tools==1.3.5
-whitelist_externals=find
commands =
- python --version
- pip --version
- # Clean up all previous python generated files.
- - find apache_beam -type f -name '*.pyc' -delete
- pip install -e .[test]
+ {toxinidir}/run_tox_cleanup.sh
python apache_beam/examples/complete/autocomplete_test.py
python setup.py test
-passenv = TRAVIS*
+ {toxinidir}/run_tox_cleanup.sh
-[testenv:py27cython]
+[testenv:py27-cython]
# cython tests are only expected to work in linux (2.x and 3.x)
# If we want to add other platforms in the future, it should be:
# `platform = linux2|darwin|...`
# See https://docs.python.org/2/library/sys.html#sys.platform for platform
codes
platform = linux2
-# autocomplete_test depends on nose when invoked directly.
deps =
- nose==1.3.7
- grpcio-tools==1.3.5
cython==0.25.2
-whitelist_externals=
- find
- time
commands =
- python --version
- pip --version
- # Clean up all previous python generated files.
- - find apache_beam -type f -name '*.pyc' -delete
- # Clean up all previous cython generated files.
- - find apache_beam -type f -name '*.c' -delete
- - find apache_beam -type f -name '*.so' -delete
- - find target/build -type f -name '*.c' -delete
- - find target/build -type f -name '*.so' -delete
- time pip install -e .[test]
+ {toxinidir}/run_tox_cleanup.sh
python apache_beam/examples/complete/autocomplete_test.py
python setup.py test
- # Clean up all cython generated files. Ignore if deletion fails.
- - find apache_beam -type f -name '*.c' -delete
- - find apache_beam -type f -name '*.so' -delete
- - find target/build -type f -name '*.c' -delete
- - find target/build -type f -name '*.so' -delete
-passenv = TRAVIS*
+ {toxinidir}/run_tox_cleanup.sh
-[testenv:py27gcp]
-# autocomplete_test depends on nose when invoked directly.
-deps =
- nose==1.3.7
-whitelist_externals=find
+[testenv:py27-gcp]
+extras = test,gcp
commands =
- python --version
- pip --version
- pip install -e .[test,gcp]
- # Clean up all previous python generated files.
- - find apache_beam -type f -name '*.pyc' -delete
+ {toxinidir}/run_tox_cleanup.sh
python apache_beam/examples/complete/autocomplete_test.py
python setup.py test
-passenv = TRAVIS*
+ {toxinidir}/run_tox_cleanup.sh
-[testenv:lint_py2]
-deps=
- nose==1.3.7
+[testenv:py27-lint]
+deps =
pycodestyle==2.3.1
pylint==1.7.2
future==0.16.0
isort==4.2.15
flake8==3.5.0
-whitelist_externals=time
commands =
python --version
- pip --version
- time pip install -e .[test]
time {toxinidir}/run_pylint.sh
-passenv = TRAVIS*
-[testenv:lint_py3]
-deps=
- nose==1.3.7
+[testenv:py3-lint]
+deps =
pycodestyle==2.3.1
pylint==1.7.2
future==0.16.0
isort==4.2.15
flake8==3.5.0
-whitelist_externals=time
+setenv =
+ BEAM_EXPERIMENTAL_PY3=1
commands =
- time pip install -e .[test]
+ python --version
time {toxinidir}/run_mini_py3lint.sh
-passenv = TRAVIS*
-
[testenv:docs]
-deps=
- nose==1.3.7
- grpcio-tools==1.3.5
+extras = docs
+deps =
Sphinx==1.6.5
sphinx_rtd_theme==0.2.4
-whitelist_externals=time
commands =
python --version
pip --version
time pip install -e .[test,gcp,docs]
Review comment:
Should we use `extras` instead of `[test,gcp,docs]`?
----------------------------------------------------------------
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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 81382)
Time Spent: 5h 10m (was: 5h)
> Enable Py3 linting in Jenkins
> -----------------------------
>
> Key: BEAM-3738
> URL: https://issues.apache.org/jira/browse/BEAM-3738
> Project: Beam
> Issue Type: Bug
> Components: sdk-py-core, testing
> Reporter: holdenk
> Assignee: Ahmet Altay
> Priority: Major
> Time Spent: 5h 10m
> Remaining Estimate: 0h
>
> After BEAM-3671 is finished enable linting.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)