Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: installation of test packages in eachdist #794

Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,4 @@ sphinx-rtd-theme~=0.4
sphinx-autodoc-typehints~=1.10.2
pytest!=5.2.3
pytest-cov>=2.8
readme-renderer~=24.0
httpretty~=1.0
opentracing~=2.2.0
readme-renderer~=24.0
1 change: 1 addition & 0 deletions docs/examples/opentelemetry-example-app/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"requests",
"protobuf~=3.11",
],
extras_require={"test": []},
license="Apache-2.0",
package_dir={"": "src"},
packages=setuptools.find_namespace_packages(where="src"),
Expand Down
5 changes: 4 additions & 1 deletion ext/opentelemetry-exporter-cloud-monitoring/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,7 @@ install_requires =
google-cloud-monitoring

[options.packages.find]
where = src
where = src

[options.extras_require]
test =
3 changes: 3 additions & 0 deletions ext/opentelemetry-exporter-cloud-trace/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,6 @@ install_requires =

[options.packages.find]
where = src

[options.extras_require]
test =
3 changes: 3 additions & 0 deletions ext/opentelemetry-ext-aiohttp-client/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,6 @@ install_requires =

[options.packages.find]
where = src

[options.extras_require]
test =
3 changes: 3 additions & 0 deletions ext/opentelemetry-ext-datadog/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,6 @@ install_requires =

[options.packages.find]
where = src

[options.extras_require]
test =
3 changes: 3 additions & 0 deletions ext/opentelemetry-ext-jaeger/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,6 @@ install_requires =

[options.packages.find]
where = src

[options.extras_require]
test =
3 changes: 3 additions & 0 deletions ext/opentelemetry-ext-opencensusexporter/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,6 @@ install_requires =

[options.packages.find]
where = src

[options.extras_require]
test =
1 change: 1 addition & 0 deletions ext/opentelemetry-ext-opentracing-shim/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ install_requires =
[options.extras_require]
test =
opentelemetry-test == 0.9.dev0
opentracing ~= 2.2.0

[options.packages.find]
where = src
3 changes: 3 additions & 0 deletions ext/opentelemetry-ext-prometheus/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,6 @@ install_requires =

[options.packages.find]
where = src

[options.extras_require]
test =
3 changes: 3 additions & 0 deletions ext/opentelemetry-ext-zipkin/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,6 @@ install_requires =

[options.packages.find]
where = src

[options.extras_require]
test =
3 changes: 3 additions & 0 deletions opentelemetry-api/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,6 @@ opentelemetry_meter_provider =
default_meter_provider = opentelemetry.metrics:DefaultMeterProvider
opentelemetry_tracer_provider =
default_tracer_provider = opentelemetry.trace:DefaultTracerProvider

[options.extras_require]
test =
3 changes: 3 additions & 0 deletions opentelemetry-instrumentation/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,6 @@ where = src
console_scripts =
opentelemetry-instrument = opentelemetry.instrumentation.auto_instrumentation:run
opentelemetry-bootstrap = opentelemetry.instrumentation.bootstrap:run

[options.extras_require]
test =
3 changes: 3 additions & 0 deletions opentelemetry-proto/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,6 @@ install_requires =

[options.packages.find]
where = src

[options.extras_require]
test =
3 changes: 3 additions & 0 deletions opentelemetry-sdk/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,6 @@ opentelemetry_meter_provider =
sdk_meter_provider = opentelemetry.sdk.metrics:MeterProvider
opentelemetry_tracer_provider =
sdk_tracer_provider = opentelemetry.sdk.trace:TracerProvider

[options.extras_require]
test =
17 changes: 15 additions & 2 deletions scripts/eachdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ def setup_instparser(instparser):

setup_instparser(instparser)
instparser.add_argument("--editable", "-e", action="store_true")
instparser.add_argument("--with-test-deps", action="store_true")
instparser.add_argument("--with-dev-deps", action="store_true")
instparser.add_argument("--eager-upgrades", action="store_true")

Expand All @@ -214,7 +215,10 @@ def setup_instparser(instparser):
)
setup_instparser(devparser)
devparser.set_defaults(
editable=True, with_dev_deps=True, eager_upgrades=True
editable=True,
with_dev_deps=True,
eager_upgrades=True,
with_test_deps=True,
)

lintparser = subparsers.add_parser(
Expand Down Expand Up @@ -424,7 +428,16 @@ def install_args(args):
check=True,
)

allfmt = "-e 'file://{}'" if args.editable else "'file://{}'"
allfmt = "-e 'file://{}" if args.editable else "'file://{}"
# packages should provide an extra_requires that is named
# 'test', to denote test dependencies.
extras = []
if args.with_test_deps:
extras.append("test")
if extras:
allfmt += "[{}]".format(",".join(extras))
# note the trailing single quote, to close the quote opened above.
allfmt += "'"
execute_args(
parse_subargs(
args,
Expand Down