reeval-python 0.17.2__tar.gz → 0.19.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {reeval_python-0.17.2 → reeval_python-0.19.0}/PKG-INFO +7 -7
- {reeval_python-0.17.2 → reeval_python-0.19.0}/README.md +6 -6
- {reeval_python-0.17.2 → reeval_python-0.19.0}/pyproject.toml +1 -1
- {reeval_python-0.17.2 → reeval_python-0.19.0}/src/reeval_python/__init__.py +13 -3
- {reeval_python-0.17.2 → reeval_python-0.19.0}/src/reeval_python/_wire.py +166 -125
- reeval_python-0.19.0/src/reeval_python/binaries.json +55 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/src/reeval_python/context.py +19 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/src/reeval_python/declare.py +180 -118
- {reeval_python-0.17.2 → reeval_python-0.19.0}/src/reeval_python/environment.py +11 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/src/reeval_python/expect.py +23 -1
- {reeval_python-0.17.2 → reeval_python-0.19.0}/src/reeval_python/options.py +47 -13
- {reeval_python-0.17.2 → reeval_python-0.19.0}/src/reeval_python/wire.py +3 -1
- reeval_python-0.19.0/tests/context/observe.eval.py +10 -0
- reeval_python-0.19.0/tests/context/observe.sync.eval.py +10 -0
- reeval_python-0.19.0/tests/context/stay-within.eval.py +9 -0
- reeval_python-0.19.0/tests/declare/cases.eval.py +29 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/declare/compare-questions.eval.py +3 -3
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/declare/compare-variants.eval.py +2 -2
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/declare/egress-cascade.eval.py +7 -7
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/declare/environment-extend.eval.py +3 -3
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/declare/environment-plugin-marketplace.eval.py +1 -1
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/declare/environment-plugins.eval.py +2 -2
- reeval_python-0.19.0/tests/declare/environment-traits.eval.py +9 -0
- reeval_python-0.19.0/tests/declare/observe.eval.py +26 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/declare/questions-attempts.eval.py +1 -1
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/declare/questions-group.eval.py +3 -3
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/declare/questions-state.eval.py +3 -3
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/declare/revision.eval.py +2 -2
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/declare/tags.eval.py +2 -2
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/test_api.py +109 -49
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/test_load.py +4 -4
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/test_runner_json.py +7 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/test_runner_sdk.py +2 -1
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/test_source.py +9 -11
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/test_types.py +3 -3
- {reeval_python-0.17.2 → reeval_python-0.19.0}/uv.lock +1 -1
- reeval_python-0.17.2/src/reeval_python/binaries.json +0 -55
- reeval_python-0.17.2/tests/declare/each-families.eval.py +0 -25
- {reeval_python-0.17.2 → reeval_python-0.19.0}/.gitignore +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/CHANGELOG.md +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/LICENSE +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/package.json +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/src/reeval_python/__main__.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/src/reeval_python/aio.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/src/reeval_python/checks.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/src/reeval_python/cli.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/src/reeval_python/errors.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/src/reeval_python/py.typed +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/src/reeval_python/runner.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/src/reeval_python/types.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/abort.eval.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/abort.sync.eval.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/exec-retries.eval.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/exec-retries.sync.eval.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/exec.eval.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/exec.sync.eval.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/expect-fail.eval.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/expect-fail.sync.eval.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/expect.eval.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/expect.sync.eval.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/files.eval.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/files.sync.eval.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/judge.eval.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/judge.sync.eval.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/record.async.eval.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/record.eval.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/send.eval.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/send.sync.eval.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/sync-async.async.eval.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/sync-async.eval.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/declare/best-of.eval.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/declare/groups-skip-todo.eval.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/runner_process.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/stdio_host.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/test_checks.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/test_cli.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/test_conformance_context.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/test_conformance_declare.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/test_patterns.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/test_python_wheels.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/test_runner_attempts.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/test_runner_checks.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/test_runner_isolation.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/test_runner_misuse.py +0 -0
- {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/test_runner_stdio.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: reeval-python
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.19.0
|
|
4
4
|
Summary: Python authoring SDK for reeval (*.eval.py eval files)
|
|
5
5
|
Project-URL: Homepage, https://reeval.ai
|
|
6
6
|
Project-URL: Repository, https://github.com/invertase/reeval
|
|
@@ -195,15 +195,15 @@ expect.poll(lambda: c.read_file("ready.txt"), timeout=10).to_be("ready\n")
|
|
|
195
195
|
expect.poll(c, "the server wrote its log").to_have_file("server.log")
|
|
196
196
|
```
|
|
197
197
|
|
|
198
|
-
###
|
|
198
|
+
### Cases
|
|
199
199
|
|
|
200
|
-
`
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
200
|
+
`"cases"` runs one eval over a list, and the body takes the attempt and its case. Each case has a
|
|
201
|
+
key: a string or a number is its own, a dict or an object its `id` or `name`, and `"case_key"`
|
|
202
|
+
gives any other. A key is 1–80 characters with no `#`, `/`, `›` or control characters, and unique
|
|
203
|
+
within the eval; the run reports each case as `<eval> [<key>]`.
|
|
204
204
|
|
|
205
205
|
```python
|
|
206
|
-
@
|
|
206
|
+
@evaluate("greets", {"cases": [{"lang": "en"}, {"lang": "fr"}], "case_key": lambda c: c["lang"]})
|
|
207
207
|
def greets(c: SyncAttemptContext, case: dict[str, str]) -> None: ...
|
|
208
208
|
```
|
|
209
209
|
|
|
@@ -171,15 +171,15 @@ expect.poll(lambda: c.read_file("ready.txt"), timeout=10).to_be("ready\n")
|
|
|
171
171
|
expect.poll(c, "the server wrote its log").to_have_file("server.log")
|
|
172
172
|
```
|
|
173
173
|
|
|
174
|
-
###
|
|
174
|
+
### Cases
|
|
175
175
|
|
|
176
|
-
`
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
176
|
+
`"cases"` runs one eval over a list, and the body takes the attempt and its case. Each case has a
|
|
177
|
+
key: a string or a number is its own, a dict or an object its `id` or `name`, and `"case_key"`
|
|
178
|
+
gives any other. A key is 1–80 characters with no `#`, `/`, `›` or control characters, and unique
|
|
179
|
+
within the eval; the run reports each case as `<eval> [<key>]`.
|
|
180
180
|
|
|
181
181
|
```python
|
|
182
|
-
@
|
|
182
|
+
@evaluate("greets", {"cases": [{"lang": "en"}, {"lang": "fr"}], "case_key": lambda c: c["lang"]})
|
|
183
183
|
def greets(c: SyncAttemptContext, case: dict[str, str]) -> None: ...
|
|
184
184
|
```
|
|
185
185
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""Python eval authoring API for reeval (*.eval.py)."""
|
|
2
2
|
|
|
3
3
|
from reeval_python.context import AttemptContext, SyncAttemptContext
|
|
4
|
-
from reeval_python.declare import evaluate,
|
|
4
|
+
from reeval_python.declare import evaluate, group, todo
|
|
5
5
|
from reeval_python.environment import (
|
|
6
6
|
DEFAULT_EGRESS_ALLOW,
|
|
7
7
|
DockerSandbox,
|
|
@@ -10,15 +10,23 @@ from reeval_python.environment import (
|
|
|
10
10
|
FakeJudge,
|
|
11
11
|
Plugin,
|
|
12
12
|
PluginBuild,
|
|
13
|
+
TartSandbox,
|
|
13
14
|
define_environment,
|
|
14
15
|
docker,
|
|
15
16
|
fake_harness,
|
|
16
17
|
fake_judge,
|
|
17
18
|
plugin,
|
|
19
|
+
tart,
|
|
18
20
|
)
|
|
19
21
|
from reeval_python.errors import ReevalAssertionError, ReevalCallError
|
|
20
22
|
from reeval_python.expect import Expectation, expect
|
|
21
|
-
from reeval_python.options import
|
|
23
|
+
from reeval_python.options import (
|
|
24
|
+
BestOf,
|
|
25
|
+
CaseOptions,
|
|
26
|
+
EvalOptions,
|
|
27
|
+
JudgeDefaults,
|
|
28
|
+
JudgeOptions,
|
|
29
|
+
)
|
|
22
30
|
from reeval_python.types import BackgroundHandle, Diff, ExecResult, FileChange, Turn, Verdict
|
|
23
31
|
|
|
24
32
|
__all__ = [
|
|
@@ -29,6 +37,7 @@ __all__ = [
|
|
|
29
37
|
"Diff",
|
|
30
38
|
"DockerSandbox",
|
|
31
39
|
"Environment",
|
|
40
|
+
"CaseOptions",
|
|
32
41
|
"EvalOptions",
|
|
33
42
|
"ExecResult",
|
|
34
43
|
"Expectation",
|
|
@@ -42,16 +51,17 @@ __all__ = [
|
|
|
42
51
|
"ReevalAssertionError",
|
|
43
52
|
"ReevalCallError",
|
|
44
53
|
"SyncAttemptContext",
|
|
54
|
+
"TartSandbox",
|
|
45
55
|
"Turn",
|
|
46
56
|
"Verdict",
|
|
47
57
|
"define_environment",
|
|
48
58
|
"docker",
|
|
49
59
|
"evaluate",
|
|
50
|
-
"evaluate_each",
|
|
51
60
|
"expect",
|
|
52
61
|
"fake_harness",
|
|
53
62
|
"fake_judge",
|
|
54
63
|
"group",
|
|
55
64
|
"plugin",
|
|
65
|
+
"tart",
|
|
56
66
|
"todo",
|
|
57
67
|
]
|