| ; |
| ; Licensed to the Apache Software Foundation (ASF) under one or more |
| ; contributor license agreements. See the NOTICE file distributed with |
| ; this work for additional information regarding copyright ownership. |
| ; The ASF licenses this file to You under the Apache License, Version 2.0 |
| ; (the "License"); you may not use this file except in compliance with |
| ; the License. You may obtain a copy of the License at |
| ; |
| ; http://www.apache.org/licenses/LICENSE-2.0 |
| ; |
| ; Unless required by applicable law or agreed to in writing, software |
| ; distributed under the License is distributed on an "AS IS" BASIS, |
| ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| ; See the License for the specific language governing permissions and |
| ; limitations under the License. |
| ; |
| |
| [tox] |
| envlist = py27,py27gcp,py27cython,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 |
| |
| [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 |
| # Clean up all previous python generated files. |
| - find apache_beam -type f -name '*.pyc' -delete |
| pip install -e .[test] |
| python apache_beam/examples/complete/autocomplete_test.py |
| python setup.py test |
| passenv = TRAVIS* |
| |
| [testenv:py27cython] |
| # 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 |
| # 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] |
| 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* |
| |
| [testenv:py27gcp] |
| # autocomplete_test depends on nose when invoked directly. |
| deps = |
| nose==1.3.7 |
| whitelist_externals=find |
| commands = |
| pip install -e .[test,gcp] |
| python --version |
| # Clean up all previous python generated files. |
| - find apache_beam -type f -name '*.pyc' -delete |
| python apache_beam/examples/complete/autocomplete_test.py |
| python setup.py test |
| passenv = TRAVIS* |
| |
| [testenv:lint] |
| deps= |
| nose==1.3.7 |
| pycodestyle==2.3.1 |
| pylint==1.7.2 |
| future==0.16.0 |
| isort==4.2.15 |
| whitelist_externals=time |
| commands = |
| time pip install -e .[test] |
| time {toxinidir}/run_pylint.sh |
| passenv = TRAVIS* |
| |
| [testenv:docs] |
| deps= |
| nose==1.3.7 |
| grpcio-tools==1.3.5 |
| Sphinx==1.5.5 |
| sphinx_rtd_theme==0.2.4 |
| whitelist_externals=time |
| commands = |
| time pip install -e .[test,gcp,docs] |
| time {toxinidir}/generate_pydoc.sh |
| passenv = TRAVIS* |