From 9ba2d1d8372116157ecf858c88730cbf3e39f60e Mon Sep 17 00:00:00 2001 From: Owais Lone Date: Wed, 10 Nov 2021 06:39:36 +0530 Subject: [PATCH] Release opentelemetry-test fixes #2263 --- .github/workflows/test.yml | 2 +- CHANGELOG.md | 2 ++ eachdist.ini | 2 +- scripts/build.sh | 2 +- tests/opentelemetry-tests/README.rst | 10 ++++++++++ tests/{util => opentelemetry-tests}/setup.cfg | 2 +- tests/{util => opentelemetry-tests}/setup.py | 0 .../src/opentelemetry/test/asgitestutil.py | 0 .../src/opentelemetry/test/concurrency_test.py | 0 .../src/opentelemetry/test/globals_test.py | 0 .../src/opentelemetry/test/httptest.py | 0 .../src/opentelemetry/test/mock_textmap.py | 0 .../src/opentelemetry/test/spantestutil.py | 0 .../src/opentelemetry/test/test_base.py | 0 .../src/opentelemetry/test/version.py | 0 .../src/opentelemetry/test/wsgitestutil.py | 0 tests/util/README.rst | 9 --------- tox.ini | 8 ++++---- 18 files changed, 20 insertions(+), 17 deletions(-) create mode 100644 tests/opentelemetry-tests/README.rst rename tests/{util => opentelemetry-tests}/setup.cfg (98%) rename tests/{util => opentelemetry-tests}/setup.py (100%) rename tests/{util => opentelemetry-tests}/src/opentelemetry/test/asgitestutil.py (100%) rename tests/{util => opentelemetry-tests}/src/opentelemetry/test/concurrency_test.py (100%) rename tests/{util => opentelemetry-tests}/src/opentelemetry/test/globals_test.py (100%) rename tests/{util => opentelemetry-tests}/src/opentelemetry/test/httptest.py (100%) rename tests/{util => opentelemetry-tests}/src/opentelemetry/test/mock_textmap.py (100%) rename tests/{util => opentelemetry-tests}/src/opentelemetry/test/spantestutil.py (100%) rename tests/{util => opentelemetry-tests}/src/opentelemetry/test/test_base.py (100%) rename tests/{util => opentelemetry-tests}/src/opentelemetry/test/version.py (100%) rename tests/{util => opentelemetry-tests}/src/opentelemetry/test/wsgitestutil.py (100%) delete mode 100644 tests/util/README.rst diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2abba7c24ab..ec3432b2ad4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,7 +10,7 @@ env: # Otherwise, set variable to the commit of your branch on # opentelemetry-python-contrib which is compatible with these Core repo # changes. - CONTRIB_REPO_SHA: a7c054b257225948c68a9dccb3f2973537d9b4ec + CONTRIB_REPO_SHA: 45f1bfa679eff4659aa02254db258f995cf987cf # This is needed because we do not clone the core repo in contrib builds anymore. # When running contrib builds as part of core builds, we use actions/checkout@v2 which # does not set an environment variable (simply just runs tox), which is different when diff --git a/CHANGELOG.md b/CHANGELOG.md index aba1ba1f006..a7451a55f0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ([#2242](https://github.com/open-telemetry/opentelemetry-python/pull/2242)) - `opentelemetry-sdk` Sanitize env var resource attribute pairs ([#2256](https://github.com/open-telemetry/opentelemetry-python/pull/2256)) +- `opentelemetry-test` start releasing to pypi.org + ([#2269](https://github.com/open-telemetry/opentelemetry-python/pull/2269)) ## [1.6.2-0.25b2](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.6.2-0.25b2) - 2021-10-19 diff --git a/eachdist.ini b/eachdist.ini index e239102e27a..76d5c6df790 100644 --- a/eachdist.ini +++ b/eachdist.ini @@ -7,7 +7,7 @@ sortfirst= opentelemetry-sdk opentelemetry-proto opentelemetry-distro - tests/util + tests/opentelemetry-tests exporter/* [stable] diff --git a/scripts/build.sh b/scripts/build.sh index 63faa001bc3..e1b0b7e580b 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -16,7 +16,7 @@ DISTDIR=dist mkdir -p $DISTDIR rm -rf $DISTDIR/* - for d in opentelemetry-api/ opentelemetry-sdk/ opentelemetry-proto/ opentelemetry-semantic-conventions/ exporter/*/ shim/*/ propagator/*/; do + for d in opentelemetry-api/ opentelemetry-sdk/ opentelemetry-proto/ opentelemetry-semantic-conventions/ exporter/*/ shim/*/ propagator/*/ tests/opentelemetry-tests/; do ( echo "building $d" cd "$d" diff --git a/tests/opentelemetry-tests/README.rst b/tests/opentelemetry-tests/README.rst new file mode 100644 index 00000000000..774669cb8b7 --- /dev/null +++ b/tests/opentelemetry-tests/README.rst @@ -0,0 +1,10 @@ +OpenTelemetry Test Utilities +============================ + +This package provides internal testing utilities for the OpenTelemetry Python project and provides no stability or quality guarantees. +Please do not use it for anything other than writing or running tests for the OpenTelemetry Python project (github.com/open-telemetry/opentelemetry-python). + + +References +---------- +* `OpenTelemetry Project `_ diff --git a/tests/util/setup.cfg b/tests/opentelemetry-tests/setup.cfg similarity index 98% rename from tests/util/setup.cfg rename to tests/opentelemetry-tests/setup.cfg index 5274a2d876e..8e1ce0f758d 100644 --- a/tests/util/setup.cfg +++ b/tests/opentelemetry-tests/setup.cfg @@ -17,7 +17,7 @@ name = opentelemetry-test description = Test utilities for OpenTelemetry unit tests author = OpenTelemetry Authors author_email = cncf-opentelemetry-contributors@lists.cncf.io -url = https://github.com/open-telemetry/opentelemetry-python/tests/util +url = https://github.com/open-telemetry/opentelemetry-python/tests/opentelemetry-tests platforms = any license = Apache-2.0 classifiers = diff --git a/tests/util/setup.py b/tests/opentelemetry-tests/setup.py similarity index 100% rename from tests/util/setup.py rename to tests/opentelemetry-tests/setup.py diff --git a/tests/util/src/opentelemetry/test/asgitestutil.py b/tests/opentelemetry-tests/src/opentelemetry/test/asgitestutil.py similarity index 100% rename from tests/util/src/opentelemetry/test/asgitestutil.py rename to tests/opentelemetry-tests/src/opentelemetry/test/asgitestutil.py diff --git a/tests/util/src/opentelemetry/test/concurrency_test.py b/tests/opentelemetry-tests/src/opentelemetry/test/concurrency_test.py similarity index 100% rename from tests/util/src/opentelemetry/test/concurrency_test.py rename to tests/opentelemetry-tests/src/opentelemetry/test/concurrency_test.py diff --git a/tests/util/src/opentelemetry/test/globals_test.py b/tests/opentelemetry-tests/src/opentelemetry/test/globals_test.py similarity index 100% rename from tests/util/src/opentelemetry/test/globals_test.py rename to tests/opentelemetry-tests/src/opentelemetry/test/globals_test.py diff --git a/tests/util/src/opentelemetry/test/httptest.py b/tests/opentelemetry-tests/src/opentelemetry/test/httptest.py similarity index 100% rename from tests/util/src/opentelemetry/test/httptest.py rename to tests/opentelemetry-tests/src/opentelemetry/test/httptest.py diff --git a/tests/util/src/opentelemetry/test/mock_textmap.py b/tests/opentelemetry-tests/src/opentelemetry/test/mock_textmap.py similarity index 100% rename from tests/util/src/opentelemetry/test/mock_textmap.py rename to tests/opentelemetry-tests/src/opentelemetry/test/mock_textmap.py diff --git a/tests/util/src/opentelemetry/test/spantestutil.py b/tests/opentelemetry-tests/src/opentelemetry/test/spantestutil.py similarity index 100% rename from tests/util/src/opentelemetry/test/spantestutil.py rename to tests/opentelemetry-tests/src/opentelemetry/test/spantestutil.py diff --git a/tests/util/src/opentelemetry/test/test_base.py b/tests/opentelemetry-tests/src/opentelemetry/test/test_base.py similarity index 100% rename from tests/util/src/opentelemetry/test/test_base.py rename to tests/opentelemetry-tests/src/opentelemetry/test/test_base.py diff --git a/tests/util/src/opentelemetry/test/version.py b/tests/opentelemetry-tests/src/opentelemetry/test/version.py similarity index 100% rename from tests/util/src/opentelemetry/test/version.py rename to tests/opentelemetry-tests/src/opentelemetry/test/version.py diff --git a/tests/util/src/opentelemetry/test/wsgitestutil.py b/tests/opentelemetry-tests/src/opentelemetry/test/wsgitestutil.py similarity index 100% rename from tests/util/src/opentelemetry/test/wsgitestutil.py rename to tests/opentelemetry-tests/src/opentelemetry/test/wsgitestutil.py diff --git a/tests/util/README.rst b/tests/util/README.rst deleted file mode 100644 index 58a75149bd7..00000000000 --- a/tests/util/README.rst +++ /dev/null @@ -1,9 +0,0 @@ -OpenTelemetry Test Utilities -============================ - -Test utilities for OpenTelemetry unit tests - - -References ----------- -* `OpenTelemetry Project `_ diff --git a/tox.ini b/tox.ini index 38da9cac543..d2b3427c133 100644 --- a/tox.ini +++ b/tox.ini @@ -79,7 +79,7 @@ setenv = ; i.e: CONTRIB_REPO_SHA=dde62cebffe519c35875af6d06fae053b3be65ec tox -e CONTRIB_REPO_SHA={env:CONTRIB_REPO_SHA:"main"} CONTRIB_REPO="git+https://github.com/open-telemetry/opentelemetry-python-contrib.git@{env:CONTRIB_REPO_SHA}" - mypy: MYPYPATH={toxinidir}/opentelemetry-api/src/:{toxinidir}/tests/util/src/ + mypy: MYPYPATH={toxinidir}/opentelemetry-api/src/:{toxinidir}/tests/opentelemetry-tests/src/ changedir = api: opentelemetry-api/tests @@ -108,7 +108,7 @@ commands_pre = py3{6,7,8,9,10}: python -m pip install -U pip setuptools wheel ; 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/util + opentelemetry: pip install {toxinidir}/opentelemetry-api {toxinidir}/opentelemetry-semantic-conventions {toxinidir}/opentelemetry-sdk {toxinidir}/tests/opentelemetry-tests protobuf: pip install {toxinidir}/opentelemetry-proto @@ -192,7 +192,7 @@ commands_pre = python -m pip install -e {toxinidir}/opentelemetry-semantic-conventions[test] python -m pip install -e {toxinidir}/opentelemetry-sdk[test] python -m pip install -e {toxinidir}/opentelemetry-proto[test] - python -m pip install -e {toxinidir}/tests/util[test] + python -m pip install -e {toxinidir}/tests/opentelemetry-tests[test] python -m pip install -e {toxinidir}/shim/opentelemetry-opentracing-shim[test] python -m pip install -e {toxinidir}/exporter/opentelemetry-exporter-jaeger-proto-grpc[test] python -m pip install -e {toxinidir}/exporter/opentelemetry-exporter-jaeger-thrift[test] @@ -254,7 +254,7 @@ commands_pre = pip install -e {toxinidir}/opentelemetry-api \ -e {toxinidir}/opentelemetry-semantic-conventions \ -e {toxinidir}/opentelemetry-sdk \ - -e {toxinidir}/tests/util \ + -e {toxinidir}/tests/opentelemetry-tests \ -e {toxinidir}/exporter/opentelemetry-exporter-opencensus \ -e {toxinidir}/opentelemetry-proto \ -e {toxinidir}/exporter/opentelemetry-exporter-otlp-proto-grpc \