fix: handle incomplete chart encodings, optional agent deps, and unsafe table loading - #20
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes several robustness and packaging issues across VisEval: it hardens order_check against incomplete chart encodings (preventing KeyErrors), makes agent dependencies optional via extras, and removes unsafe dynamic execution from agent table loading.
Changes:
- Prevent duplicate invocation of
order_check()in legality evaluation and add defensive checks for missing encoding/scale/mapping inorder_check. - Replace
exec-based table loading inCoML4VISwith directpd.read_csv+describe_variableand add tests. - Add an
[agents]optional dependency group and update docs/imports to avoid requiring agent deps by default.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
viseval/evaluate.py |
Removes redundant order_check call during legality checking. |
viseval/check/order_check.py |
Adds guards for missing/partial encodings to avoid KeyErrors. |
tests/test_order_check.py |
Adds regression tests for incomplete chart info handling. |
tests/test_coml4vis.py |
Adds test ensuring read_table() no longer uses dynamic execution. |
README.md |
Documents installing optional agent dependencies via extras. |
pyproject.toml |
Introduces [project.optional-dependencies].agents and pins langchain. |
examples/evaluate.py |
Lazily imports agents to avoid import-time optional dependency failures. |
examples/agent/coml4vis.py |
Removes exec in read_table() and constructs variable descriptions directly. |
examples/agent/__init__.py |
Switches to lazy imports for agents via __getattr__. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+15
to
+19
| def __getattr__(name): | ||
| if name not in _AGENT_MODULES: | ||
| raise AttributeError(f"module {__name__!r} has no attribute {name!r}") | ||
| module = import_module(_AGENT_MODULES[name], __name__) | ||
| return getattr(module, name) |
cxxxxxn (cxxxxxn)
force-pushed
the
pr-fixes
branch
from
July 21, 2026 03:26
e1eba48 to
c017516
Compare
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.
Fixes #13.
Fixes #18.
Fixes #19.
Changes
Rebased onto the latest
main.