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.
Files changed (85) hide show
  1. {reeval_python-0.17.2 → reeval_python-0.19.0}/PKG-INFO +7 -7
  2. {reeval_python-0.17.2 → reeval_python-0.19.0}/README.md +6 -6
  3. {reeval_python-0.17.2 → reeval_python-0.19.0}/pyproject.toml +1 -1
  4. {reeval_python-0.17.2 → reeval_python-0.19.0}/src/reeval_python/__init__.py +13 -3
  5. {reeval_python-0.17.2 → reeval_python-0.19.0}/src/reeval_python/_wire.py +166 -125
  6. reeval_python-0.19.0/src/reeval_python/binaries.json +55 -0
  7. {reeval_python-0.17.2 → reeval_python-0.19.0}/src/reeval_python/context.py +19 -0
  8. {reeval_python-0.17.2 → reeval_python-0.19.0}/src/reeval_python/declare.py +180 -118
  9. {reeval_python-0.17.2 → reeval_python-0.19.0}/src/reeval_python/environment.py +11 -0
  10. {reeval_python-0.17.2 → reeval_python-0.19.0}/src/reeval_python/expect.py +23 -1
  11. {reeval_python-0.17.2 → reeval_python-0.19.0}/src/reeval_python/options.py +47 -13
  12. {reeval_python-0.17.2 → reeval_python-0.19.0}/src/reeval_python/wire.py +3 -1
  13. reeval_python-0.19.0/tests/context/observe.eval.py +10 -0
  14. reeval_python-0.19.0/tests/context/observe.sync.eval.py +10 -0
  15. reeval_python-0.19.0/tests/context/stay-within.eval.py +9 -0
  16. reeval_python-0.19.0/tests/declare/cases.eval.py +29 -0
  17. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/declare/compare-questions.eval.py +3 -3
  18. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/declare/compare-variants.eval.py +2 -2
  19. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/declare/egress-cascade.eval.py +7 -7
  20. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/declare/environment-extend.eval.py +3 -3
  21. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/declare/environment-plugin-marketplace.eval.py +1 -1
  22. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/declare/environment-plugins.eval.py +2 -2
  23. reeval_python-0.19.0/tests/declare/environment-traits.eval.py +9 -0
  24. reeval_python-0.19.0/tests/declare/observe.eval.py +26 -0
  25. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/declare/questions-attempts.eval.py +1 -1
  26. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/declare/questions-group.eval.py +3 -3
  27. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/declare/questions-state.eval.py +3 -3
  28. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/declare/revision.eval.py +2 -2
  29. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/declare/tags.eval.py +2 -2
  30. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/test_api.py +109 -49
  31. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/test_load.py +4 -4
  32. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/test_runner_json.py +7 -0
  33. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/test_runner_sdk.py +2 -1
  34. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/test_source.py +9 -11
  35. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/test_types.py +3 -3
  36. {reeval_python-0.17.2 → reeval_python-0.19.0}/uv.lock +1 -1
  37. reeval_python-0.17.2/src/reeval_python/binaries.json +0 -55
  38. reeval_python-0.17.2/tests/declare/each-families.eval.py +0 -25
  39. {reeval_python-0.17.2 → reeval_python-0.19.0}/.gitignore +0 -0
  40. {reeval_python-0.17.2 → reeval_python-0.19.0}/CHANGELOG.md +0 -0
  41. {reeval_python-0.17.2 → reeval_python-0.19.0}/LICENSE +0 -0
  42. {reeval_python-0.17.2 → reeval_python-0.19.0}/package.json +0 -0
  43. {reeval_python-0.17.2 → reeval_python-0.19.0}/src/reeval_python/__main__.py +0 -0
  44. {reeval_python-0.17.2 → reeval_python-0.19.0}/src/reeval_python/aio.py +0 -0
  45. {reeval_python-0.17.2 → reeval_python-0.19.0}/src/reeval_python/checks.py +0 -0
  46. {reeval_python-0.17.2 → reeval_python-0.19.0}/src/reeval_python/cli.py +0 -0
  47. {reeval_python-0.17.2 → reeval_python-0.19.0}/src/reeval_python/errors.py +0 -0
  48. {reeval_python-0.17.2 → reeval_python-0.19.0}/src/reeval_python/py.typed +0 -0
  49. {reeval_python-0.17.2 → reeval_python-0.19.0}/src/reeval_python/runner.py +0 -0
  50. {reeval_python-0.17.2 → reeval_python-0.19.0}/src/reeval_python/types.py +0 -0
  51. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/abort.eval.py +0 -0
  52. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/abort.sync.eval.py +0 -0
  53. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/exec-retries.eval.py +0 -0
  54. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/exec-retries.sync.eval.py +0 -0
  55. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/exec.eval.py +0 -0
  56. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/exec.sync.eval.py +0 -0
  57. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/expect-fail.eval.py +0 -0
  58. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/expect-fail.sync.eval.py +0 -0
  59. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/expect.eval.py +0 -0
  60. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/expect.sync.eval.py +0 -0
  61. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/files.eval.py +0 -0
  62. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/files.sync.eval.py +0 -0
  63. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/judge.eval.py +0 -0
  64. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/judge.sync.eval.py +0 -0
  65. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/record.async.eval.py +0 -0
  66. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/record.eval.py +0 -0
  67. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/send.eval.py +0 -0
  68. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/send.sync.eval.py +0 -0
  69. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/sync-async.async.eval.py +0 -0
  70. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/context/sync-async.eval.py +0 -0
  71. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/declare/best-of.eval.py +0 -0
  72. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/declare/groups-skip-todo.eval.py +0 -0
  73. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/runner_process.py +0 -0
  74. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/stdio_host.py +0 -0
  75. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/test_checks.py +0 -0
  76. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/test_cli.py +0 -0
  77. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/test_conformance_context.py +0 -0
  78. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/test_conformance_declare.py +0 -0
  79. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/test_patterns.py +0 -0
  80. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/test_python_wheels.py +0 -0
  81. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/test_runner_attempts.py +0 -0
  82. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/test_runner_checks.py +0 -0
  83. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/test_runner_isolation.py +0 -0
  84. {reeval_python-0.17.2 → reeval_python-0.19.0}/tests/test_runner_misuse.py +0 -0
  85. {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.17.2
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
- ### Names of `evaluate_each` cases
198
+ ### Cases
199
199
 
200
- `evaluate_each(cases, name)` names each eval from `name`: `%#` is the case's index, `%s` the case
201
- as `str()` writes it, and `$field` a dict case's field. Each placeholder is filled once, so a value
202
- that contains `$` or `%` stays as it is, and a `$field` the case doesn't have is left as written.
203
- Two evals with one name in a file are refused where they're declared.
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
- @evaluate_each([{"lang": "en"}, {"lang": "fr"}], "greets in $lang (#%#)")
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
- ### Names of `evaluate_each` cases
174
+ ### Cases
175
175
 
176
- `evaluate_each(cases, name)` names each eval from `name`: `%#` is the case's index, `%s` the case
177
- as `str()` writes it, and `$field` a dict case's field. Each placeholder is filled once, so a value
178
- that contains `$` or `%` stays as it is, and a `$field` the case doesn't have is left as written.
179
- Two evals with one name in a file are refused where they're declared.
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
- @evaluate_each([{"lang": "en"}, {"lang": "fr"}], "greets in $lang (#%#)")
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,6 +1,6 @@
1
1
  [project]
2
2
  name = "reeval-python"
3
- version = "0.17.2"
3
+ version = "0.19.0"
4
4
  description = "Python authoring SDK for reeval (*.eval.py eval files)"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -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, evaluate_each, group, todo
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 BestOf, EvalOptions, JudgeDefaults, JudgeOptions
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
  ]