{{ message }}
Repository navigation
Conversation
The except ImportError guard around `from griptape.engines.rag import RagContext` re-raised with the message copied verbatim from opik.py, so a missing griptape install told users to run `pip install opik`. Name the package that is actually missing and chain the original ImportError with `from e`, matching the ag_ui integration guard.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Issue Link / Problem Description
src/ragas/integrations/griptape.pywrapsfrom griptape.engines.rag import RagContextin a try/except whose message was copied verbatim from the Opik tracer, so a missinggriptapeinstall tells users to install the wrong package:Reproduce with a plain install (no extras) and:
Changes Made
src/ragas/integrations/griptape.py: theImportErrornow names the package that is actually missing (pip install griptape) and chains the original error withfrom e, matching the guard style insrc/ragas/integrations/ag_ui.py.tests/unit/integrations/test_griptape.py: regression test that simulates a missinggriptapemodule and asserts the raisedImportErrormentionsgriptape, notopik, and chains the originalImportError.Testing
How to Test
uv run --active pytest tests/unit/integrations/test_griptape.py— passes (1 passed); fails onmainwithAssertionError: assert 'griptape' in 'opik is not installed. please install it usingpip install opikto use the opik tracer.'uv run --active pytest tests/unit—805 passed, 89 skipped; the 7 remaining failures (test_tracing.py::TestLangfuseIntegration×2,test_experiment.py::TestVersionExperiment×5) also fail on unpatchedmainand are unrelated to this changeuv run --active ruff check src tests docs --exclude src/ragas/_version.py --config pyproject.toml—All checks passed!uv run --active ruff format --check src/ragas/integrations/griptape.py tests/unit/integrations/test_griptape.py --config pyproject.toml—2 files already formattedPYRIGHT_PYTHON_FORCE_VERSION=latest uv run --active pyright -p pyproject.toml src/ragas/integrations/griptape.py—0 errors, 0 warnings, 0 informationsReferences
src/ragas/integrations/ag_ui.pyScreenshots/Examples (if applicable)
Before:
After: