-
Notifications
You must be signed in to change notification settings - Fork 16
feat: interactive evaluation mode - #629 #630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Add Optional type hints for Path parameters - Add Dict and Any imports for type annotations - Add null checks for process.stdout before iteration - Add type annotations for evaluation dictionaries - Fix return type for _add_evaluations_interactive
- Move imports to top of file - Replace all bare except clauses with Exception - Remove unused f-string prefixes - Fix import organization
Replace hardcoded 2025-01-25 timestamps with datetime.now(timezone.utc) for createdAt and updatedAt fields in eval sets and evaluators.
Reorganized the monolithic _eval_interactive.py into a maintainable module structure under src/uipath/_cli/_interactive/: - __init__.py: Module exports - _main.py: Main CLI class and entry point - _navigation.py: Navigation and input handling - _discovery.py: File discovery for eval sets and evaluators - _eval_sets.py: Eval set creation and management - _evaluators.py: Evaluator creation and management - _execution.py: Evaluation execution utilities - _drill_down.py: Drill-down navigation views Benefits: - Easier to maintain and extend individual features - Clear separation of concerns - Better code organization - Each file has a single responsibility Updated pyproject.toml to disable misc/unused-ignore mypy errors for interactive module (known limitation with mixin pattern).
- Formatted all files in _interactive/ module with ruff - Ensures consistent code style across the codebase
4436ead
to
d18dd75
Compare
"""Navigation and input handling for interactive CLI.""" | ||
|
||
import sys | ||
import termios |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
termios
doesn't work on Windows.
try:
import termios
import tty
HAS_TERMIOS = True
except ImportError:
HAS_TERMIOS = False
try:
import msvcrt
HAS_MSVCRT = True
except ImportError:
HAS_MSVCRT = False
HAS_NAVIGATION = HAS_TERMIOS or HAS_MSVCRT
|
||
from .._utils._console import ConsoleLogger | ||
|
||
if TYPE_CHECKING: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TYPE_CHECKING is a band-aid for bad architecture. If you have circular dependencies, the real fix is to restructure the code, not work around it with import tricks.
is_flag=True, | ||
help="Launch streamlined keyboard-only interactive CLI", | ||
default=False, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An interactive CLI makes more sense as a general dev mode, not just for evals:
uipath dev # Terminal UI (default)
uipath dev cli # CLI interface
uipath dev web # Web interface
Adds interactive CLI for evaluation management with keyboard navigation.
Features:
evaluationSets/
andevaluators/
foldersFixes #629
Development Package