Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,9 @@ All notable changes to SkillEvaluator are documented in this file.

### Fixed

- `evaluate` and `tier3 evaluate` on a base install (without the `tier3` extra)
now say to install `skillevaluator[tier3]` instead of printing only
`Error: No module named 'harbor'`.
- Arms fully denied by a run budget are reported as not run instead of failed
empty Harbor jobs. Budget-partial runs remain incomplete without an execution
error when all admitted attempts succeed, including stop-on-pass runs. Reused
Expand Down
4 changes: 4 additions & 0 deletions src/skillevaluator/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -4012,6 +4012,10 @@ def prepare_local_runtime() -> None:
raise click.exceptions.Exit(1)
except (click.ClickException, click.exceptions.Exit):
raise
except ImportError as exc:
raise click.ClickException(
"Tier 3 dependencies are not installed. Install skillevaluator[tier3] and try again."
) from exc
except Exception as exc:
raise click.ClickException(str(exc)) from exc

Expand Down
16 changes: 16 additions & 0 deletions tests/test_cli.py
Comment thread
chrisknvidia marked this conversation as resolved.
Resolved
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,22 @@ def _fake_evaluate(self, options, *, progress_reporter=None):
}


@pytest.mark.parametrize("command", [["evaluate"], ["tier3", "evaluate"]])
def test_evaluate_without_the_tier3_extra_names_the_missing_extra(monkeypatch: pytest.MonkeyPatch, command) -> None:
from skillevaluator.evaluation import EvaluationService

def _missing_harbor(self, options, *, progress_reporter=None):
raise ModuleNotFoundError("No module named 'harbor'", name="harbor")

monkeypatch.setattr(EvaluationService, "evaluate", _missing_harbor, raising=True)
result = CliRunner().invoke(
cli, [*command, str(Path(__file__).parent / "fixtures" / "skills" / "simple"), "--progress", "plain"]
)

assert result.exit_code == 1
assert "Install skillevaluator[tier3]" in result.output


def test_standalone_evaluate_refuses_a_non_canonical_revision(monkeypatch: pytest.MonkeyPatch) -> None:
"""Refusing at the boundary beats a card that says the field was never recorded."""
from skillevaluator.evaluation import EvaluationService
Expand Down
Loading