forked from open-telemetry/opentelemetry-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
154 lines (131 loc) · 5.68 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
144
145
146
147
148
149
150
151
152
153
154
[tox]
skipsdist = True
skip_missing_interpreters = True
envlist =
py3{4,5,6,7,8}-test-{api,sdk,example-app,ext-wsgi,ext-flask,ext-http-requests,ext-jaeger,ext-dbapi,ext-mysql,ext-pymongo,ext-zipkin,opentracing-shim}
pypy3-test-{api,sdk,example-app,ext-wsgi,ext-flask,ext-http-requests,ext-jaeger,ext-dbapi,ext-mysql,ext-pymongo,ext-zipkin,opentracing-shim}
py3{4,5,6,7,8}-test-{api,sdk,example-app,example-basic-tracer,example-http,ext-wsgi,ext-flask,ext-http-requests,ext-jaeger,ext-dbapi,ext-mysql,ext-pymongo,ext-zipkin,opentracing-shim}
pypy3-test-{api,sdk,example-app,example-basic-tracer,example-http,ext-wsgi,ext-flask,ext-http-requests,ext-jaeger,ext-dbapi,ext-mysql,ext-pymongo,ext-zipkin,opentracing-shim}
py3{4,5,6,7,8}-coverage
; Coverage is temporarily disabled for pypy3 due to the pytest bug.
; pypy3-coverage
lint
py37-tracecontext
py37-{mypy,mypyinstalled}
docs
[travis]
python =
3.7: py37, lint, docs
[testenv]
deps =
-c dev-requirements.txt
test: pytest
coverage: pytest
coverage: pytest-cov
mypy,mypyinstalled: mypy
setenv =
mypy: MYPYPATH={toxinidir}/opentelemetry-api/src/
changedir =
test-api: opentelemetry-api/tests
test-sdk: opentelemetry-sdk/tests
test-ext-http-requests: ext/opentelemetry-ext-http-requests/tests
test-ext-jaeger: ext/opentelemetry-ext-jaeger/tests
test-ext-dbapi: ext/opentelemetry-ext-dbapi/tests
test-ext-mysql: ext/opentelemetry-ext-mysql/tests
test-ext-pymongo: ext/opentelemetry-ext-pymongo/tests
test-ext-wsgi: ext/opentelemetry-ext-wsgi/tests
test-ext-zipkin: ext/opentelemetry-ext-zipkin/tests
test-ext-flask: ext/opentelemetry-ext-flask/tests
test-example-app: examples/opentelemetry-example-app/tests
test-example-basic-tracer: examples/basic_tracer/tests
test-example-http: examples/http/tests
test-opentracing-shim: ext/opentelemetry-ext-opentracing-shim/tests
commands_pre =
; Install without -e to test the actual installation
python -m pip install -U pip setuptools wheel
test: pip install {toxinidir}/opentelemetry-api
test-sdk: pip install {toxinidir}/opentelemetry-sdk
example-app: pip install {toxinidir}/opentelemetry-sdk
example-app: pip install {toxinidir}/ext/opentelemetry-ext-http-requests
example-app: pip install {toxinidir}/ext/opentelemetry-ext-wsgi
example-app: pip install {toxinidir}/ext/opentelemetry-ext-flask
example-app: pip install {toxinidir}/examples/opentelemetry-example-app
example-basic-tracer: pip install -e {toxinidir}/opentelemetry-api
example-basic-tracer: pip install -e {toxinidir}/opentelemetry-sdk
example-http: pip install -e {toxinidir}/opentelemetry-api
example-http: pip install -e {toxinidir}/opentelemetry-sdk
example-http: pip install -e {toxinidir}/ext/opentelemetry-ext-http-requests
example-http: pip install -e {toxinidir}/ext/opentelemetry-ext-wsgi
example-http: pip install -r {toxinidir}/examples/http/requirements.txt
ext: pip install {toxinidir}/opentelemetry-api
wsgi,flask: pip install {toxinidir}/ext/opentelemetry-ext-testutil
wsgi,flask: pip install {toxinidir}/ext/opentelemetry-ext-wsgi
wsgi,flask: pip install {toxinidir}/opentelemetry-sdk
flask: pip install {toxinidir}/ext/opentelemetry-ext-flask[test]
dbapi: pip install {toxinidir}/ext/opentelemetry-ext-dbapi
mysql: pip install {toxinidir}/ext/opentelemetry-ext-dbapi
mysql: pip install {toxinidir}/ext/opentelemetry-ext-mysql
pymongo: pip install {toxinidir}/ext/opentelemetry-ext-pymongo
http-requests: pip install {toxinidir}/ext/opentelemetry-ext-http-requests
jaeger: pip install {toxinidir}/opentelemetry-sdk
jaeger: pip install {toxinidir}/ext/opentelemetry-ext-jaeger
opentracing-shim: pip install {toxinidir}/opentelemetry-sdk {toxinidir}/ext/opentelemetry-ext-opentracing-shim
zipkin: pip install {toxinidir}/ext/opentelemetry-ext-zipkin
; In order to get a healthy coverage report,
; we have to install packages in editable mode.
coverage: python {toxinidir}/scripts/eachdist.py install --editable
; Using file:// here because otherwise tox invokes just "pip install
; opentelemetry-api", leading to an error
mypyinstalled: pip install file://{toxinidir}/opentelemetry-api/
commands =
test: pytest {posargs}
coverage: {toxinidir}/scripts/coverage.sh
mypy: mypy --namespace-packages opentelemetry-api/src/opentelemetry/
; For test code, we don't want to enforce the full mypy strictness
mypy: mypy --namespace-packages --config-file=mypy-relaxed.ini opentelemetry-api/tests/
; Test that mypy can pick up typeinfo from an installed package (otherwise,
; implicit Any due to unfollowed import would result).
mypyinstalled: mypy --namespace-packages opentelemetry-api/tests/mypysmoke.py --strict
[testenv:lint]
basepython: python3.7
recreate = True
deps =
-c dev-requirements.txt
pylint
flake8
isort
black
commands_pre =
python scripts/eachdist.py install --editable
commands =
python scripts/eachdist.py lint --check-only
[testenv:docs]
deps =
-c dev-requirements.txt
sphinx
sphinx-rtd-theme
sphinx-autodoc-typehints
opentracing~=2.2.0
Deprecated>=1.2.6
thrift>=0.10.0
pymongo ~= 3.1
flask~=1.0
changedir = docs
commands =
sphinx-build -E -a -W --keep-going -b html -T . _build/html
[testenv:py37-tracecontext]
basepython: python3.7
deps =
# needed for tracecontext
aiohttp~=3.6
# needed for example trace integration
flask~=1.1
requests~=2.7
commands_pre =
pip install -e {toxinidir}/opentelemetry-api \
-e {toxinidir}/opentelemetry-sdk \
-e {toxinidir}/ext/opentelemetry-ext-http-requests \
-e {toxinidir}/ext/opentelemetry-ext-wsgi \
-e {toxinidir}/ext/opentelemetry-ext-flask
commands =
{toxinidir}/scripts/tracecontext-integration-test.sh