forked from open-telemetry/opentelemetry-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
447 lines (356 loc) · 26.6 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
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
[tox]
isolated_build = True
skipsdist = True
skip_missing_interpreters = True
envlist =
; Environments are organized by individual package, allowing
; for specifying supported Python versions per package.
py3{8,9,10,11,12}-test-opentelemetry-api
pypy3-test-opentelemetry-api
lint-opentelemetry-api
; The numbers at the end of the environment names
; below mean these dependencies are being used:
; 0: protobuf==3.20.3
; 1: protobuf==4.25.3
py3{8,9,10,11,12}-test-opentelemetry-proto-{0,1}
pypy3-test-opentelemetry-proto-{0,1}
lint-opentelemetry-proto
py3{8,9,10,11,12}-test-opentelemetry-sdk
pypy3-test-opentelemetry-sdk
lint-opentelemetry-sdk
benchmark-opentelemetry-sdk
py3{8,9,10,11,12}-test-opentelemetry-semantic-conventions
pypy3-test-opentelemetry-semantic-conventions
lint-opentelemetry-semantic-conventions
py3{8,9,10,11,12}-test-opentelemetry-getting-started
lint-opentelemetry-getting-started
py3{8,9,10,11,12}-test-opentelemetry-opentracing-shim
pypy3-test-opentelemetry-opentracing-shim
lint-opentelemetry-opentracing-shim
py3{8,9,10,11,12}-test-opentelemetry-opencensus-shim
; opencensus-shim intentionally excluded from pypy3 (grpcio install fails)
lint-opentelemetry-opencensus-shim
py3{8,9,10,11,12}-test-opentelemetry-exporter-opencensus
; exporter-opencensus intentionally excluded from pypy3
lint-opentelemetry-exporter-opencensus
; The numbers at the end of the environment names
; below mean these dependencies are being used:
; 0: protobuf==3.20.3
; 1: protobuf==4.25.3
py3{8,9,10,11,12}-test-opentelemetry-exporter-otlp-proto-common-{0,1}
pypy3-test-opentelemetry-exporter-otlp-proto-common-{0,1}
lint-opentelemetry-exporter-otlp-proto-common
; opentelemetry-exporter-otlp
py3{8,9,10,11,12}-test-opentelemetry-exporter-otlp-combined
; intentionally excluded from pypy3
lint-opentelemetry-exporter-otlp-combined
; The numbers at the end of the environment names
; below mean these dependencies are being used:
; 0: protobuf==3.20.3
; 1: protobuf==4.25.3
py3{8,9,10,11,12}-test-opentelemetry-exporter-otlp-proto-grpc-{0,1}
; intentionally excluded from pypy3
lint-opentelemetry-exporter-otlp-proto-grpc
benchmark-opentelemetry-exporter-otlp-proto-grpc
; The numbers at the end of the environment names
; below mean these dependencies are being used:
; 0: protobuf==3.20.3
; 1: protobuf==4.25.3
py3{8,9,10,11,12}-test-opentelemetry-exporter-otlp-proto-http-{0,1}
pypy3-test-opentelemetry-exporter-otlp-proto-http-{0,1}
lint-opentelemetry-exporter-otlp-proto-http
py3{8,9,10,11,12}-test-opentelemetry-exporter-prometheus
pypy3-test-opentelemetry-exporter-prometheus
lint-opentelemetry-exporter-prometheus
; opentelemetry-exporter-zipkin
py3{8,9,10,11,12}-test-opentelemetry-exporter-zipkin-combined
pypy3-test-opentelemetry-exporter-zipkin-combined
lint-opentelemetry-exporter-zipkin-combined
py3{8,9,10,11,12}-test-opentelemetry-exporter-zipkin-proto-http
pypy3-test-opentelemetry-exporter-zipkin-proto-http
lint-opentelemetry-exporter-zipkin-proto-http
py3{8,9,10,11,12}-test-opentelemetry-exporter-zipkin-json
pypy3-test-opentelemetry-exporter-zipkin-json
lint-opentelemetry-exporter-zipkin-json
py3{8,9,10,11,12}-test-opentelemetry-propagator-b3
pypy3-test-opentelemetry-propagator-b3
lint-opentelemetry-propagator-b3
benchmark-opentelemetry-propagator-b3
py3{8,9,10,11,12}-test-opentelemetry-propagator-jaeger
pypy3-test-opentelemetry-propagator-jaeger
lint-opentelemetry-propagator-jaeger
py3{8,9,10,11,12}-test-opentelemetry-test-utils
pypy3-test-opentelemetry-test-utils
lint-opentelemetry-test-utils
spellcheck
tracecontext
mypy,mypyinstalled
docs
docker-tests-proto{3,4}
public-symbols-check
shellcheck
generate-workflows
[testenv]
deps =
lint: -r dev-requirements.txt
coverage: pytest
coverage: pytest-cov
; proto 3 and 4 tests install the respective version of protobuf
proto3: protobuf~=3.19.0
proto4: protobuf~=4.0
allowlist_externals = sh
setenv =
; override CONTRIB_REPO_SHA via env variable when testing other branches/commits than main
; i.e: CONTRIB_REPO_SHA=dde62cebffe519c35875af6d06fae053b3be65ec tox -e <env to test>
CONTRIB_REPO_SHA={env:CONTRIB_REPO_SHA:main}
CONTRIB_REPO=git+https://github.com/open-telemetry/opentelemetry-python-contrib.git@{env:CONTRIB_REPO_SHA}
mypy: MYPYPATH={toxinidir}/opentelemetry-api/src/:{toxinidir}/opentelemetry-semantic-conventions/src/:{toxinidir}/opentelemetry-sdk/src/:{toxinidir}/tests/opentelemetry-test-utils/src/
commands_pre =
mypy,mypyinstalled: pip install -r {toxinidir}/mypy-requirements.txt
api: pip install -r {toxinidir}/opentelemetry-api/test-requirements.txt
sdk: pip install -r {toxinidir}/opentelemetry-sdk/test-requirements.txt
benchmark-opentelemetry-sdk: pip install -r {toxinidir}/opentelemetry-sdk/benchmark-requirements.txt
semantic-conventions: pip install -r {toxinidir}/opentelemetry-semantic-conventions/test-requirements.txt
test-utils: pip install -r {toxinidir}/tests/opentelemetry-test-utils/test-requirements.txt
opentelemetry-proto-0: pip install -r {toxinidir}/opentelemetry-proto/test-requirements-0.txt
opentelemetry-proto-1: pip install -r {toxinidir}/opentelemetry-proto/test-requirements-1.txt
lint-opentelemetry-proto: pip install -r {toxinidir}/opentelemetry-proto/test-requirements-1.txt
getting-started: pip install -r {toxinidir}/docs/getting_started/tests/requirements.txt
getting-started: pip install -e {env:CONTRIB_REPO}\#egg=opentelemetry-util-http&subdirectory=util/opentelemetry-util-http
getting-started: pip install -e {env:CONTRIB_REPO}\#egg=opentelemetry-instrumentation&subdirectory=opentelemetry-instrumentation
getting-started: pip install -e {env:CONTRIB_REPO}\#egg=opentelemetry-instrumentation-requests&subdirectory=instrumentation/opentelemetry-instrumentation-requests
getting-started: pip install -e {env:CONTRIB_REPO}\#egg=opentelemetry-instrumentation-wsgi&subdirectory=instrumentation/opentelemetry-instrumentation-wsgi
getting-started: pip install -e {env:CONTRIB_REPO}\#egg=opentelemetry-instrumentation-flask&subdirectory=instrumentation/opentelemetry-instrumentation-flask
exporter-opencensus: pip install -r {toxinidir}/exporter/opentelemetry-exporter-opencensus/test-requirements.txt
exporter-otlp-proto-common-0: pip install -r {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-common/test-requirements-0.txt
exporter-otlp-proto-common-1: pip install -r {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-common/test-requirements-1.txt
lint-opentelemetry-exporter-otlp-proto-common: pip install -r {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-common/test-requirements-1.txt
exporter-otlp-combined: pip install -r {toxinidir}/exporter/opentelemetry-exporter-otlp/test-requirements.txt
opentelemetry-exporter-otlp-proto-grpc-0: pip install -r {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-grpc/test-requirements-0.txt
opentelemetry-exporter-otlp-proto-grpc-1: pip install -r {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-grpc/test-requirements-1.txt
lint-opentelemetry-exporter-otlp-proto-grpc: pip install -r {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-grpc/test-requirements-1.txt
benchmark-exporter-otlp-proto-grpc: pip install -r {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-grpc/benchmark-requirements.txt
opentelemetry-exporter-otlp-proto-http-0: pip install -r {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-http/test-requirements-0.txt
opentelemetry-exporter-otlp-proto-http-1: pip install -r {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-http/test-requirements-1.txt
lint-opentelemetry-exporter-otlp-proto-http: pip install -r {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-http/test-requirements-1.txt
opentracing-shim: pip install -r {toxinidir}/shim/opentelemetry-opentracing-shim/test-requirements.txt
opencensus-shim: pip install -r {toxinidir}/shim/opentelemetry-opencensus-shim/test-requirements.txt
exporter-prometheus: pip install -r {toxinidir}/exporter/opentelemetry-exporter-prometheus/test-requirements.txt
exporter-zipkin-combined: pip install -r {toxinidir}/exporter/opentelemetry-exporter-zipkin/test-requirements.txt
exporter-zipkin-proto-http: pip install -r {toxinidir}/exporter/opentelemetry-exporter-zipkin-proto-http/test-requirements.txt
exporter-zipkin-json: pip install -r {toxinidir}/exporter/opentelemetry-exporter-zipkin-json/test-requirements.txt
propagator-b3: pip install -r {toxinidir}/propagator/opentelemetry-propagator-b3/test-requirements.txt
benchmark-opentelemetry-propagator-b3: pip install -r {toxinidir}/propagator/opentelemetry-propagator-b3/benchmark-requirements.txt
propagator-jaeger: pip install -r {toxinidir}/propagator/opentelemetry-propagator-jaeger/test-requirements.txt
; 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-opentelemetry-api: pytest {toxinidir}/opentelemetry-api/tests {posargs}
lint-opentelemetry-api: black --diff --check --config {toxinidir}/pyproject.toml {toxinidir}/opentelemetry-api
lint-opentelemetry-api: isort --diff --check-only --settings-path {toxinidir}/.isort.cfg {toxinidir}/opentelemetry-api
lint-opentelemetry-api: flake8 --config {toxinidir}/.flake8 {toxinidir}/opentelemetry-api
lint-opentelemetry-api: pylint {toxinidir}/opentelemetry-api
test-opentelemetry-sdk: pytest {toxinidir}/opentelemetry-sdk/tests {posargs}
lint-opentelemetry-sdk: black --diff --check --config {toxinidir}/pyproject.toml {toxinidir}/opentelemetry-sdk
lint-opentelemetry-sdk: isort --diff --check-only --settings-path {toxinidir}/.isort.cfg {toxinidir}/opentelemetry-sdk
lint-opentelemetry-sdk: flake8 --config {toxinidir}/.flake8 {toxinidir}/opentelemetry-sdk
lint-opentelemetry-sdk: pylint {toxinidir}/opentelemetry-sdk
benchmark-opentelemetry-sdk: pytest {toxinidir}/opentelemetry-sdk/benchmarks --benchmark-json={toxinidir}/opentelemetry-sdk/sdk-benchmark.json {posargs}
test-opentelemetry-proto: pytest {toxinidir}/opentelemetry-proto/tests {posargs}
lint-opentelemetry-proto: black --diff --check --config {toxinidir}/pyproject.toml {toxinidir}/opentelemetry-proto
lint-opentelemetry-proto: isort --diff --check-only --settings-path {toxinidir}/.isort.cfg {toxinidir}/opentelemetry-proto
lint-opentelemetry-proto: flake8 --config {toxinidir}/.flake8 {toxinidir}/opentelemetry-proto
lint-opentelemetry-proto: pylint {toxinidir}/opentelemetry-proto
test-opentelemetry-semantic-conventions: pytest {toxinidir}/opentelemetry-semantic-conventions/tests {posargs}
lint-opentelemetry-semantic-conventions: black --diff --check --config {toxinidir}/pyproject.toml {toxinidir}/opentelemetry-semantic-conventions
lint-opentelemetry-semantic-conventions: isort --diff --check-only --settings-path {toxinidir}/.isort.cfg {toxinidir}/opentelemetry-semantic-conventions
lint-opentelemetry-semantic-conventions: flake8 --config {toxinidir}/.flake8 {toxinidir}/opentelemetry-semantic-conventions
lint-opentelemetry-semantic-conventions: pylint {toxinidir}/opentelemetry-semantic-conventions
test-opentelemetry-getting-started: pytest {toxinidir}/docs/getting_started/tests {posargs}
lint-opentelemetry-getting-started: black --diff --check --config {toxinidir}/pyproject.toml {toxinidir}/docs/getting_started
lint-opentelemetry-getting-started: isort --diff --check-only --settings-path {toxinidir}/.isort.cfg {toxinidir}/docs/getting_started
lint-opentelemetry-getting-started: flake8 --config {toxinidir}/.flake8 {toxinidir}/docs/getting_started
lint-opentelemetry-getting-started: pylint {toxinidir}/docs/getting_started
test-opentelemetry-opentracing-shim: pytest {toxinidir}/shim/opentelemetry-opentracing-shim/tests {posargs}
lint-opentelemetry-opentracing-shim: black --diff --check --config {toxinidir}/pyproject.toml {toxinidir}/shim/opentelemetry-opentracing-shim
lint-opentelemetry-opentracing-shim: isort --diff --check-only --settings-path {toxinidir}/.isort.cfg {toxinidir}/shim/opentelemetry-opentracing-shim
lint-opentelemetry-opentracing-shim: flake8 --config {toxinidir}/.flake8 {toxinidir}/shim/opentelemetry-opentracing-shim
lint-opentelemetry-opentracing-shim: sh -c "cd shim && pylint --rcfile ../.pylintrc {toxinidir}/shim/opentelemetry-opentracing-shim"
test-opentelemetry-opencensus-shim: pytest {toxinidir}/shim/opentelemetry-opencensus-shim/tests {posargs}
lint-opentelemetry-opencensus-shim: black --diff --check --config {toxinidir}/pyproject.toml {toxinidir}/shim/opentelemetry-opencensus-shim
lint-opentelemetry-opencensus-shim: isort --diff --check-only --settings-path {toxinidir}/.isort.cfg {toxinidir}/shim/opentelemetry-opencensus-shim
lint-opentelemetry-opencensus-shim: flake8 --config {toxinidir}/.flake8 {toxinidir}/shim/opentelemetry-opencensus-shim
lint-opentelemetry-opencensus-shim: sh -c "cd shim && pylint --rcfile ../.pylintrc {toxinidir}/shim/opentelemetry-opencensus-shim"
test-opentelemetry-exporter-opencensus: pytest {toxinidir}/exporter/opentelemetry-exporter-opencensus/tests {posargs}
lint-opentelemetry-exporter-opencensus: black --diff --check --config {toxinidir}/pyproject.toml {toxinidir}/exporter/opentelemetry-exporter-opencensus
lint-opentelemetry-exporter-opencensus: isort --diff --check-only --settings-path {toxinidir}/.isort.cfg {toxinidir}/exporter/opentelemetry-exporter-opencensus
lint-opentelemetry-exporter-opencensus: flake8 --config {toxinidir}/.flake8 {toxinidir}/exporter/opentelemetry-exporter-opencensus
lint-opentelemetry-exporter-opencensus: sh -c "cd exporter && pylint --rcfile ../.pylintrc {toxinidir}/exporter/opentelemetry-exporter-opencensus"
test-opentelemetry-exporter-otlp-proto-common: pytest {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-common/tests {posargs}
lint-opentelemetry-exporter-otlp-proto-common: black --diff --check --config {toxinidir}/pyproject.toml {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-common
lint-opentelemetry-exporter-otlp-proto-common: isort --diff --check-only --settings-path {toxinidir}/.isort.cfg {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-common
lint-opentelemetry-exporter-otlp-proto-common: flake8 --config {toxinidir}/.flake8 {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-common
lint-opentelemetry-exporter-otlp-proto-common: sh -c "cd exporter && pylint --rcfile ../.pylintrc {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-common"
test-opentelemetry-exporter-otlp-combined: pytest {toxinidir}/exporter/opentelemetry-exporter-otlp/tests {posargs}
lint-opentelemetry-exporter-otlp-combined: black --diff --check --config {toxinidir}/pyproject.toml {toxinidir}/exporter/opentelemetry-exporter-otlp
lint-opentelemetry-exporter-otlp-combined: isort --diff --check-only --settings-path {toxinidir}/.isort.cfg {toxinidir}/exporter/opentelemetry-exporter-otlp
lint-opentelemetry-exporter-otlp-combined: flake8 --config {toxinidir}/.flake8 {toxinidir}/exporter/opentelemetry-exporter-otlp
lint-opentelemetry-exporter-otlp-combined: sh -c "cd exporter && pylint --rcfile ../.pylintrc {toxinidir}/exporter/opentelemetry-exporter-otlp"
test-opentelemetry-exporter-otlp-proto-grpc: pytest {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-grpc/tests {posargs}
lint-opentelemetry-exporter-otlp-proto-grpc: black --diff --check --config {toxinidir}/pyproject.toml {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-grpc
lint-opentelemetry-exporter-otlp-proto-grpc: isort --diff --check-only --settings-path {toxinidir}/.isort.cfg {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-grpc
lint-opentelemetry-exporter-otlp-proto-grpc: flake8 --config {toxinidir}/.flake8 {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-grpc
lint-opentelemetry-exporter-otlp-proto-grpc: sh -c "cd exporter && pylint --rcfile ../.pylintrc {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-grpc"
benchmark-opentelemetry-exporter-otlp-proto-grpc: pytest {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-grpc/benchmarks --benchmark-json=exporter-otlp-proto-grpc-benchmark.json {posargs}
test-opentelemetry-exporter-otlp-proto-http: pytest {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-http/tests {posargs}
lint-opentelemetry-exporter-otlp-proto-http: black --diff --check --config {toxinidir}/pyproject.toml {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-http
lint-opentelemetry-exporter-otlp-proto-http: isort --diff --check-only --settings-path {toxinidir}/.isort.cfg {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-http
lint-opentelemetry-exporter-otlp-proto-http: flake8 --config {toxinidir}/.flake8 {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-http
lint-opentelemetry-exporter-otlp-proto-http: sh -c "cd exporter && pylint --rcfile ../.pylintrc {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-http"
test-opentelemetry-exporter-prometheus: pytest {toxinidir}/exporter/opentelemetry-exporter-prometheus/tests {posargs}
lint-opentelemetry-exporter-prometheus: black --diff --check --config {toxinidir}/pyproject.toml {toxinidir}/exporter/opentelemetry-exporter-prometheus
lint-opentelemetry-exporter-prometheus: isort --diff --check-only --settings-path {toxinidir}/.isort.cfg {toxinidir}/exporter/opentelemetry-exporter-prometheus
lint-opentelemetry-exporter-prometheus: flake8 --config {toxinidir}/.flake8 {toxinidir}/exporter/opentelemetry-exporter-prometheus
lint-opentelemetry-exporter-prometheus: sh -c "cd exporter && pylint --rcfile ../.pylintrc {toxinidir}/exporter/opentelemetry-exporter-prometheus"
test-opentelemetry-exporter-zipkin-combined: pytest {toxinidir}/exporter/opentelemetry-exporter-zipkin/tests {posargs}
lint-opentelemetry-exporter-zipkin-combined: black --diff --check --config {toxinidir}/pyproject.toml {toxinidir}/exporter/opentelemetry-exporter-zipkin
lint-opentelemetry-exporter-zipkin-combined: isort --diff --check-only --settings-path {toxinidir}/.isort.cfg {toxinidir}/exporter/opentelemetry-exporter-zipkin
lint-opentelemetry-exporter-zipkin-combined: flake8 --config {toxinidir}/.flake8 {toxinidir}/exporter/opentelemetry-exporter-zipkin
lint-opentelemetry-exporter-zipkin-combined: sh -c "cd exporter && pylint --rcfile ../.pylintrc {toxinidir}/exporter/opentelemetry-exporter-zipkin"
test-opentelemetry-exporter-zipkin-proto-http: pytest {toxinidir}/exporter/opentelemetry-exporter-zipkin-proto-http/tests {posargs}
lint-opentelemetry-exporter-zipkin-proto-http: black --diff --check --config {toxinidir}/pyproject.toml {toxinidir}/exporter/opentelemetry-exporter-zipkin-proto-http
lint-opentelemetry-exporter-zipkin-proto-http: isort --diff --check-only --settings-path {toxinidir}/.isort.cfg {toxinidir}/exporter/opentelemetry-exporter-zipkin-proto-http
lint-opentelemetry-exporter-zipkin-proto-http: flake8 --config {toxinidir}/.flake8 {toxinidir}/exporter/opentelemetry-exporter-zipkin-proto-http
lint-opentelemetry-exporter-zipkin-proto-http: sh -c "cd exporter && pylint --rcfile ../.pylintrc {toxinidir}/exporter/opentelemetry-exporter-zipkin-proto-http"
test-opentelemetry-exporter-zipkin-json: pytest {toxinidir}/exporter/opentelemetry-exporter-zipkin-json/tests {posargs}
lint-opentelemetry-exporter-zipkin-json: black --diff --check --config {toxinidir}/pyproject.toml {toxinidir}/exporter/opentelemetry-exporter-zipkin-json
lint-opentelemetry-exporter-zipkin-json: isort --diff --check-only --settings-path {toxinidir}/.isort.cfg {toxinidir}/exporter/opentelemetry-exporter-zipkin-json
lint-opentelemetry-exporter-zipkin-json: flake8 --config {toxinidir}/.flake8 {toxinidir}/exporter/opentelemetry-exporter-zipkin-json
lint-opentelemetry-exporter-zipkin-json: sh -c "cd exporter && pylint --rcfile ../.pylintrc {toxinidir}/exporter/opentelemetry-exporter-zipkin-json"
test-opentelemetry-propagator-b3: pytest {toxinidir}/propagator/opentelemetry-propagator-b3/tests {posargs}
lint-opentelemetry-propagator-b3: black --diff --check --config {toxinidir}/pyproject.toml {toxinidir}/propagator/opentelemetry-propagator-b3
lint-opentelemetry-propagator-b3: isort --diff --check-only --settings-path {toxinidir}/.isort.cfg {toxinidir}/propagator/opentelemetry-propagator-b3
lint-opentelemetry-propagator-b3: flake8 --config {toxinidir}/.flake8 {toxinidir}/propagator/opentelemetry-propagator-b3
lint-opentelemetry-propagator-b3: sh -c "cd propagator && pylint --rcfile ../.pylintrc {toxinidir}/propagator/opentelemetry-propagator-b3"
benchmark-opentelemetry-propagator-b3: pytest {toxinidir}/propagator/opentelemetry-propagator-b3/benchmarks --benchmark-json=propagator-b3-benchmark.json {posargs}
test-opentelemetry-propagator-jaeger: pytest {toxinidir}/propagator/opentelemetry-propagator-jaeger/tests {posargs}
lint-opentelemetry-propagator-jaeger: black --diff --check --config {toxinidir}/pyproject.toml {toxinidir}/propagator/opentelemetry-propagator-jaeger
lint-opentelemetry-propagator-jaeger: isort --diff --check-only --settings-path {toxinidir}/.isort.cfg {toxinidir}/propagator/opentelemetry-propagator-jaeger
lint-opentelemetry-propagator-jaeger: flake8 --config {toxinidir}/.flake8 {toxinidir}/propagator/opentelemetry-propagator-jaeger
lint-opentelemetry-propagator-jaeger: sh -c "cd propagator && pylint --rcfile ../.pylintrc {toxinidir}/propagator/opentelemetry-propagator-jaeger"
test-opentelemetry-test-utils: pytest {toxinidir}/tests/opentelemetry-test-utils/tests {posargs}
lint-opentelemetry-test-utils: black --diff --check --config {toxinidir}/pyproject.toml {toxinidir}/tests/opentelemetry-test-utils
lint-opentelemetry-test-utils: isort --diff --check-only --settings-path {toxinidir}/.isort.cfg {toxinidir}/tests/opentelemetry-test-utils
lint-opentelemetry-test-utils: flake8 --config {toxinidir}/.flake8 {toxinidir}/tests/opentelemetry-test-utils
lint-opentelemetry-test-utils: sh -c "cd tests && pylint --rcfile ../.pylintrc {toxinidir}/tests/opentelemetry-test-utils"
coverage: {toxinidir}/scripts/coverage.sh
mypy: mypy --version
mypy: mypy --install-types --non-interactive --namespace-packages --explicit-package-bases opentelemetry-api/src/opentelemetry/
mypy: mypy --install-types --non-interactive --namespace-packages --explicit-package-bases opentelemetry-sdk/src/opentelemetry/sdk/resources
mypy: mypy --install-types --non-interactive --namespace-packages --explicit-package-bases opentelemetry-semantic-conventions/src/opentelemetry/semconv/
; For test code, we don't want to enforce the full mypy strictness
mypy: mypy --install-types --non-interactive --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 --install-types --non-interactive --namespace-packages opentelemetry-api/tests/mypysmoke.py --strict
[testenv:lint]
basepython: python3
recreate = True
deps =
-r dev-requirements.txt
commands =
black --config {toxinidir}/pyproject.toml {toxinidir} --diff --check
isort --settings-path {toxinidir}/.isort.cfg {toxinidir} --diff --check-only
flake8 --config {toxinidir}/.flake8 {toxinidir}
[testenv:spellcheck]
basepython: python3
recreate = True
deps =
codespell==2.2.6
commands =
codespell
[testenv:docs]
basepython: python3
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
deps =
# needed for tracecontext
aiohttp~=3.6
# needed for example trace integration
flask~=2.3
requests~=2.7
markupsafe~=2.1
allowlist_externals =
{toxinidir}/scripts/tracecontext-integration-test.sh
commands_pre =
pip install -e {toxinidir}/opentelemetry-api \
-e {toxinidir}/opentelemetry-semantic-conventions \
-e {toxinidir}/opentelemetry-sdk \
-e {env:CONTRIB_REPO}\#egg=opentelemetry-util-http&subdirectory=util/opentelemetry-util-http \
-e {env:CONTRIB_REPO}\#egg=opentelemetry-instrumentation&subdirectory=opentelemetry-instrumentation \
-e {env:CONTRIB_REPO}\#egg=opentelemetry-instrumentation-requests&subdirectory=instrumentation/opentelemetry-instrumentation-requests \
-e {env:CONTRIB_REPO}\#egg=opentelemetry-instrumentation-wsgi&subdirectory=instrumentation/opentelemetry-instrumentation-wsgi
commands =
{toxinidir}/scripts/tracecontext-integration-test.sh
[testenv:docker-tests-proto{3,4}]
deps =
pytest==7.1.3
# Pinning PyYAML for issue: https://github.com/yaml/pyyaml/issues/724
PyYAML==5.3.1
# Pinning docker for issue: https://github.com/docker/compose/issues/11309
docker<7
docker-compose==1.29.2
requests==2.28.2
; proto 3 and 4 tests install the respective version of protobuf
proto3: protobuf~=3.19.0
proto4: protobuf~=4.0
changedir =
tests/opentelemetry-docker-tests/tests
commands_pre =
pip freeze
pip install -e {toxinidir}/opentelemetry-api \
-e {toxinidir}/opentelemetry-semantic-conventions \
-e {toxinidir}/opentelemetry-sdk \
-e {toxinidir}/tests/opentelemetry-test-utils \
; opencensus exporter does not work with protobuf 4
proto3: -e {toxinidir}/exporter/opentelemetry-exporter-opencensus \
-e {toxinidir}/opentelemetry-proto \
-e {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-common \
-e {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-grpc \
-e {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-http \
-e {toxinidir}/exporter/opentelemetry-exporter-otlp
docker-compose up -d
commands =
proto3: pytest {posargs}
; opencensus exporter does not work with protobuf 4
proto4: pytest --ignore opencensus {posargs}
commands_post =
docker-compose down -v
[testenv:public-symbols-check]
basepython: python3
recreate = True
deps =
GitPython==3.1.40
commands =
python {toxinidir}/scripts/public_symbols_checker.py
[testenv:generate-workflows]
commands_pre =
pip install -e {env:CONTRIB_REPO}\#egg=generate_workflows_lib&subdirectory=.github/workflows/generate_workflows_lib
commands =
python {toxinidir}/.github/workflows/generate_workflows.py
[testenv:shellcheck]
commands_pre =
sh -c "sudo apt update -y && sudo apt install --assume-yes shellcheck"
commands =
sh -c "find {toxinidir} -name \*.sh | xargs shellcheck --severity=warning"