forked from spotify/luigi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
143 lines (135 loc) · 4.5 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
[tox]
envlist = py{35,36,37,38,39}-{cdh,hdp,core,contrib,apache,aws,gcloud,postgres,unixsocket,azureblob,dropbox}, visualiser, docs, flake8
skipsdist = True
[pytest]
addopts = --cov=luigi -vv --strict-markers --ignore-glob="**/_*" --fulltrace
testpaths = test
markers =
contrib: tests related to luigi/contrib
apache: tests related to apache
aws: tests related to AWS
postgres: tests related to postgresql
mysql: tests related to mysql
scheduler: tests related to scheduler
cdh: tests related to cdh
hdp: tests related to hdp
gcloud: tests related to GCP
unixsocket: tests related to unixsocket
dropbox: tests related to dropbox
azureblob: tests related to azure
[testenv]
usedevelop = True
install_command = pip install {opts} {packages}
deps =
pytest<7.0
pytest-cov>=2.0,<3.0
mock<2.0
moto>=1.3.10
HTTPretty==0.8.10
docker>=2.1.0
boto>=2.42,<3.0
boto3>=1.11.0
pyhive[presto]==0.6.1
s3transfer>=0.3,<4.0
sqlalchemy<1.4
elasticsearch>=1.0.0,<2.0.0
psutil<4.0
cdh,hdp: hdfs>=2.0.4,<3.0.0
postgres: psycopg2<3.0
mysql-connector-python>=8.0.12
gcloud: google-api-python-client>=1.6.6,<2.0
avro-python3
gcloud: google-auth==1.4.1
gcloud: google-auth-httplib2==0.0.3
google-compute-engine
coverage>=5.0,<6
codecov>=1.4.0
requests>=2.20.0,<3.0
unixsocket: requests-unixsocket<1.0
pygments
hypothesis>=6.7.0,<7.0.0
selenium==3.0.2
pymongo==3.4.0
toml<2.0.0
responses<1.0.0
azure-storage<=0.36
datadog==0.22.0
prometheus-client==0.5.0
dropbox: dropbox>=9.3.0<10.0
passenv =
USER JAVA_HOME POSTGRES_USER DATAPROC_TEST_PROJECT_ID GCS_TEST_PROJECT_ID GCS_TEST_BUCKET GOOGLE_APPLICATION_CREDENTIALS TRAVIS_BUILD_ID TRAVIS TRAVIS_BRANCH TRAVIS_JOB_NUMBER TRAVIS_PULL_REQUEST TRAVIS_JOB_ID TRAVIS_REPO_SLUG TRAVIS_COMMIT CI DROPBOX_APP_TOKEN DOCKERHUB_TOKEN GITHUB_ACTIONS OVERRIDE_SKIP_CI_TESTS
setenv =
LC_ALL = en_US.utf-8
cdh: HADOOP_DISTRO=cdh
cdh: HADOOP_HOME={toxinidir}/.tox/hadoop-cdh
hdp: HADOOP_DISTRO=hdp
hdp: HADOOP_HOME={toxinidir}/.tox/hadoop-hdp
LUIGI_CONFIG_PATH={toxinidir}/test/testconfig/luigi.cfg
COVERAGE_PROCESS_START={toxinidir}/.coveragerc
FULL_COVERAGE=true
AWS_DEFAULT_REGION=us-east-1
AWS_ACCESS_KEY_ID=accesskey
AWS_SECRET_ACCESS_KEY=secretkey
commands =
cdh,hdp: {toxinidir}/scripts/ci/setup_hadoop_env.sh
azureblob: {toxinidir}/scripts/ci/install_start_azurite.sh {toxinidir}/scripts/ci
python --version
## main commands
contrib: python test/runtests.py -m contrib {posargs:}
apache: python test/runtests.py -m apache {posargs:}
aws: python test/runtests.py -m aws {posargs:}
postgres: python test/runtests.py -m postgres {posargs:}
scheduler: python test/runtests.py -m scheduler {posargs:}
cdh,hdp: python test/runtests.py -m minicluster {posargs:}
gcloud: python test/runtests.py -m gcloud {posargs:}
unixsocket: python test/runtests.py -m unixsocket {posargs:}
dropbox: python test/runtests.py -m dropbox {posargs:}
azureblob: python test/runtests.py -m azureblob {posargs:}
core: python test/runtests.py --doctest-modules -m "not minicluster and not gcloud and not postgres and not unixsocket and not contrib and not apache and not aws and not azureblob and not dropbox" {posargs:}
##
azureblob: {toxinidir}/scripts/ci/stop_azurite.sh
[testenv:visualiser]
usedevelop = True
deps =
mock<2.0
selenium==3.0.2
passenv = {[testenv]passenv}
setenv =
LC_ALL = en_US.utf-8
LUIGI_CONFIG_PATH={toxinidir}/test/testconfig/luigi.cfg
TEST_VISUALISER=1
commands =
python --version
pytest test/visualiser
# Flake8 Configuration, inspired from https://gitlab.com/pycqa/flake8/blob/master/tox.ini
# By putting it here, local flake8 runs will also pick it up.
[flake8]
max-line-length = 160
builtins = unicode
[testenv:flake8]
basepython=python3
deps =
flake8>=3.2.0
commands =
flake8 --exclude=doc,.tox
flake8 --max-line-length=100 --ignore=E265 doc
[testenv:isort]
basepython=python3
deps = isort
commands = isort -w 120 -rc luigi test examples bin
[testenv:docs]
basepython=python3
# Build documentation using sphinx.
# Call this using `tox -e docs`.
deps =
sqlalchemy
boto3
Sphinx>=1.4.4,<1.5
sphinx_rtd_theme
azure-storage<=0.36
prometheus-client==0.5.0
commands =
# build API docs
sphinx-apidoc -o doc/api -T luigi --separate
# build HTML docs
sphinx-build -W -b html -d {envtmpdir}/doctrees doc doc/_build/html