Skip to content

Commit

Permalink
Use a single install command for lint (#3848)
Browse files Browse the repository at this point in the history
Fixes #3847
  • Loading branch information
ocelotl authored Apr 15, 2024
1 parent 9866842 commit 9398f26
Show file tree
Hide file tree
Showing 15 changed files with 109 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ opentelemetry-instrumentation==0.41b0
opentelemetry-instrumentation-flask==0.41b0
opentelemetry-instrumentation-wsgi==0.41b0
opentelemetry-sdk==1.20.0
protobuf==3.19.5
protobuf==3.20.3
six==1.15.0
thrift==0.13.0
uWSGI==2.0.22
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ opentelemetry-instrumentation==0.41b0
opentelemetry-instrumentation-flask==0.41b0
opentelemetry-instrumentation-wsgi==0.41b0
opentelemetry-sdk==1.20.0
protobuf==3.19.5
protobuf==3.20.3
six==1.15.0
thrift==0.13.0
uWSGI==2.0.22
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
from time import time

# pylint: disable=wrong-import-position
from google.protobuf.timestamp_pb2 import Timestamp
from google.protobuf.timestamp_pb2 import ( # pylint: disable=no-name-in-module
Timestamp,
)
from opencensus.proto.agent.common.v1 import common_pb2
from opencensus.proto.trace.v1 import trace_pb2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
from unittest import mock

import grpc
from google.protobuf.timestamp_pb2 import Timestamp
from google.protobuf.timestamp_pb2 import ( # pylint: disable=no-name-in-module
Timestamp,
)
from opencensus.proto.trace.v1 import trace_pb2

import opentelemetry.exporter.opencensus.util as utils
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
asgiref==3.7.2
attrs==23.2.0
Deprecated==1.2.14
flaky==3.7.0
importlib-metadata==6.11.0
iniconfig==2.0.0
packaging==23.2
pluggy==1.4.0
protobuf==3.20.3
py==1.11.0
py-cpuinfo==9.0.0
pytest==7.1.3
pytest-benchmark==4.0.0
tomli==2.0.1
typing_extensions==4.10.0
wrapt==1.16.0
zipp==3.17.0
-e opentelemetry-proto
-e exporter/opentelemetry-exporter-otlp-proto-common
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ importlib-metadata==6.11.0
iniconfig==2.0.0
packaging==23.2
pluggy==1.4.0
protobuf==3.19.6
protobuf==3.20.3
py==1.11.0
py-cpuinfo==9.0.0
pytest==7.1.3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
from unittest import TestCase
from unittest.mock import patch

from google.protobuf.duration_pb2 import Duration
from google.protobuf.duration_pb2 import ( # pylint: disable=no-name-in-module
Duration,
)
from google.rpc.error_details_pb2 import RetryInfo
from grpc import ChannelCredentials, Compression, StatusCode, server

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
from unittest import TestCase
from unittest.mock import Mock, patch

from google.protobuf.duration_pb2 import Duration
from google.protobuf.duration_pb2 import ( # pylint: disable=no-name-in-module
Duration,
)
from google.rpc.error_details_pb2 import RetryInfo
from grpc import Compression

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
from unittest import TestCase
from unittest.mock import patch

from google.protobuf.duration_pb2 import Duration
from google.protobuf.duration_pb2 import ( # pylint: disable=no-name-in-module
Duration,
)
from google.rpc.error_details_pb2 import RetryInfo
from grpc import ChannelCredentials, Compression, StatusCode, server

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
from unittest import TestCase
from unittest.mock import Mock, PropertyMock, patch

from google.protobuf.duration_pb2 import Duration
from google.protobuf.duration_pb2 import ( # pylint: disable=no-name-in-module
Duration,
)
from google.rpc.error_details_pb2 import RetryInfo
from grpc import ChannelCredentials, Compression, StatusCode, server

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ importlib-metadata==6.11.0
iniconfig==2.0.0
packaging==23.2
pluggy==1.4.0
protobuf==3.19.6
protobuf==3.20.3
py==1.11.0
py-cpuinfo==9.0.0
pytest==7.1.3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ importlib-metadata==6.11.0
iniconfig==2.0.0
packaging==23.2
pluggy==1.4.0
protobuf==3.20.3
py==1.11.0
py-cpuinfo==9.0.0
pytest==7.1.3
Expand Down
18 changes: 18 additions & 0 deletions opentelemetry-proto/test-requirements-1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
asgiref==3.7.2
attrs==23.2.0
Deprecated==1.2.14
flaky==3.7.0
importlib-metadata==6.11.0
iniconfig==2.0.0
packaging==23.2
pluggy==1.4.0
protobuf==4.25.3
py==1.11.0
py-cpuinfo==9.0.0
pytest==7.1.3
pytest-benchmark==4.0.0
tomli==2.0.1
typing_extensions==4.10.0
wrapt==1.16.0
zipp==3.17.0
-e opentelemetry-proto
84 changes: 49 additions & 35 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ envlist =
py3{8,9,10,11}-opentelemetry-api
pypy3-opentelemetry-api

; Test against both protobuf 3.x and 4.x
py3{8,9,10,11}-proto{3,4}-opentelemetry-protobuf
pypy3-proto{3,4}-opentelemetry-protobuf
; 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}-opentelemetry-sdk
pypy3-opentelemetry-sdk
Expand All @@ -31,18 +34,30 @@ envlist =
py3{8,9,10,11}-opentelemetry-exporter-opencensus
; exporter-opencensus intentionally excluded from pypy3

py3{8,9,10,11}-proto{3,4}-opentelemetry-exporter-otlp-proto-common
pypy3-proto{3,4}-opentelemetry-exporter-otlp-proto-common
; 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}

; opentelemetry-exporter-otlp
py3{8,9,10,11}-opentelemetry-exporter-otlp-combined
; intentionally excluded from pypy3

py3{8,9,10,11}-proto{3,4}-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-grpc-{0,1}
; intentionally excluded from pypy3

py3{8,9,10,11}-proto{3,4}-opentelemetry-exporter-otlp-proto-http
pypy3-opentelemetry-proto{3,4}-exporter-otlp-proto-http
; 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}-opentelemetry-exporter-prometheus
pypy3-opentelemetry-exporter-prometheus
Expand Down Expand Up @@ -109,7 +124,8 @@ commands_pre =
; 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

protobuf: pip install -r {toxinidir}/opentelemetry-proto/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

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
Expand All @@ -120,15 +136,16 @@ commands_pre =

exporter-opencensus: pip install -r {toxinidir}/exporter/opentelemetry-exporter-opencensus/test-requirements.txt

exporter-otlp-proto-common: pip install -r {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-common/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

exporter-otlp-combined: pip install -r {toxinidir}/exporter/opentelemetry-exporter-otlp/test-requirements.txt

proto3-opentelemetry-exporter-otlp-proto-grpc: pip install -r {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-grpc/test-requirements-0.txt
proto4-opentelemetry-exporter-otlp-proto-grpc: pip install -r {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-grpc/test-requirements-1.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

proto3-opentelemetry-exporter-otlp-proto-http: pip install -r {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-http/test-requirements-0.txt
proto4-opentelemetry-exporter-otlp-proto-http: pip install -r {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-http/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

opentracing-shim: pip install -r {toxinidir}/shim/opentelemetry-opentracing-shim/test-requirements.txt

Expand Down Expand Up @@ -204,27 +221,24 @@ deps =
-r dev-requirements.txt

commands_pre =
pip install -r {toxinidir}/opentelemetry-api/test-requirements.txt
pip install -r {toxinidir}/opentelemetry-sdk/test-requirements.txt
pip install -r {toxinidir}/opentelemetry-semantic-conventions/test-requirements.txt
pip install -r {toxinidir}/opentelemetry-proto/test-requirements.txt
pip install -r {toxinidir}/shim/opentelemetry-opentracing-shim/test-requirements.txt
pip install -r {toxinidir}/shim/opentelemetry-opencensus-shim/test-requirements.txt
pip install -r {toxinidir}/exporter/opentelemetry-exporter-opencensus/test-requirements.txt
pip install -r {toxinidir}/tests/opentelemetry-test-utils/test-requirements.txt
pip install -r {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-common/test-requirements.txt
pip install -r {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-http/test-requirements-1.txt
pip install -r {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-grpc/test-requirements-1.txt
pip install -r {toxinidir}/exporter/opentelemetry-exporter-prometheus/test-requirements.txt
pip install -r {toxinidir}/exporter/opentelemetry-exporter-zipkin-proto-http/test-requirements.txt
pip install -r {toxinidir}/exporter/opentelemetry-exporter-zipkin-json/test-requirements.txt
pip install -r {toxinidir}/exporter/opentelemetry-exporter-otlp/test-requirements.txt
pip install -r {toxinidir}/exporter/opentelemetry-exporter-zipkin/test-requirements.txt
pip install -r {toxinidir}/propagator/opentelemetry-propagator-b3/test-requirements.txt
pip install -r {toxinidir}/propagator/opentelemetry-propagator-jaeger/test-requirements.txt
# Pin protobuf version due to lint failing on v3.20.0
# https://github.com/protocolbuffers/protobuf/issues/9730
python -m pip install protobuf==3.19.4
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
Expand Down

0 comments on commit 9398f26

Please sign in to comment.