Skip to content

Commit

Permalink
Refactor use of changedir in tox.ini (#3745)
Browse files Browse the repository at this point in the history
Fixes #3744
  • Loading branch information
ocelotl authored Mar 4, 2024
1 parent ca73f3f commit 216411f
Showing 1 changed file with 23 additions and 25 deletions.
48 changes: 23 additions & 25 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -96,29 +96,6 @@ setenv =
CONTRIB_REPO=git+https://github.com/open-telemetry/opentelemetry-python-contrib.git@{env:CONTRIB_REPO_SHA}
mypy: MYPYPATH={toxinidir}/opentelemetry-api/src/:{toxinidir}/tests/opentelemetry-test-utils/src/

changedir =
api: opentelemetry-api/tests
sdk: opentelemetry-sdk/tests
protobuf: opentelemetry-proto/tests
semantic-conventions: opentelemetry-semantic-conventions/tests
getting-started: docs/getting_started/tests
opentracing-shim: shim/opentelemetry-opentracing-shim/tests
opencensus-shim: shim/opentelemetry-opencensus-shim/tests

exporter-opencensus: exporter/opentelemetry-exporter-opencensus/tests
exporter-otlp-proto-common: exporter/opentelemetry-exporter-otlp-proto-common/tests
exporter-otlp-combined: exporter/opentelemetry-exporter-otlp/tests
exporter-otlp-proto-grpc: exporter/opentelemetry-exporter-otlp-proto-grpc/tests
exporter-otlp-proto-http: exporter/opentelemetry-exporter-otlp-proto-http/tests
exporter-prometheus: exporter/opentelemetry-exporter-prometheus/tests
exporter-zipkin-combined: exporter/opentelemetry-exporter-zipkin/tests
exporter-zipkin-proto-http: exporter/opentelemetry-exporter-zipkin-proto-http/tests
exporter-zipkin-json: exporter/opentelemetry-exporter-zipkin-json/tests

propagator-b3: propagator/opentelemetry-propagator-b3/tests
propagator-jaeger: propagator/opentelemetry-propagator-jaeger/tests
test-utils: tests/opentelemetry-test-utils/tests

commands_pre =
; Install without -e to test the actual installation
py3{8,9,10,11}: python -m pip install -U pip setuptools wheel
Expand All @@ -128,7 +105,7 @@ commands_pre =

protobuf: pip install {toxinidir}/opentelemetry-proto

getting-started: pip install -r requirements.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
Expand Down Expand Up @@ -184,7 +161,28 @@ commands_pre =
mypyinstalled: pip install file://{toxinidir}/opentelemetry-api/

commands =
opentelemetry: pytest {posargs}
api: pytest {toxinidir}/opentelemetry-api/tests {posargs}
sdk: pytest {toxinidir}/opentelemetry-sdk/tests {posargs}
protobuf: pytest {toxinidir}/opentelemetry-proto/tests {posargs}
semantic-conventions: pytest {toxinidir}/opentelemetry-semantic-conventions/tests {posargs}
getting-started: pytest {toxinidir}/docs/getting_started/tests {posargs}
opentracing-shim: pytest {toxinidir}/shim/opentelemetry-opentracing-shim/tests {posargs}
opencensus-shim: pytest {toxinidir}/shim/opentelemetry-opencensus-shim/tests {posargs}

exporter-opencensus: pytest {toxinidir}/exporter/opentelemetry-exporter-opencensus/tests {posargs}
exporter-otlp-proto-common: pytest {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-common/tests {posargs}
exporter-otlp-combined: pytest {toxinidir}/exporter/opentelemetry-exporter-otlp/tests {posargs}
exporter-otlp-proto-grpc: pytest {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-grpc/tests {posargs}
exporter-otlp-proto-http: pytest {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-http/tests {posargs}
exporter-prometheus: pytest {toxinidir}/exporter/opentelemetry-exporter-prometheus/tests {posargs}
exporter-zipkin-combined: pytest {toxinidir}/exporter/opentelemetry-exporter-zipkin/tests {posargs}
exporter-zipkin-proto-http: pytest {toxinidir}/exporter/opentelemetry-exporter-zipkin-proto-http/tests {posargs}
exporter-zipkin-json: pytest {toxinidir}/exporter/opentelemetry-exporter-zipkin-json/tests {posargs}

propagator-b3: pytest {toxinidir}/propagator/opentelemetry-propagator-b3/tests {posargs}
propagator-jaeger: pytest {toxinidir}/propagator/opentelemetry-propagator-jaeger/tests {posargs}
test-utils: pytest {toxinidir}/tests/opentelemetry-test-utils/tests {posargs}

coverage: {toxinidir}/scripts/coverage.sh

mypy: mypy --install-types --non-interactive --namespace-packages --explicit-package-bases opentelemetry-api/src/opentelemetry/
Expand Down

0 comments on commit 216411f

Please sign in to comment.