Fix global tox test matrix failures and linters - #367
Conversation
Pull request dashboard statusWaiting on the author · refreshed 2026-08-24 19:29 UTC Respond to 1 review item (e.g. link a commit, explain why not, ask a follow-up):
Status above doesn't look right?
|
There was a problem hiding this comment.
Pull request overview
This PR aims to stabilize repo-wide CI/linting by reducing noise and failures from generated/virtualenv directories and aligning pytest-asyncio behavior with expected fixture scoping.
Changes:
- Update the
shellchecktox env to skip.tox,.venv, andtest_envdirectories and avoid runningshellcheckwhen no scripts are found. - Exclude
test_envfrom the license-header checker and codespell scans. - Set
pytest-asyncio’s default fixture loop scope tofunctionviapytest.ini.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
tox.ini |
Adjusts shellcheck invocation and directory exclusions for repo-wide lint stability. |
scripts/check_license_header.py |
Skips test_env to avoid false failures when scanning for SPDX headers. |
pytest.ini |
Sets asyncio_default_fixture_loop_scope to reduce asyncio/fixture-related test failures. |
.codespellrc |
Excludes test_env from spelling checks to avoid scanning generated environments. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| addopts = -rfE -v | ||
| log_cli = true | ||
| log_cli_level = warning | ||
| asyncio_default_fixture_loop_scope = function |
There was a problem hiding this comment.
This won't reach the packages that define their own [tool.pytest.ini_options]. pytest stops its config lookup at the package pyproject.toml and never reads root pytest.ini. Affected: anthropic, agno, crewai, smolagents, llama-index, claude-agent-sdk. Those envs will keep emitting the warning.
Simplest fix: drop the [tool.pytest.ini_options] blocks from those six pyproject.tomls so root config applies everywhere. Otherwise the setting has to be duplicated into each.
|
Hi @royrhea — just a friendly reminder that this pull request is waiting on you. The dashboard status comment has the open items and is kept current.
|
…usion and shellcheck command
|
@lmolkova Thanks for the feedback! I've updated the PR to address all your suggestions:
The CI test matrix and linters are all fully green on my end now! Let me know if you need me to make any other changes. |
|
@royrhea can you fill out the PR template or file an issue? It's not clear to me what problem this PR solves. The tox tests all pass fine atm. |
|
@aabmass I've updated the PR description with the filled-out template. To answer your question, you're right that CI passes fine. This PR fixes issues that only occur during local development (like shellcheck failing on leftover .tox folders) and consolidates our pytest configuration so global options aren't ignored. |
Description
This PR fixes issues encountered during local development when running tox environments, and consolidates pytest configuration. It doesn't fix a CI failure, because CI runs in a clean environment, but it improves the local developer experience.
Motivation and context:
pytest.ini: Removed[tool.pytest.ini_options]from individual instrumentationpyproject.tomlfiles. When packages have their own pytest config, pytest ignores the globalpytest.ini. This was causing global settings (likeaddoptsandlog_cli) to be ignored. It also allows us to setasyncio_default_fixture_loop_scope = functionin one place globally to fix deprecation warnings frompytest-asyncio>= 0.24, instead of repeating it in every package.shellchecktox env locally: Updated thetox.inicommand forshellcheckto exclude*/.tox/*and*/.venv/*. Previously, if a developer rantox -e shellchecklocally after having run other tests,findwould locate.shscripts inside virtual environments and fail. CI passed fine because it always runs in a pristine environment without leftover.toxfolders.Fixes # (No associated issue)
Type of change
How has this been tested?
tox -e shellchecklocally with existing.toxand.venvfolders, verified it passes instead of failing on dependency shell scripts.pytestlocally in an instrumentation package, verifiedasyncio_default_fixture_loop_scopewarnings are resolved and globaladdoptsapply.Checklist