From f29e9ada4b3044fa12cccd8fccfdbb5f889de535 Mon Sep 17 00:00:00 2001 From: emmanuelgjr Date: Thu, 29 Oct 2026 08:13:22 -0400 Subject: [PATCH] fix(data_validation): keep temp paths out of the croissant lock annotations update_locks.py passes the NER pins to uv as a constraints file in a temp directory, and uv writes that machine-local path into the lock's "via" comments. Replace it with requirements-ner.txt, the lock the pins come from. Co-Authored-By: Claude Opus 5.5 --- data_validation/update_locks.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/data_validation/update_locks.py b/data_validation/update_locks.py index e70219f..9daebd1 100644 --- a/data_validation/update_locks.py +++ b/data_validation/update_locks.py @@ -17,6 +17,7 @@ """ from __future__ import annotations +import re import subprocess import sys import tempfile @@ -41,6 +42,10 @@ def compile_lock(name: str, constraints: Path | None = None) -> None: subprocess.run(cmd, check=True, cwd=HERE) extra = ", constrained to requirements-ner.txt" if constraints else "" body = out.read_text(encoding="utf-8") + if constraints: + # uv annotates "-c "; name the lock the pins come from instead, + # so no machine-local path is committed. + body = re.sub(r"-c \S*" + re.escape(constraints.name), "-c requirements-ner.txt", body) out.write_text(HEADER.format(src=src.name, py=PYTHON, extra=extra) + body, encoding="utf-8", newline="") print(f"wrote {out.name}")