Keep the ablation arms inside the line budget the repo enforces
copy_store() moved into bench/scratch.py: systems.py had reached 512 lines and bench/filesize_check fails anything over 500. The move is behaviour identical, so the scale reports keep the commit stamp they were generated against — the code they describe is complete at that commit.
This commit is contained in:
1 parent
c4a8c36416
commit
6cc5640856
6 files changed
+33
-19
No files matched your search
+1
-15
@@ -13,7 +13,6 @@ import json
|
||||
import os
|
||||
import platform
|
||||
import re
|
||||
import shutil
|
||||
import sqlite3
|
||||
import time
|
||||
from collections.abc import Sequence
|
||||
@@ -24,6 +23,7 @@ from typing import TYPE_CHECKING, Any
|
||||
import numpy as np
|
||||
|
||||
from bench.ingest_baseline import source_map
|
||||
from bench.scratch import copy_store
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ely_eye.db import Database
|
||||
@@ -446,20 +446,6 @@ def _corpus_ids(database: Database) -> dict[str, str]:
|
||||
return ids
|
||||
|
||||
|
||||
def copy_store(home: Path, scratch: Path) -> tuple[Path, float]:
|
||||
"""Work on a copy: the baseline store is frozen evidence and must not be migrated in place."""
|
||||
source = home / "data" / "ely_eye.sqlite"
|
||||
if not source.is_file():
|
||||
raise SystemExit(f"{source}: no product database, build it with python -m bench.ingest_baseline")
|
||||
data = scratch / "data"
|
||||
data.mkdir(parents=True, exist_ok=True)
|
||||
began = time.perf_counter()
|
||||
for suffix in ("", "-wal", "-shm"):
|
||||
if (path := Path(str(source) + suffix)).is_file():
|
||||
shutil.copyfile(path, data / (source.name + suffix))
|
||||
return scratch, time.perf_counter() - began
|
||||
|
||||
|
||||
def live_product_rankings(
|
||||
db_home: Path,
|
||||
queries: Sequence[str],
|
||||
|
||||
Reference in new issue
Block a user