From 07e5aed28ed7bf75b4ead9129f49a0f8fcc2cc95 Mon Sep 17 00:00:00 2001 From: Rishita Date: Mon, 10 Aug 2026 00:21:10 +0530 Subject: [PATCH 1/2] Fix global tox test matrix failures and linters --- .codespellrc | 2 +- pytest.ini | 1 + scripts/check_license_header.py | 1 + tox.ini | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.codespellrc b/.codespellrc index e20054be5..f85d0dafd 100644 --- a/.codespellrc +++ b/.codespellrc @@ -3,5 +3,5 @@ [codespell] check-hidden = true # skipping auto generated folders -skip = ./.git,./.tox,./.venv,./.mypy_cache,./docs/_build,./target,*/LICENSE,./venv,*/cassettes +skip = ./.git,./.tox,./.venv,./test_env,./.mypy_cache,./docs/_build,./target,*/LICENSE,./venv,*/cassettes ignore-words-list = ot diff --git a/pytest.ini b/pytest.ini index 886af1c76..bf1a6c984 100644 --- a/pytest.ini +++ b/pytest.ini @@ -3,3 +3,4 @@ addopts = -rfE -v log_cli = true log_cli_level = warning +asyncio_default_fixture_loop_scope = function diff --git a/scripts/check_license_header.py b/scripts/check_license_header.py index 500476344..286802c68 100644 --- a/scripts/check_license_header.py +++ b/scripts/check_license_header.py @@ -16,6 +16,7 @@ "target", ".tox", ".venv", + "test_env", "__pycache__", "node_modules", ) diff --git a/tox.ini b/tox.ini index ce3694aa0..3904d7adb 100644 --- a/tox.ini +++ b/tox.ini @@ -348,7 +348,7 @@ commands_pre = sh -c "sudo apt update -y && sudo apt install --assume-yes shellcheck" commands = - sh -c "find {toxinidir} -name \*.sh | xargs shellcheck --severity=warning" + sh -c "find {toxinidir} -type f -name \*.sh -not -path '*/.tox/*' -not -path '*/.venv/*' -not -path '*/test_env/*' | xargs --no-run-if-empty shellcheck --severity=warning" [testenv:{precommit,ruff}] basepython: python3 From e2d2cd51b19b0d87decc335384ff463771471444 Mon Sep 17 00:00:00 2001 From: Rishita Date: Tue, 18 Aug 2026 01:43:32 +0530 Subject: [PATCH 2/2] fix: resolve review comments for pytest.ini loop scope, test_env exclusion and shellcheck command --- .codespellrc | 2 +- .../opentelemetry-instrumentation-genai-agno/pyproject.toml | 3 --- .../pyproject.toml | 6 ------ .../pyproject.toml | 3 --- .../pyproject.toml | 3 --- .../pyproject.toml | 3 --- .../pyproject.toml | 3 --- pytest.ini | 2 ++ scripts/check_license_header.py | 1 - tox.ini | 2 +- 10 files changed, 4 insertions(+), 24 deletions(-) diff --git a/.codespellrc b/.codespellrc index f85d0dafd..e20054be5 100644 --- a/.codespellrc +++ b/.codespellrc @@ -3,5 +3,5 @@ [codespell] check-hidden = true # skipping auto generated folders -skip = ./.git,./.tox,./.venv,./test_env,./.mypy_cache,./docs/_build,./target,*/LICENSE,./venv,*/cassettes +skip = ./.git,./.tox,./.venv,./.mypy_cache,./docs/_build,./target,*/LICENSE,./venv,*/cassettes ignore-words-list = ot diff --git a/instrumentation/opentelemetry-instrumentation-genai-agno/pyproject.toml b/instrumentation/opentelemetry-instrumentation-genai-agno/pyproject.toml index a4b53d926..6ae0386e4 100644 --- a/instrumentation/opentelemetry-instrumentation-genai-agno/pyproject.toml +++ b/instrumentation/opentelemetry-instrumentation-genai-agno/pyproject.toml @@ -50,9 +50,6 @@ include = ["/src", "/tests"] [tool.hatch.build.targets.wheel] packages = ["src/opentelemetry"] -[tool.pytest.ini_options] -testpaths = ["tests"] - [tool.towncrier] directory = ".changelog" filename = "CHANGELOG.md" diff --git a/instrumentation/opentelemetry-instrumentation-genai-anthropic/pyproject.toml b/instrumentation/opentelemetry-instrumentation-genai-anthropic/pyproject.toml index d46358cc6..63d9dfae2 100644 --- a/instrumentation/opentelemetry-instrumentation-genai-anthropic/pyproject.toml +++ b/instrumentation/opentelemetry-instrumentation-genai-anthropic/pyproject.toml @@ -50,12 +50,6 @@ include = ["/src", "/tests", "/examples"] [tool.hatch.build.targets.wheel] packages = ["src/opentelemetry"] -[tool.pytest.ini_options] -testpaths = ["tests"] -markers = [ - "conformance: GenAI semconv conformance scenario (run via the *-conformance tox envs)", -] - [tool.towncrier] directory = ".changelog" filename = "CHANGELOG.md" diff --git a/instrumentation/opentelemetry-instrumentation-genai-claude-agent-sdk/pyproject.toml b/instrumentation/opentelemetry-instrumentation-genai-claude-agent-sdk/pyproject.toml index 08375dc58..57133cd04 100644 --- a/instrumentation/opentelemetry-instrumentation-genai-claude-agent-sdk/pyproject.toml +++ b/instrumentation/opentelemetry-instrumentation-genai-claude-agent-sdk/pyproject.toml @@ -49,9 +49,6 @@ include = ["/src", "/tests", "/examples"] [tool.hatch.build.targets.wheel] packages = ["src/opentelemetry"] -[tool.pytest.ini_options] -testpaths = ["tests"] - [tool.towncrier] directory = ".changelog" filename = "CHANGELOG.md" diff --git a/instrumentation/opentelemetry-instrumentation-genai-crewai/pyproject.toml b/instrumentation/opentelemetry-instrumentation-genai-crewai/pyproject.toml index 447561a84..2a1f87a28 100644 --- a/instrumentation/opentelemetry-instrumentation-genai-crewai/pyproject.toml +++ b/instrumentation/opentelemetry-instrumentation-genai-crewai/pyproject.toml @@ -52,9 +52,6 @@ include = ["/src", "/tests"] [tool.hatch.build.targets.wheel] packages = ["src/opentelemetry"] -[tool.pytest.ini_options] -testpaths = ["tests"] - [tool.towncrier] directory = ".changelog" filename = "CHANGELOG.md" diff --git a/instrumentation/opentelemetry-instrumentation-genai-llama-index/pyproject.toml b/instrumentation/opentelemetry-instrumentation-genai-llama-index/pyproject.toml index 47bb2a27c..ad5cb3ca8 100644 --- a/instrumentation/opentelemetry-instrumentation-genai-llama-index/pyproject.toml +++ b/instrumentation/opentelemetry-instrumentation-genai-llama-index/pyproject.toml @@ -50,9 +50,6 @@ include = ["/src", "/tests"] [tool.hatch.build.targets.wheel] packages = ["src/opentelemetry"] -[tool.pytest.ini_options] -testpaths = ["tests"] - [tool.towncrier] directory = ".changelog" filename = "CHANGELOG.md" diff --git a/instrumentation/opentelemetry-instrumentation-genai-smolagents/pyproject.toml b/instrumentation/opentelemetry-instrumentation-genai-smolagents/pyproject.toml index 9f7ed96ed..657ef441b 100644 --- a/instrumentation/opentelemetry-instrumentation-genai-smolagents/pyproject.toml +++ b/instrumentation/opentelemetry-instrumentation-genai-smolagents/pyproject.toml @@ -50,9 +50,6 @@ include = ["/src", "/tests"] [tool.hatch.build.targets.wheel] packages = ["src/opentelemetry"] -[tool.pytest.ini_options] -testpaths = ["tests"] - [tool.towncrier] directory = ".changelog" filename = "CHANGELOG.md" diff --git a/pytest.ini b/pytest.ini index bf1a6c984..8ee827e66 100644 --- a/pytest.ini +++ b/pytest.ini @@ -4,3 +4,5 @@ addopts = -rfE -v log_cli = true log_cli_level = warning asyncio_default_fixture_loop_scope = function +markers = + conformance: GenAI semconv conformance scenario (run via the *-conformance tox envs) diff --git a/scripts/check_license_header.py b/scripts/check_license_header.py index 286802c68..500476344 100644 --- a/scripts/check_license_header.py +++ b/scripts/check_license_header.py @@ -16,7 +16,6 @@ "target", ".tox", ".venv", - "test_env", "__pycache__", "node_modules", ) diff --git a/tox.ini b/tox.ini index 3904d7adb..68a66680b 100644 --- a/tox.ini +++ b/tox.ini @@ -348,7 +348,7 @@ commands_pre = sh -c "sudo apt update -y && sudo apt install --assume-yes shellcheck" commands = - sh -c "find {toxinidir} -type f -name \*.sh -not -path '*/.tox/*' -not -path '*/.venv/*' -not -path '*/test_env/*' | xargs --no-run-if-empty shellcheck --severity=warning" + sh -c "find {toxinidir} -type f -name '*.sh' -not -path '*/.tox/*' -not -path '*/.venv*/*' -not -path '*/venv*/*' -print0 | xargs -0 shellcheck --severity=warning" [testenv:{precommit,ruff}] basepython: python3