Add load_baseline reading an eval set from a git ref
Archive the set folder at the commit, unpack into a temp dir and read cases and recorded responses into memory; the working tree stays untouched. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e9c5913025
commit
8f3844d650
3 files changed
+276
No files matched your search
@@ -0,0 +1,16 @@
|
||||
import pytest
|
||||
|
||||
from chemenu.evals.baseline import GIT_REPO_ENV
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def _isolated_git(monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
"""Keep git in tests away from the repository running them.
|
||||
|
||||
`git rebase --exec` and hooks export GIT_DIR; without this, `git init` and
|
||||
`git commit` in a test would act on the checkout itself.
|
||||
"""
|
||||
for name in GIT_REPO_ENV:
|
||||
monkeypatch.delenv(name, raising=False)
|
||||
monkeypatch.setenv("GIT_CONFIG_GLOBAL", "/dev/null")
|
||||
monkeypatch.setenv("GIT_CONFIG_NOSYSTEM", "1")
|
||||
Reference in new issue
Block a user