Skip to content

Conversation

Chibionos
Copy link
Contributor

@Chibionos Chibionos commented Oct 1, 2025

Adds interactive CLI for evaluation management with keyboard navigation.

Features:

  • Interactive mode with arrow key navigation
  • Create eval sets and evaluators via wizards
  • Drill-down views with backspace navigation
  • Auto-discovery from evaluationSets/ and evaluators/ folders

Fixes #629

Development Package

  • Add this package as a dependency in your pyproject.toml:
[project]
dependencies = [
  # Exact version:
  "uipath==2.1.71.dev1006301416",

  # Any version from PR
  "uipath>=2.1.71.dev1006300000,<2.1.71.dev1006310000"
]

[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
publish-url = "https://test.pypi.org/legacy/"
explicit = true

[tool.uv.sources]
uipath = { index = "testpypi" }

@Chibionos Chibionos added the enhancement New feature or request label Oct 1, 2025
@Chibionos Chibionos self-assigned this Oct 1, 2025
- 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
@Chibionos Chibionos force-pushed the chibicha/add-interactive-evals branch from 4436ead to d18dd75 Compare October 1, 2025 04:24
@radu-mocanu radu-mocanu added the build:dev Create a dev build from the pr label Oct 1, 2025
"""Navigation and input handling for interactive CLI."""

import sys
import termios
Copy link
Member

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:
Copy link
Member

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,
)
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build:dev Create a dev build from the pr enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Interactive evaluation mode with comprehensive CLI

3 participants