Skip to content
Snippets Groups Projects
tox.ini 6.5 KiB
Newer Older
spmohanty's avatar
spmohanty committed
[tox]
envlist = py36, py37, examples, notebooks, flake8, docs, coverage

spmohanty's avatar
spmohanty committed

[travis]
python =
spmohanty's avatar
spmohanty committed
    3.7: py37
spmohanty's avatar
spmohanty committed
    3.6: py36

[flake8]
max-line-length = 120
ignore = E121 E126 E123 E128 E133 E226 E241 E242 E704 W291 W293 W391 W503 W504 W505
spmohanty's avatar
spmohanty committed
[testenv:flake8]
basepython = python
spmohanty's avatar
spmohanty committed
passenv = DISPLAY
u214892's avatar
u214892 committed
deps =
    -r{toxinidir}/requirements_dev.txt
    -r{toxinidir}/requirements_continuous_integration.txt
commands =
    flake8 flatland tests examples benchmarks
spmohanty's avatar
spmohanty committed

[testenv:docs]
; use python3.6 because of incompatibility under Windows of the pycairo installed through conda for py37
basepython = python3.6
whitelist_externals = make
spmohanty's avatar
spmohanty committed
passenv =
    DISPLAY
u214892's avatar
u214892 committed
    HTTP_PROXY
    HTTPS_PROXY
conda_deps =
    cairosvg
    pycairo
    tk
conda_channels :
    conda-forge
    anaconda
u214892's avatar
u214892 committed
deps =
    -r{toxinidir}/requirements_dev.txt
    -r{toxinidir}/requirements_continuous_integration.txt
changedir = {toxinidir}
u214892's avatar
u214892 committed
commands =
    make docs

[testenv:coverage]
; use python3.6 because of incompatibility under Windows of the pycairo installed through conda for py37
basepython = python3.6
whitelist_externals = make
u214892's avatar
u214892 committed
passenv =
    DISPLAY
; HTTP_PROXY+HTTPS_PROXY required behind corporate proxies
    HTTP_PROXY
    HTTPS_PROXY
conda_deps =
    cairosvg
    pycairo
    tk
conda_channels :
    conda-forge
    anaconda
u214892's avatar
u214892 committed
deps =
    -r{toxinidir}/requirements_dev.txt
    -r{toxinidir}/requirements_continuous_integration.txt
changedir = {toxinidir}
u214892's avatar
u214892 committed
    python make_coverage.py
[testenv:benchmarks]
; use python3.6 because of incompatibility under Windows of the pycairo installed through conda for py37
basepython = python3.6
u214892's avatar
u214892 committed
setenv =
    PYTHONPATH = {toxinidir}
u214892's avatar
u214892 committed
passenv =
    DISPLAY
u214892's avatar
u214892 committed
; HTTP_PROXY+HTTPS_PROXY required behind corporate proxies
    HTTP_PROXY
    HTTPS_PROXY
u214892's avatar
u214892 committed
whitelist_externals = sh
deps =
    -r{toxinidir}/requirements_dev.txt
    -r{toxinidir}/requirements_continuous_integration.txt
u214892's avatar
u214892 committed
commands =
    python {toxinidir}/benchmarks/benchmark_all_examples.py
; use python3.6 because of incompatibility under Windows of the pycairo installed through conda for py37
basepython = python3.6
; HTTP_PROXY+HTTPS_PROXY required behind corporate proxies
    HTTP_PROXY
    HTTPS_PROXY
deps =
    -r{toxinidir}/requirements_dev.txt
    -r{toxinidir}/requirements_continuous_integration.txt
    python {toxinidir}/benchmarks/profile_all_examples.py
[testenv:examples]
; TODO should examples be run with py36 and py37??
; use python3.6 because of incompatibility under Windows of the pycairo installed through conda for py37
basepython = python3.6
setenv =
    PYTHONPATH = {toxinidir}
passenv =
    DISPLAY
    XAUTHORITY
; HTTP_PROXY+HTTPS_PROXY required behind corporate proxies
    HTTP_PROXY
    HTTPS_PROXY
deps =
    -r{toxinidir}/requirements_dev.txt
; run tests from subfolder to ensure that resources are accessed via resources and not via relative paths
changedir = {envtmpdir}/c236d3c240d61a0969d4cb59e2180ce5
    python {toxinidir}/benchmarks/run_all_examples.py
; TODO should examples be run with py36 and py37??
; use python3.6 because of incompatibility under Windows of the pycairo installed through conda for py37
basepython = python3.6
setenv =
    PYTHONPATH = {toxinidir}
passenv =
    DISPLAY
    XAUTHORITY
; HTTP_PROXY+HTTPS_PROXY required behind corporate proxies
    HTTP_PROXY
    HTTPS_PROXY
whitelist_externals = sh
deps =
    -r{toxinidir}/requirements_dev.txt
    -r{toxinidir}/requirements_continuous_integration.txt
    conda-forge
    anaconda
; run tests from subfolder to ensure that resources are accessed via resources and not via relative paths
changedir = {envtmpdir}/6f59bc68108c3895b1828abdd04b9a06
    python -m jupyter nbextension install --py --sys-prefix widgetsnbextension
    python -m jupyter nbextension enable --py --sys-prefix widgetsnbextension
    python -m jupyter nbextension install --py --sys-prefix jpy_canvas
    python -m jupyter nbextension enable --py --sys-prefix jpy_canvas
    python {toxinidir}/notebooks/run_all_notebooks.py
[testenv:start_jupyter]
; use python3.6 because of incompatibility under Windows of the pycairo installed through conda for py37
basepython = python3.6
setenv =
    PYTHONPATH = {toxinidir}
passenv =
    DISPLAY
    XAUTHORITY
; HTTP_PROXY+HTTPS_PROXY required behind corporate proxies
    HTTP_PROXY
    HTTPS_PROXY
whitelist_externals = sh
deps =
    -r{toxinidir}/requirements_dev.txt
    -r{toxinidir}/requirements_continuous_integration.txt
conda_deps =
    cairosvg
    pycairo
    tk
conda_channels :
    conda-forge
    anaconda
changedir = {toxinidir}
    python -m jupyter nbextension install --py --sys-prefix widgetsnbextension
    python -m jupyter nbextension enable --py --sys-prefix widgetsnbextension
    python -m jupyter nbextension install --py --sys-prefix jpy_canvas
    python -m jupyter nbextension enable --py --sys-prefix jpy_canvas
    python -m jupyter notebook
spmohanty's avatar
spmohanty committed
[testenv]
setenv =
    PYTHONPATH = {toxinidir}
passenv =
    DISPLAY
    XAUTHORITY
; HTTP_PROXY+HTTPS_PROXY required behind corporate proxies
    HTTP_PROXY
    HTTPS_PROXY
conda_deps =
    cairosvg
    pycairo
    tk
conda_channels :
    conda-forge
    anaconda
deps =
    -r{toxinidir}/requirements_dev.txt
; run tests from subfolder to ensure that resources are accessed via resources and not via relative paths
changedir = {envtmpdir}/fefed3ba12bf1ed81dbcc20fb52706ea
commands =
    python --version
    python -m pytest --basetemp={envtmpdir} {toxinidir}

[testenv:py37]
; exclude py37 from Windows because of incompatibility the pycairo installed through conda for py37
platform = linux|linux2|darwin
spmohanty's avatar
spmohanty committed
setenv =
    PYTHONPATH = {toxinidir}
u214892's avatar
u214892 committed
passenv =
    DISPLAY
u214892's avatar
u214892 committed
    XAUTHORITY
u214892's avatar
u214892 committed
; HTTP_PROXY+HTTPS_PROXY required behind corporate proxies
    HTTP_PROXY
    HTTPS_PROXY
spmohanty's avatar
spmohanty committed
deps =
    -r{toxinidir}/requirements_dev.txt
; run tests from subfolder to ensure that resources are accessed via resources and not via relative paths
changedir = {envtmpdir}/fefed3ba12bf1ed81dbcc20fb52706ea
commands =
    python --version
    python -m pytest --basetemp={envtmpdir} {toxinidir}