INNER CODE UNIT · Python

_valqore_base

valqore/valqore · benchmarks/run_benchmark.py:31

def _valqore_base() -> tuple[list[str] | None, str]:
    """How to invoke Valqore and the corpus path to pass.

    Prefers a `valqore` on PATH (the Docker alias from the repo README, or an
    installed engine); otherwise runs the public, source-protected image via
    Docker, mounting the repo so the corpus is visible inside the container.
    """
    if shutil.which("valqore"):
        return ["valqore"], str(CORPUS)
    if shutil.which("docker"):
        rel = str(CORPUS.relative_to(REPO)).replace("\\", "/")
        return (["docker", "run", "--rm", "-v", f"{REPO}:/work", "-w", "/work", IMAGE, "valqore"], rel)
    return None, str(CORPUS)


def _tool_version(cmd: list[str]) -> str | None:
    """Capture a tool's version string for provenance, or None if absent."""
    exe = cmd[0]

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…