diff --git a/.codespellrc b/.codespellrc index b81e62f640c..b82bff46711 100644 --- a/.codespellrc +++ b/.codespellrc @@ -1,4 +1,4 @@ [codespell] # skipping auto generated folders -skip = ./.tox,./.mypy_cache,./docs/_build,./target,*/LICENSE,./venv,.git,./opentelemetry-semantic-conventions +skip = ./.tox,./.mypy_cache,./docs/_build,./target,*/LICENSE,./venv,.git,./opentelemetry-semantic-conventions,*-requirements*.txt ignore-words-list = ans,ue,ot,hist,ro diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000000..5a0c71883c0 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,38 @@ +name: Lint tests + +on: + push: + branches-ignore: + - 'release/*' + pull_request: +env: + CORE_REPO_SHA: 955c92e91b5cd4bcfb43c39efcef086b040471d2 + +jobs: + lint-3_11: + strategy: + fail-fast: false # ensures the entire test matrix is run, even if one permutation fails + matrix: + package: + - "opentelemetry-api" + os: [ubuntu-20.04] + runs-on: ubuntu-20.04 + steps: + - name: Checkout Contrib Repo @ SHA - ${{ github.sha }} + uses: actions/checkout@v4 + - name: Set up Python 3.11 + uses: actions/setup-python@v5 + with: + python-version: 3.11 + - name: Install tox + run: pip install tox + - name: Cache tox environment + # Preserves .tox directory between runs for faster installs + uses: actions/cache@v4 + with: + path: | + .tox + ~/.cache/pip + key: v7-build-tox-cache-${{ matrix.package }}-${{ hashFiles('tox.ini', 'gen-requirements.txt', 'dev-requirements.txt') }} + - name: run tox + run: tox -e lint-${{ matrix.package }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fe5f4104c9e..9115600cc7f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -55,7 +55,7 @@ jobs: - "exporter-zipkin-combined" - "exporter-zipkin-proto-http" - "exporter-zipkin-json" - - "protobuf" + - "proto" - "propagator-b3" - "propagator-jaeger" os: [ubuntu-20.04, windows-2019] @@ -98,7 +98,7 @@ jobs: strategy: fail-fast: false matrix: - tox-environment: ["docker-tests-proto3", "docker-tests-proto4", "lint", "spellcheck", + tox-environment: ["docker-tests-proto3", "docker-tests-proto4", "spellcheck", "docs", "mypy", "mypyinstalled", "tracecontext"] name: ${{ matrix.tox-environment }} runs-on: ubuntu-20.04 diff --git a/docs/getting_started/tests/requirements.txt b/docs/getting_started/tests/requirements.txt index 89911f30c0f..6005dfd8df2 100644 --- a/docs/getting_started/tests/requirements.txt +++ b/docs/getting_started/tests/requirements.txt @@ -25,3 +25,6 @@ urllib3==1.26.18 Werkzeug==3.0.1 wrapt==1.15.0 zipp==3.17.0 +-e opentelemetry-semantic-conventions +-e opentelemetry-api +-e opentelemetry-sdk diff --git a/exporter/opentelemetry-exporter-opencensus/test-requirements.txt b/exporter/opentelemetry-exporter-opencensus/test-requirements.txt index 8a6345c7e22..c45564ffdbe 100644 --- a/exporter/opentelemetry-exporter-opencensus/test-requirements.txt +++ b/exporter/opentelemetry-exporter-opencensus/test-requirements.txt @@ -19,5 +19,6 @@ wrapt==1.16.0 zipp==3.17.0 -e opentelemetry-api -e opentelemetry-sdk +-e tests/opentelemetry-test-utils -e opentelemetry-semantic-conventions -e exporter/opentelemetry-exporter-opencensus diff --git a/exporter/opentelemetry-exporter-otlp-proto-common/test-requirements-0.txt b/exporter/opentelemetry-exporter-otlp-proto-common/test-requirements-0.txt index a692923fc42..276d5f064a5 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-common/test-requirements-0.txt +++ b/exporter/opentelemetry-exporter-otlp-proto-common/test-requirements-0.txt @@ -15,5 +15,9 @@ tomli==2.0.1 typing_extensions==4.10.0 wrapt==1.16.0 zipp==3.17.0 +-e opentelemetry-api +-e opentelemetry-sdk +-e opentelemetry-semantic-conventions +-e tests/opentelemetry-test-utils -e opentelemetry-proto -e exporter/opentelemetry-exporter-otlp-proto-common diff --git a/exporter/opentelemetry-exporter-otlp-proto-common/test-requirements-1.txt b/exporter/opentelemetry-exporter-otlp-proto-common/test-requirements-1.txt index 60f3dcd2ea7..658bfcfd620 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-common/test-requirements-1.txt +++ b/exporter/opentelemetry-exporter-otlp-proto-common/test-requirements-1.txt @@ -15,5 +15,9 @@ tomli==2.0.1 typing_extensions==4.10.0 wrapt==1.16.0 zipp==3.17.0 +-e opentelemetry-api +-e opentelemetry-sdk +-e opentelemetry-semantic-conventions +-e tests/opentelemetry-test-utils -e opentelemetry-proto -e exporter/opentelemetry-exporter-otlp-proto-common diff --git a/exporter/opentelemetry-exporter-otlp-proto-grpc/test-requirements-0.txt b/exporter/opentelemetry-exporter-otlp-proto-grpc/test-requirements-0.txt index c1ef1b74296..5834ac3fcc2 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-grpc/test-requirements-0.txt +++ b/exporter/opentelemetry-exporter-otlp-proto-grpc/test-requirements-0.txt @@ -18,6 +18,7 @@ typing_extensions==4.10.0 wrapt==1.16.0 zipp==3.17.0 -e opentelemetry-api +-e tests/opentelemetry-test-utils -e exporter/opentelemetry-exporter-otlp-proto-common -e opentelemetry-proto -e opentelemetry-sdk diff --git a/exporter/opentelemetry-exporter-otlp-proto-grpc/test-requirements-1.txt b/exporter/opentelemetry-exporter-otlp-proto-grpc/test-requirements-1.txt index 5fd39ca5761..c801d210d50 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-grpc/test-requirements-1.txt +++ b/exporter/opentelemetry-exporter-otlp-proto-grpc/test-requirements-1.txt @@ -18,6 +18,7 @@ typing_extensions==4.10.0 wrapt==1.16.0 zipp==3.17.0 -e opentelemetry-api +-e tests/opentelemetry-test-utils -e exporter/opentelemetry-exporter-otlp-proto-common -e opentelemetry-proto -e opentelemetry-sdk diff --git a/exporter/opentelemetry-exporter-otlp-proto-http/test-requirements-0.txt b/exporter/opentelemetry-exporter-otlp-proto-http/test-requirements-0.txt index cad177da7b5..da3590c27c1 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-http/test-requirements-0.txt +++ b/exporter/opentelemetry-exporter-otlp-proto-http/test-requirements-0.txt @@ -24,6 +24,7 @@ urllib3==2.2.1 wrapt==1.16.0 zipp==3.17.0 -e opentelemetry-api +-e tests/opentelemetry-test-utils -e exporter/opentelemetry-exporter-otlp-proto-common -e opentelemetry-proto -e opentelemetry-sdk diff --git a/exporter/opentelemetry-exporter-otlp-proto-http/test-requirements-1.txt b/exporter/opentelemetry-exporter-otlp-proto-http/test-requirements-1.txt index d38b38f1c40..0faee2e5192 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-http/test-requirements-1.txt +++ b/exporter/opentelemetry-exporter-otlp-proto-http/test-requirements-1.txt @@ -24,6 +24,7 @@ urllib3==2.2.1 wrapt==1.16.0 zipp==3.17.0 -e opentelemetry-api +-e tests/opentelemetry-test-utils -e exporter/opentelemetry-exporter-otlp-proto-common -e opentelemetry-proto -e opentelemetry-sdk diff --git a/exporter/opentelemetry-exporter-otlp/test-requirements.txt b/exporter/opentelemetry-exporter-otlp/test-requirements.txt index 99775220476..c4283443df2 100644 --- a/exporter/opentelemetry-exporter-otlp/test-requirements.txt +++ b/exporter/opentelemetry-exporter-otlp/test-requirements.txt @@ -15,6 +15,7 @@ typing_extensions==4.10.0 wrapt==1.16.0 zipp==3.17.0 -e opentelemetry-api +-e tests/opentelemetry-test-utils -e exporter/opentelemetry-exporter-otlp-proto-common -e exporter/opentelemetry-exporter-otlp-proto-grpc -e exporter/opentelemetry-exporter-otlp-proto-http diff --git a/exporter/opentelemetry-exporter-prometheus/test-requirements.txt b/exporter/opentelemetry-exporter-prometheus/test-requirements.txt index 2b3dd0f9f04..e47c9c80bc8 100644 --- a/exporter/opentelemetry-exporter-prometheus/test-requirements.txt +++ b/exporter/opentelemetry-exporter-prometheus/test-requirements.txt @@ -17,5 +17,6 @@ wrapt==1.16.0 zipp==3.17.0 -e opentelemetry-api -e opentelemetry-sdk +-e tests/opentelemetry-test-utils -e opentelemetry-semantic-conventions -e exporter/opentelemetry-exporter-prometheus diff --git a/exporter/opentelemetry-exporter-zipkin-json/test-requirements.txt b/exporter/opentelemetry-exporter-zipkin-json/test-requirements.txt index 0625946182a..98deaf9a6c0 100644 --- a/exporter/opentelemetry-exporter-zipkin-json/test-requirements.txt +++ b/exporter/opentelemetry-exporter-zipkin-json/test-requirements.txt @@ -22,4 +22,5 @@ zipp==3.17.0 -e opentelemetry-api -e opentelemetry-sdk -e opentelemetry-semantic-conventions +-e tests/opentelemetry-test-utils -e exporter/opentelemetry-exporter-zipkin-json diff --git a/exporter/opentelemetry-exporter-zipkin-proto-http/test-requirements.txt b/exporter/opentelemetry-exporter-zipkin-proto-http/test-requirements.txt index acfa95ff2a0..c61b80f9075 100644 --- a/exporter/opentelemetry-exporter-zipkin-proto-http/test-requirements.txt +++ b/exporter/opentelemetry-exporter-zipkin-proto-http/test-requirements.txt @@ -21,7 +21,9 @@ urllib3==2.2.1 wrapt==1.16.0 zipp==3.17.0 -e opentelemetry-api +-e opentelemetry-proto -e exporter/opentelemetry-exporter-zipkin-json -e opentelemetry-sdk +-e tests/opentelemetry-test-utils -e opentelemetry-semantic-conventions -e exporter/opentelemetry-exporter-zipkin-proto-http diff --git a/lint-requirements.txt b/lint-requirements.txt new file mode 100644 index 00000000000..006edb46e8c --- /dev/null +++ b/lint-requirements.txt @@ -0,0 +1,15 @@ +astroid==3.0.3 +black==24.3.0 +click==8.1.7 +dill==0.3.8 +flake8==6.1.0 +isort==5.12.0 +mccabe==0.7.0 +mypy-extensions==1.0.0 +packaging==24.0 +pathspec==0.12.1 +platformdirs==4.2.1 +pycodestyle==2.11.1 +pyflakes==3.1.0 +pylint==3.0.2 +tomlkit==0.12.4 diff --git a/opentelemetry-api/test-requirements.txt b/opentelemetry-api/test-requirements.txt index 273750cb010..90247015a0b 100644 --- a/opentelemetry-api/test-requirements.txt +++ b/opentelemetry-api/test-requirements.txt @@ -14,4 +14,7 @@ tomli==2.0.1 typing_extensions==4.10.0 wrapt==1.16.0 zipp==3.17.0 +-e opentelemetry-sdk +-e opentelemetry-semantic-conventions +-e tests/opentelemetry-test-utils -e opentelemetry-api diff --git a/opentelemetry-sdk/test-requirements.txt b/opentelemetry-sdk/test-requirements.txt index ed03f730556..9612f354396 100644 --- a/opentelemetry-sdk/test-requirements.txt +++ b/opentelemetry-sdk/test-requirements.txt @@ -14,6 +14,7 @@ tomli==2.0.1 typing_extensions==4.10.0 wrapt==1.16.0 zipp==3.17.0 +-e tests/opentelemetry-test-utils -e opentelemetry-api -e opentelemetry-semantic-conventions -e opentelemetry-sdk diff --git a/propagator/opentelemetry-propagator-b3/test-requirements.txt b/propagator/opentelemetry-propagator-b3/test-requirements.txt index 366dfca0d89..a3b3b60c6fd 100644 --- a/propagator/opentelemetry-propagator-b3/test-requirements.txt +++ b/propagator/opentelemetry-propagator-b3/test-requirements.txt @@ -15,4 +15,6 @@ typing_extensions==4.10.0 wrapt==1.16.0 zipp==3.17.0 -e opentelemetry-api +-e opentelemetry-sdk +-e opentelemetry-semantic-conventions -e propagator/opentelemetry-propagator-b3 diff --git a/propagator/opentelemetry-propagator-jaeger/test-requirements.txt b/propagator/opentelemetry-propagator-jaeger/test-requirements.txt index ed7338bfbc2..8aa93cc474b 100644 --- a/propagator/opentelemetry-propagator-jaeger/test-requirements.txt +++ b/propagator/opentelemetry-propagator-jaeger/test-requirements.txt @@ -15,4 +15,7 @@ typing_extensions==4.10.0 wrapt==1.16.0 zipp==3.17.0 -e opentelemetry-api +-e opentelemetry-sdk +-e opentelemetry-semantic-conventions +-e tests/opentelemetry-test-utils -e propagator/opentelemetry-propagator-jaeger diff --git a/shim/opentelemetry-opencensus-shim/test-requirements.txt b/shim/opentelemetry-opencensus-shim/test-requirements.txt index 68008fb500e..c09fe41986e 100644 --- a/shim/opentelemetry-opencensus-shim/test-requirements.txt +++ b/shim/opentelemetry-opencensus-shim/test-requirements.txt @@ -33,4 +33,7 @@ urllib3==2.2.1 wrapt==1.16.0 zipp==3.17.0 -e opentelemetry-api +-e opentelemetry-sdk +-e tests/opentelemetry-test-utils +-e opentelemetry-semantic-conventions -e shim/opentelemetry-opencensus-shim diff --git a/shim/opentelemetry-opentracing-shim/test-requirements.txt b/shim/opentelemetry-opentracing-shim/test-requirements.txt index 37a2afbf99f..1bf45ffec36 100644 --- a/shim/opentelemetry-opentracing-shim/test-requirements.txt +++ b/shim/opentelemetry-opentracing-shim/test-requirements.txt @@ -16,4 +16,7 @@ typing_extensions==4.10.0 wrapt==1.16.0 zipp==3.17.0 -e opentelemetry-api +-e opentelemetry-sdk +-e tests/opentelemetry-test-utils +-e opentelemetry-semantic-conventions -e shim/opentelemetry-opentracing-shim diff --git a/tox.ini b/tox.ini index 2e12556b4d1..034f197c6fe 100644 --- a/tox.ini +++ b/tox.ini @@ -5,83 +5,101 @@ skip_missing_interpreters = True envlist = ; Environments are organized by individual package, allowing ; for specifying supported Python versions per package. - py3{8,9,10,11}-opentelemetry-api - pypy3-opentelemetry-api + + py3{8,9,10,11}-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}-opentelemetry-protobuf-{0,1} - pypy3-opentelemetry-protobuf-{0,1} + py3{8,9,10,11}-test-opentelemetry-proto-{0,1} + pypy3-test-opentelemetry-proto-{0,1} + lint-opentelemetry-proto - py3{8,9,10,11}-opentelemetry-sdk - pypy3-opentelemetry-sdk + py3{8,9,10,11}-test-opentelemetry-sdk + pypy3-test-opentelemetry-sdk + lint-opentelemetry-sdk - py3{8,9,10,11}-opentelemetry-semantic-conventions - pypy3-opentelemetry-semantic-conventions + py3{8,9,10,11}-test-opentelemetry-semantic-conventions + pypy3-test-opentelemetry-semantic-conventions + lint-opentelemetry-semantic-conventions - ; docs/getting-started - py3{8,9,10,11}-opentelemetry-getting-started - pypy3-opentelemetry-getting-started + py3{8,9,10,11}-test-opentelemetry-getting-started + pypy3-test-opentelemetry-getting-started + lint-opentelemetry-getting-started - py3{8,9,10,11}-opentelemetry-opentracing-shim - pypy3-opentelemetry-opentracing-shim + py3{8,9,10,11}-test-opentelemetry-opentracing-shim + pypy3-test-opentelemetry-opentracing-shim + lint-opentelemetry-opentracing-shim - py3{8,9,10,11}-opentelemetry-opencensus-shim + py3{8,9,10,11}-test-opentelemetry-opencensus-shim ; opencensus-shim intentionally excluded from pypy3 (grpcio install fails) + lint-opentelemetry-opencensus-shim - py3{8,9,10,11}-opentelemetry-exporter-opencensus + py3{8,9,10,11}-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}-opentelemetry-exporter-otlp-proto-common-{0,1} - pypy3-opentelemetry-exporter-otlp-proto-common-{0,1} + py3{8,9,10,11}-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}-opentelemetry-exporter-otlp-combined + py3{8,9,10,11}-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}-opentelemetry-exporter-otlp-proto-grpc-{0,1} + py3{8,9,10,11}-test-opentelemetry-exporter-otlp-proto-grpc-{0,1} ; intentionally excluded from pypy3 + lint-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}-opentelemetry-exporter-otlp-proto-http-{0,1} - pypy3-opentelemetry-exporter-otlp-proto-http-{0,1} + py3{8,9,10,11}-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}-opentelemetry-exporter-prometheus - pypy3-opentelemetry-exporter-prometheus + py3{8,9,10,11}-test-opentelemetry-exporter-prometheus + pypy3-test-opentelemetry-exporter-prometheus + lint-opentelemetry-exporter-prometheus ; opentelemetry-exporter-zipkin - py3{8,9,10,11}-opentelemetry-exporter-zipkin-combined - pypy3-opentelemetry-exporter-zipkin-combined + py3{8,9,10,11}-test-opentelemetry-exporter-zipkin-combined + pypy3-test-opentelemetry-exporter-zipkin-combined + lint-opentelemetry-exporter-zipkin-combined - py3{8,9,10,11}-opentelemetry-exporter-zipkin-proto-http - pypy3-opentelemetry-exporter-zipkin-proto-http + py3{8,9,10,11}-test-opentelemetry-exporter-zipkin-proto-http + pypy3-test-opentelemetry-exporter-zipkin-proto-http + lint-opentelemetry-exporter-zipkin-proto-http - py3{8,9,10,11}-opentelemetry-exporter-zipkin-json - pypy3-opentelemetry-exporter-zipkin-json + py3{8,9,10,11}-test-opentelemetry-exporter-zipkin-json + pypy3-test-opentelemetry-exporter-zipkin-json + lint-opentelemetry-exporter-zipkin-json - py3{8,9,10,11}-opentelemetry-propagator-b3 - pypy3-opentelemetry-propagator-b3 + py3{8,9,10,11}-test-opentelemetry-propagator-b3 + pypy3-test-opentelemetry-propagator-b3 + lint-opentelemetry-propagator-b3 - py3{8,9,10,11}-opentelemetry-propagator-jaeger - pypy3-opentelemetry-propagator-jaeger + py3{8,9,10,11}-test-opentelemetry-propagator-jaeger + pypy3-test-opentelemetry-propagator-jaeger + lint-opentelemetry-propagator-jaeger - py3{8,9,10,11}-opentelemetry-test-utils - pypy3-opentelemetry-test-utils + py3{8,9,10,11}-test-opentelemetry-test-utils + pypy3-test-opentelemetry-test-utils + lint-opentelemetry-test-utils - lint spellcheck tracecontext mypy,mypyinstalled @@ -92,9 +110,10 @@ envlist = [testenv] deps = -c dev-requirements.txt - opentelemetry: pytest - opentelemetry: pytest-benchmark - opentelemetry: flaky + lint: -r lint-requirements.txt + test-opentelemetry: pytest + test-opentelemetry: pytest-benchmark + test-opentelemetry: flaky coverage: pytest coverage: pytest-cov mypy,mypyinstalled: mypy @@ -112,20 +131,18 @@ setenv = mypy: MYPYPATH={toxinidir}/opentelemetry-api/src/:{toxinidir}/tests/opentelemetry-test-utils/src/ commands_pre = -; Install without -e to test the actual installation - py3{8,9,10,11}: python -m pip install -U pip setuptools wheel api: pip install -r {toxinidir}/opentelemetry-api/test-requirements.txt + sdk: pip install -r {toxinidir}/opentelemetry-sdk/test-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 -; 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. - opentelemetry: pip install {toxinidir}/opentelemetry-api {toxinidir}/opentelemetry-semantic-conventions {toxinidir}/opentelemetry-sdk {toxinidir}/tests/opentelemetry-test-utils + test-utils: pip install -r {toxinidir}/tests/opentelemetry-test-utils/test-requirements.txt - protobuf-0: pip install -r {toxinidir}/opentelemetry-proto/test-requirements-0.txt - protobuf-1: pip install -r {toxinidir}/opentelemetry-proto/test-requirements-1.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 @@ -138,14 +155,17 @@ commands_pre = 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 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 @@ -172,27 +192,137 @@ commands_pre = mypyinstalled: pip install file://{toxinidir}/opentelemetry-api/ commands = - 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} + 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/src/opentelemetry + lint-opentelemetry-api: pylint {toxinidir}/opentelemetry-api/tests + + 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 + lint-opentelemetry-sdk: flake8 --config {toxinidir}/.flake8 {toxinidir}/opentelemetry-sdk + lint-opentelemetry-sdk: pylint {toxinidir}/opentelemetry-sdk/src/opentelemetry + lint-opentelemetry-sdk: pylint {toxinidir}/opentelemetry-sdk/tests + + 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/src/opentelemetry + lint-opentelemetry-proto: pylint {toxinidir}/opentelemetry-proto/tests + + 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/src/opentelemetry + lint-opentelemetry-semantic-conventions: pylint {toxinidir}/opentelemetry-semantic-conventions/tests + + 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: pylint {toxinidir}/shim/opentelemetry-opentracing-shim/src/opentelemetry + lint-opentelemetry-opentracing-shim: pylint {toxinidir}/shim/opentelemetry-opentracing-shim/tests + + 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: pylint {toxinidir}/shim/opentelemetry-opencensus-shim/src/opentelemetry + lint-opentelemetry-opencensus-shim: pylint {toxinidir}/shim/opentelemetry-opencensus-shim/tests + + 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: pylint {toxinidir}/exporter/opentelemetry-exporter-opencensus/src/opentelemetry + lint-opentelemetry-exporter-opencensus: pylint {toxinidir}/exporter/opentelemetry-exporter-opencensus/tests + + 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: pylint {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry + lint-opentelemetry-exporter-otlp-proto-common: pylint {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-common/tests + + 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: pylint {toxinidir}/exporter/opentelemetry-exporter-otlp/src/opentelemetry + lint-opentelemetry-exporter-otlp-combined: pylint {toxinidir}/exporter/opentelemetry-exporter-otlp/tests + + 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: pylint {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry + lint-opentelemetry-exporter-otlp-proto-grpc: pylint {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-grpc/tests + + 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: pylint {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry + lint-opentelemetry-exporter-otlp-proto-http: pylint {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-http/tests + + 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: pylint {toxinidir}/exporter/opentelemetry-exporter-prometheus/src/opentelemetry + lint-opentelemetry-exporter-prometheus: pylint {toxinidir}/exporter/opentelemetry-exporter-prometheus/tests + + 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: pylint {toxinidir}/exporter/opentelemetry-exporter-zipkin/src/opentelemetry + lint-opentelemetry-exporter-zipkin-combined: pylint {toxinidir}/exporter/opentelemetry-exporter-zipkin/tests + + 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: pylint {toxinidir}/exporter/opentelemetry-exporter-zipkin-proto-http/src/opentelemetry + lint-opentelemetry-exporter-zipkin-proto-http: pylint {toxinidir}/exporter/opentelemetry-exporter-zipkin-proto-http/tests + + 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: pylint {toxinidir}/exporter/opentelemetry-exporter-zipkin-json/src/opentelemetry + lint-opentelemetry-exporter-zipkin-json: pylint {toxinidir}/exporter/opentelemetry-exporter-zipkin-json/tests + + 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: pylint {toxinidir}/propagator/opentelemetry-propagator-b3/src/opentelemetry + lint-opentelemetry-propagator-b3: pylint {toxinidir}/propagator/opentelemetry-propagator-b3/tests + + 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: pylint {toxinidir}/propagator/opentelemetry-propagator-jaeger/src/opentelemetry + lint-opentelemetry-propagator-jaeger: pylint {toxinidir}/propagator/opentelemetry-propagator-jaeger/tests + + test-opentelemetry-test-utils: pytest {toxinidir}/tests/opentelemetry-test-utils/tests {posargs} + lint-opentelemetry-test-utils: black --diff --check --config {toxinidir}/pyproject.toml {toxinidir}/opentelemetry-test-utils + lint-opentelemetry-test-utils: isort --diff --check-only --settings-path {toxinidir}/.isort.cfg {toxinidir}/opentelemetry-test-utils + lint-opentelemetry-test-utils: flake8 --config {toxinidir}/.flake8 {toxinidir}/opentelemetry-test-utils + lint-opentelemetry-test-utils: pylint {toxinidir}/opentelemetry-test-utils/src/opentelemetry + lint-opentelemetry-test-utils: pylint {toxinidir}/opentelemetry-test-utils/tests coverage: {toxinidir}/scripts/coverage.sh @@ -214,35 +344,6 @@ deps = commands = codespell -[testenv:lint] -basepython: python3 -recreate = True -deps = - -r dev-requirements.txt - -commands_pre = - pip install -r {toxinidir}/opentelemetry-api/test-requirements.txt \ - -r {toxinidir}/opentelemetry-sdk/test-requirements.txt \ - -r {toxinidir}/opentelemetry-semantic-conventions/test-requirements.txt \ - -r {toxinidir}/opentelemetry-proto/test-requirements-0.txt \ - -r {toxinidir}/shim/opentelemetry-opentracing-shim/test-requirements.txt \ - -r {toxinidir}/shim/opentelemetry-opencensus-shim/test-requirements.txt \ - -r {toxinidir}/exporter/opentelemetry-exporter-opencensus/test-requirements.txt \ - -r {toxinidir}/tests/opentelemetry-test-utils/test-requirements.txt \ - -r {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-common/test-requirements-0.txt \ - -r {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-http/test-requirements-0.txt \ - -r {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-grpc/test-requirements-0.txt \ - -r {toxinidir}/exporter/opentelemetry-exporter-prometheus/test-requirements.txt \ - -r {toxinidir}/exporter/opentelemetry-exporter-zipkin-proto-http/test-requirements.txt \ - -r {toxinidir}/exporter/opentelemetry-exporter-zipkin-json/test-requirements.txt \ - -r {toxinidir}/exporter/opentelemetry-exporter-otlp/test-requirements.txt \ - -r {toxinidir}/exporter/opentelemetry-exporter-zipkin/test-requirements.txt \ - -r {toxinidir}/propagator/opentelemetry-propagator-b3/test-requirements.txt \ - -r {toxinidir}/propagator/opentelemetry-propagator-jaeger/test-requirements.txt - -commands = - python scripts/eachdist.py lint --check-only - [testenv:docs] basepython: python3 recreate = True