File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 format_fixture_scope ,
1111)
1212from protest .entities .events import (
13+ EvalPayload ,
14+ EvalScoreEntry ,
1315 FixtureInfo ,
1416 HandlerInfo ,
1517 RunResult ,
3133from protest .entities .xfail import Xfail , normalize_xfail
3234
3335__all__ = [
36+ "EvalPayload" ,
37+ "EvalScoreEntry" ,
3438 "Fixture" ,
3539 "FixtureCallable" ,
3640 "FixtureInfo" ,
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ class TestRegistration:
4949 xfail : Xfail | None = None
5050 timeout : float | None = None
5151 retry : Retry | None = None
52+ is_eval : bool = False
5253
5354
5455@dataclass (frozen = True , slots = True )
@@ -111,6 +112,7 @@ class TestItem:
111112 xfail : Xfail | None = None
112113 timeout : float | None = None
113114 retry : Retry | None = None
115+ is_eval : bool = False
114116
115117 @property
116118 def test_name (self ) -> str :
Original file line number Diff line number Diff line change @@ -58,6 +58,11 @@ def lower(self) -> str:
5858 """Return lowercase string representation for case-insensitive comparison."""
5959 return self ._path .lower ()
6060
61+ @property
62+ def root_name (self ) -> str :
63+ """Return the top-level suite name: 'A::B::C' -> 'A'."""
64+ return self .parts [0 ] if self .parts else ""
65+
6166 def __str__ (self ) -> str :
6267 return self ._path
6368
Original file line number Diff line number Diff line change @@ -49,6 +49,9 @@ rich = [
4949web = [
5050 " websockets>=12.0" ,
5151]
52+ evals = [
53+ " pydantic-evals>=0.1" ,
54+ ]
5255
5356
5457[tool .ruff ]
@@ -100,6 +103,23 @@ ignore = [
100103 " PLC0415" , # lazy import for optional rich dependency
101104 " PLR0913" , # many args is deliberate API design
102105]
106+ "protest/core/execution/test_executor.py" = [
107+ " PLR0915" , # _run_test is inherently complex (retry loop + eval capture)
108+ ]
109+ "protest/history/**" = [
110+ " PLC0415" , # lazy imports
111+ " S603" , # subprocess git calls are safe
112+ " PLR0913" , # load_history has many filter params by design
113+ ]
114+ "protest/cli/history.py" = [
115+ " T201" , # print for CLI output
116+ " PLC0415" , # lazy imports
117+ ]
118+ "protest/evals/**" = [
119+ " T201" , # print for eval reporting
120+ " PLC0415" , # lazy imports for optional pydantic-evals dependency
121+ " PLR0913" , # adapter functions have many params by design
122+ ]
103123"protest/reporting/ascii.py" = [
104124 " T201" , # print is the purpose of this module
105125]
You can’t perform that action at this time.
0 commit comments