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..7c77bf5938f --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,56 @@ +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" + - "opentelemetry-proto" + - "opentelemetry-sdk" + - "opentelemetry-semantic-conventions" + - "opentelemetry-getting-started" + - "opentelemetry-opentracing-shim" + - "opentelemetry-opencensus-shim" + - "opentelemetry-exporter-opencensus" + - "opentelemetry-exporter-otlp-proto-common" + - "opentelemetry-exporter-otlp-combined" + - "opentelemetry-exporter-otlp-proto-grpc" + - "opentelemetry-exporter-otlp-proto-http" + - "opentelemetry-exporter-otlp-proto-prometheus" + - "opentelemetry-exporter-otlp-proto-zipkin-combined" + - "opentelemetry-exporter-otlp-proto-zipkin-proto-http" + - "opentelemetry-exporter-otlp-proto-zipkin-json" + - "opentelemetry-propagator-b3" + - "opentelemetry-propagator-jaeger" + - "opentelemetry-test-utils" + 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 f70b22765a4..e3356eecc41 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -56,7 +56,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/__init__.py b/docs/getting_started/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/docs/getting_started/flask_example.py b/docs/getting_started/flask_example.py index 64ed606c7f6..3ddf61d15f5 100644 --- a/docs/getting_started/flask_example.py +++ b/docs/getting_started/flask_example.py @@ -40,7 +40,7 @@ @app.route("/") def hello(): with tracer.start_as_current_span("example-request"): - requests.get("http://www.example.com") + requests.get("http://www.example.com", timeout=10) return "hello" diff --git a/docs/getting_started/tests/requirements.txt b/docs/getting_started/tests/requirements.txt index b22401771a4..41880ca863f 100644 --- a/docs/getting_started/tests/requirements.txt +++ b/docs/getting_started/tests/requirements.txt @@ -23,5 +23,8 @@ Werkzeug==3.0.3 wrapt==1.15.0 zipp==3.19.2 -e opentelemetry-semantic-conventions +-e opentelemetry-proto +-e exporter/opentelemetry-exporter-otlp-proto-common +-e exporter/opentelemetry-exporter-otlp-proto-grpc -e opentelemetry-api -e opentelemetry-sdk diff --git a/docs/getting_started/tests/test_flask.py b/docs/getting_started/tests/test_flask.py index 4d6127f792b..ffaa7deb213 100644 --- a/docs/getting_started/tests/test_flask.py +++ b/docs/getting_started/tests/test_flask.py @@ -19,14 +19,16 @@ import requests from requests.adapters import HTTPAdapter -from requests.packages.urllib3.util.retry import Retry +from requests.packages.urllib3.util.retry import ( # pylint: disable=import-error + Retry, +) class TestFlask(unittest.TestCase): def test_flask(self): dirpath = os.path.dirname(os.path.realpath(__file__)) server_script = f"{dirpath}/../flask_example.py" - server = subprocess.Popen( + server = subprocess.Popen( # pylint: disable=consider-using-with [sys.executable, server_script], stdout=subprocess.PIPE, ) diff --git a/exporter/opentelemetry-exporter-zipkin-proto-http/test-requirements.txt b/exporter/opentelemetry-exporter-zipkin-proto-http/test-requirements.txt index a3b296b4805..c1913e6928d 100644 --- a/exporter/opentelemetry-exporter-zipkin-proto-http/test-requirements.txt +++ b/exporter/opentelemetry-exporter-zipkin-proto-http/test-requirements.txt @@ -17,6 +17,7 @@ urllib3==2.2.2 wrapt==1.16.0 zipp==3.19.2 -e opentelemetry-api +-e opentelemetry-proto -e exporter/opentelemetry-exporter-zipkin-json -e opentelemetry-sdk -e tests/opentelemetry-test-utils 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/tox.ini b/tox.ini index 48ca1f10df8..fb3a147aa60 100644 --- a/tox.ini +++ b/tox.ini @@ -5,84 +5,102 @@ 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}-opentelemetry-api - pypy3-opentelemetry-api + + 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}-opentelemetry-protobuf-{0,1} - pypy3-opentelemetry-protobuf-{0,1} + 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}-opentelemetry-sdk pypy3-opentelemetry-sdk + lint-opentelemetry-sdk benchmark-opentelemetry-sdk - py3{8,9,10,11,12}-opentelemetry-semantic-conventions - pypy3-opentelemetry-semantic-conventions + py3{8,9,10,11,12}-test-opentelemetry-semantic-conventions + pypy3-test-opentelemetry-semantic-conventions + lint-opentelemetry-semantic-conventions - ; docs/getting-started - py3{8,9,10,11,12}-opentelemetry-getting-started - pypy3-opentelemetry-getting-started + py3{8,9,10,11,12}-test-opentelemetry-getting-started + pypy3-test-opentelemetry-getting-started + lint-opentelemetry-getting-started - py3{8,9,10,11,12}-opentelemetry-opentracing-shim - pypy3-opentelemetry-opentracing-shim + 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}-opentelemetry-opencensus-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}-opentelemetry-exporter-opencensus + 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}-opentelemetry-exporter-otlp-proto-common-{0,1} - pypy3-opentelemetry-exporter-otlp-proto-common-{0,1} + 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}-opentelemetry-exporter-otlp-combined + 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}-opentelemetry-exporter-otlp-proto-grpc-{0,1} + py3{8,9,10,11,12}-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,12}-opentelemetry-exporter-otlp-proto-http-{0,1} - pypy3-opentelemetry-exporter-otlp-proto-http-{0,1} + 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}-opentelemetry-exporter-prometheus - pypy3-opentelemetry-exporter-prometheus + 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}-opentelemetry-exporter-zipkin-combined - pypy3-opentelemetry-exporter-zipkin-combined + 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}-opentelemetry-exporter-zipkin-proto-http - pypy3-opentelemetry-exporter-zipkin-proto-http + 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}-opentelemetry-exporter-zipkin-json - pypy3-opentelemetry-exporter-zipkin-json + 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}-opentelemetry-propagator-b3 - pypy3-opentelemetry-propagator-b3 + py3{8,9,10,11,12}-test-opentelemetry-propagator-b3 + pypy3-test-opentelemetry-propagator-b3 + lint-opentelemetry-propagator-b3 - py3{8,9,10,11,12}-opentelemetry-propagator-jaeger - pypy3-opentelemetry-propagator-jaeger + 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}-opentelemetry-test-utils - pypy3-opentelemetry-test-utils + py3{8,9,10,11,12}-test-opentelemetry-test-utils + pypy3-test-opentelemetry-test-utils + lint-opentelemetry-test-utils - lint spellcheck tracecontext mypy,mypyinstalled @@ -120,8 +138,9 @@ commands_pre = 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 @@ -134,14 +153,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 @@ -168,28 +190,138 @@ commands_pre = mypyinstalled: pip install file://{toxinidir}/opentelemetry-api/ commands = - api: pytest {toxinidir}/opentelemetry-api/tests {posargs} - sdk: pytest {toxinidir}/opentelemetry-sdk/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 {toxinidir}/opentelemetry-sdk + 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 benchmark-opentelemetry-sdk: pytest {toxinidir}/opentelemetry-sdk/benchmarks {posargs} --benchmark-json=sdk-benchmark.json - 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-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}/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: pylint {toxinidir}/tests/opentelemetry-test-utils/src/opentelemetry + lint-opentelemetry-test-utils: pylint {toxinidir}/tests/opentelemetry-test-utils/tests coverage: {toxinidir}/scripts/coverage.sh @@ -212,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