judge.run_keys(protocol, *conditions)
The keys that a run.toml of protocol has when the conditions hold.
Parameters
| protocol |
str |
"regeneration", "canary" or "score". |
required |
| *conditions |
str |
Which of "aborted", "completed", "final", "report_error", "wrote" and "unwritten" hold. The keys that are always written need none. |
() |
Returns
|
dict[str, tuple[str, …]] |
dict[str, tuple[str, …]]: Table name ("run" for the top level) to its keys, in the order of RUN_KEYS; tables without a key are left out. |
Examples
from spotregen.judge import run_keys
keys = run_keys("score", "completed", "final", "wrote")
print(list(keys))
print(keys["run"])
['run', 'base', 'tool', 'inputs', 'attempt', 'final']
('unit', 'protocol', 'spotregen_version', 'started', 'finished', 'status', 'accepted', 'rule')