forked from open-telemetry/opentelemetry-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
266 lines (213 loc) · 10.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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
[tox]
skipsdist = True
skip_missing_interpreters = True
envlist =
; Environments are organized by individual package, allowing
; for specifying supported Python versions per package.
; opentelemetry-api
py3{6,7,8,9}-test-core-api
pypy3-test-core-api
; opentelemetry-proto
py3{6,7,8,9}-test-core-proto
pypy3-test-core-proto
; opentelemetry-sdk
py3{6,7,8,9}-test-core-sdk
pypy3-test-core-sdk
; opentelemetry-instrumentation
py3{6,7,8,9}-test-core-instrumentation
pypy3-test-core-instrumentation
; docs/getting-started
py3{6,7,8,9}-test-core-getting-started
pypy3-test-core-getting-started
; opentelemetry-distro
py3{6,7,8,9}-test-core-distro
pypy3-test-core-distro
; opentelemetry-exporter-jaeger
py3{6,7,8,9}-test-exporter-jaeger-combined
; opentelemetry-exporter-jaeger-proto-grpc
py3{6,7,8,9}-test-exporter-jaeger-proto-grpc
; opentelemetry-exporter-jaeger-thrift
py3{6,7,8,9}-test-exporter-jaeger-thrift
; opentelemetry-exporter-opencensus
py3{6,7,8,9}-test-exporter-opencensus
; exporter-opencensus intentionally excluded from pypy3
; opentelemetry-exporter-otlp-combined
py3{6,7,8,9}-test-exporter-otlp-combined
; intentionally excluded from pypy3
; opentelemetry-exporter-otlp-proto-grpc
py3{6,7,8,9}-test-exporter-otlp-proto-grpc
; intentionally excluded from pypy3
; opentelemetry-exporter-zipkin
py3{6,7,8,9}-test-exporter-zipkin-combined
pypy3-test-exporter-zipkin-combined
; opentelemetry-exporter-zipkin-proto-http
py3{6,7,8,9}-test-exporter-zipkin-proto-http
pypy3-test-exporter-zipkin-proto-http
; opentelemetry-exporter-zipkin-json
py3{6,7,8,9}-test-exporter-zipkin-json
pypy3-test-exporter-zipkin-json
; opentelemetry-opentracing-shim
py3{6,7,8,9}-test-core-opentracing-shim
pypy3-test-core-opentracing-shim
; opentelemetry-propagator-b3
py3{6,7,8,9}-test-propagator-b3
pypy3-test-propagator-b3
; opentelemetry-propagator-jaeger
py3{6,7,8,9}-test-propagator-jaeger
pypy3-test-propagator-jaeger
lint
tracecontext
mypy,mypyinstalled
docs
docker-tests
[testenv]
deps =
-c dev-requirements.txt
test: pytest
test: pytest-benchmark
coverage: pytest
coverage: pytest-cov
mypy,mypyinstalled: mypy
setenv = mypy: MYPYPATH={toxinidir}/opentelemetry-api/src/
changedir =
test-core-api: opentelemetry-api/tests
test-core-sdk: opentelemetry-sdk/tests
test-core-proto: opentelemetry-proto/tests
test-core-instrumentation: opentelemetry-instrumentation/tests
test-core-getting-started: docs/getting_started/tests
test-core-opentracing-shim: shim/opentelemetry-opentracing-shim/tests
test-core-distro: opentelemetry-distro/tests
test-exporter-jaeger-combined: exporter/opentelemetry-exporter-jaeger/tests
test-exporter-jaeger-proto-grpc: exporter/opentelemetry-exporter-jaeger-proto-grpc/tests
test-exporter-jaeger-thrift: exporter/opentelemetry-exporter-jaeger-thrift/tests
test-exporter-opencensus: exporter/opentelemetry-exporter-opencensus/tests
test-exporter-otlp-combined: exporter/opentelemetry-exporter-otlp/tests
test-exporter-otlp-proto-grpc: exporter/opentelemetry-exporter-otlp-proto-grpc/tests
test-exporter-zipkin-combined: exporter/opentelemetry-exporter-zipkin/tests
test-exporter-zipkin-proto-http: exporter/opentelemetry-exporter-zipkin-proto-http/tests
test-exporter-zipkin-json: exporter/opentelemetry-exporter-zipkin-json/tests
test-propagator-b3: propagator/opentelemetry-propagator-b3/tests
test-propagator-jaeger: propagator/opentelemetry-propagator-jaeger/tests
commands_pre =
; Install without -e to test the actual installation
py3{6,7,8,9}: python -m pip install -U pip setuptools wheel
; Install common packages for all the tests. These are not needed in all the
; cases but it saves a lot of boilerplate in this file.
test: pip install {toxinidir}/opentelemetry-api {toxinidir}/opentelemetry-instrumentation {toxinidir}/opentelemetry-sdk {toxinidir}/tests/util
test-core-proto: pip install {toxinidir}/opentelemetry-proto
distro: pip install {toxinidir}/opentelemetry-distro {toxinidir}/opentelemetry-distro
instrumentation: pip install {toxinidir}/opentelemetry-instrumentation
getting-started: pip install -e {toxinidir}/opentelemetry-instrumentation -e {toxinidir}/opentelemetry-python-contrib/instrumentation/opentelemetry-instrumentation-requests {toxinidir}/opentelemetry-python-contrib/util/opentelemetry-util-http -e {toxinidir}/opentelemetry-python-contrib/instrumentation/opentelemetry-instrumentation-wsgi -e {toxinidir}/opentelemetry-python-contrib/instrumentation/opentelemetry-instrumentation-flask
opencensus: pip install {toxinidir}/exporter/opentelemetry-exporter-opencensus
exporter-otlp-combined: pip install {toxinidir}/opentelemetry-proto
exporter-otlp-combined: pip install {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-grpc
exporter-otlp-combined: pip install {toxinidir}/exporter/opentelemetry-exporter-otlp
exporter-otlp-proto-grpc: pip install {toxinidir}/opentelemetry-proto
exporter-otlp-proto-grpc: pip install {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-grpc
exporter-jaeger-combined: pip install {toxinidir}/exporter/opentelemetry-exporter-jaeger-proto-grpc {toxinidir}/exporter/opentelemetry-exporter-jaeger-thrift {toxinidir}/exporter/opentelemetry-exporter-jaeger
exporter-jaeger-proto-grpc: pip install {toxinidir}/exporter/opentelemetry-exporter-jaeger-proto-grpc
exporter-jaeger-thrift: pip install {toxinidir}/exporter/opentelemetry-exporter-jaeger-thrift
opentracing-shim: pip install {toxinidir}/opentelemetry-sdk
opentracing-shim: pip install {toxinidir}/shim/opentelemetry-opentracing-shim
exporter-zipkin-combined: pip install {toxinidir}/exporter/opentelemetry-exporter-zipkin-json
exporter-zipkin-combined: pip install {toxinidir}/exporter/opentelemetry-exporter-zipkin-proto-http
exporter-zipkin-combined: pip install {toxinidir}/exporter/opentelemetry-exporter-zipkin
exporter-zipkin-proto-http: pip install {toxinidir}/exporter/opentelemetry-exporter-zipkin-json
exporter-zipkin-proto-http: pip install {toxinidir}/exporter/opentelemetry-exporter-zipkin-proto-http
exporter-zipkin-json: pip install {toxinidir}/exporter/opentelemetry-exporter-zipkin-json
b3: pip install {toxinidir}/propagator/opentelemetry-propagator-b3
propagator-jaeger: pip install {toxinidir}/propagator/opentelemetry-propagator-jaeger
; 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 --explicit-package-bases 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.8
recreate = True
deps =
-c dev-requirements.txt
asgiref
pylint
flake8
isort
black
psutil
readme_renderer
httpretty
commands_pre =
python -m pip install -e {toxinidir}/opentelemetry-api[test]
python -m pip install -e {toxinidir}/opentelemetry-instrumentation[test]
python -m pip install -e {toxinidir}/opentelemetry-sdk[test]
python -m pip install -e {toxinidir}/opentelemetry-proto[test]
python -m pip install -e {toxinidir}/tests/util[test]
python -m pip install -e {toxinidir}/shim/opentelemetry-opentracing-shim[test]
python -m pip install -e {toxinidir}/exporter/opentelemetry-exporter-jaeger-proto-grpc[test]
python -m pip install -e {toxinidir}/exporter/opentelemetry-exporter-jaeger-thrift[test]
python -m pip install -e {toxinidir}/exporter/opentelemetry-exporter-jaeger[test]
python -m pip install -e {toxinidir}/exporter/opentelemetry-exporter-opencensus[test]
python -m pip install -e {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-grpc[test]
python -m pip install -e {toxinidir}/exporter/opentelemetry-exporter-otlp[test]
python -m pip install -e {toxinidir}/exporter/opentelemetry-exporter-zipkin-json[test]
python -m pip install -e {toxinidir}/exporter/opentelemetry-exporter-zipkin-proto-http[test]
python -m pip install -e {toxinidir}/exporter/opentelemetry-exporter-zipkin[test]
python -m pip install -e {toxinidir}/propagator/opentelemetry-propagator-b3[test]
python -m pip install -e {toxinidir}/propagator/opentelemetry-propagator-jaeger[test]
python -m pip install -e {toxinidir}/opentelemetry-distro[test]
commands =
python scripts/eachdist.py lint --check-only
[testenv:docs]
recreate = True
deps =
-c {toxinidir}/dev-requirements.txt
-r {toxinidir}/docs-requirements.txt
changedir = docs
commands =
sphinx-build -E -a -W -b html -T . _build/html
[testenv:tracecontext]
basepython: python3.9
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-instrumentation \
-e {toxinidir}/opentelemetry-sdk \
-e {toxinidir}/opentelemetry-python-contrib/instrumentation/opentelemetry-instrumentation-requests \
-e {toxinidir}/opentelemetry-python-contrib/instrumentation/opentelemetry-instrumentation-wsgi \
-e {toxinidir}/opentelemetry-python-contrib/util/opentelemetry-util-http
commands =
{toxinidir}/scripts/tracecontext-integration-test.sh
[testenv:docker-tests]
deps =
pytest
docker-compose >= 1.25.2
changedir =
tests/opentelemetry-docker-tests/tests
commands_pre =
pip install -e {toxinidir}/opentelemetry-api \
-e {toxinidir}/opentelemetry-instrumentation \
-e {toxinidir}/opentelemetry-sdk \
-e {toxinidir}/tests/util \
-e {toxinidir}/exporter/opentelemetry-exporter-opencensus \
-e {toxinidir}/opentelemetry-proto \
-e {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-grpc \
-e {toxinidir}/exporter/opentelemetry-exporter-otlp
docker-compose up -d
commands =
pytest {posargs}
commands_post =
docker-compose down -v