Skip to content

ci(release): handle giskard-llm#2430

Merged
kevinmessiaen merged 2 commits intomainfrom
ci/release-giskard-llm
Apr 29, 2026
Merged

ci(release): handle giskard-llm#2430
kevinmessiaen merged 2 commits intomainfrom
ci/release-giskard-llm

Conversation

@kevinmessiaen
Copy link
Copy Markdown
Member

No description provided.

@kevinmessiaen kevinmessiaen requested a review from a team as a code owner April 29, 2026 03:04
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a mechanism to filter tests by provider using the TEST_PROVIDER environment variable. Feedback includes adding the bare mark to the openai provider group for consistency with documentation and refactoring the provider parsing logic to avoid redundant environment variable lookups.

# - ``openai`` includes ``bare`` (same OpenAI SDK, no ``configure()`` path).
# - ``google`` includes ``gemini`` (same ``google.genai`` SDK, different routing prefix).
_TEST_PROVIDER_GROUPS: dict[str, frozenset[str]] = {
"openai": frozenset({"openai"}),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The openai group is missing the bare mark, which contradicts the comment on line 20 stating that openai includes bare.

Suggested change
"openai": frozenset({"openai"}),
"openai": frozenset({"openai", "bare"}),

Comment thread libs/giskard-llm/tests/conftest.py Outdated
Comment on lines +31 to +38
def _parse_test_provider() -> frozenset[str] | None:
"""Return allowed provider marks, or ``None`` if filtering is disabled."""

raw = os.environ.get("TEST_PROVIDER", "").strip()
if not raw or raw.lower() == "all":
return None
key = raw.lower()
return _TEST_PROVIDER_GROUPS.get(key, frozenset({key}))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The environment variable TEST_PROVIDER is fetched and stripped again in pytest_collection_modifyitems. It would be cleaner to have _parse_test_provider return both the allowed set and the raw display name to avoid redundant lookups.

def _parse_test_provider() -> tuple[frozenset[str], str] | None:\n    """Return (allowed provider marks, display name), or ``None`` if filtering is disabled."""\n\n    raw = os.environ.get("TEST_PROVIDER", "").strip()\n    if not raw or raw.lower() == "all":\n        return None\n    key = raw.lower()\n    return _TEST_PROVIDER_GROUPS.get(key, frozenset({key})), raw

Comment thread libs/giskard-llm/tests/conftest.py Outdated
Comment on lines +61 to +64
allowed = _parse_test_provider()
if allowed is not None:
tp_disp = os.environ.get("TEST_PROVIDER", "").strip() or "?"
for item in items:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This change utilizes the updated _parse_test_provider to avoid redundant environment variable lookups.

    parsed = _parse_test_provider()\n    if parsed is not None:\n        allowed, tp_disp = parsed\n        for item in items:

@kevinmessiaen kevinmessiaen merged commit 93db779 into main Apr 29, 2026
6 checks passed
@kevinmessiaen kevinmessiaen deleted the ci/release-giskard-llm branch April 29, 2026 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant