Align publisher job names and extend conference coverage
This commit is contained in:
1 parent
9ce878efd4
commit
366c381310
4 files changed
+54
-15
No files matched your search
@@ -25,6 +25,7 @@ CASES = [
|
||||
("ieee-conference", "conference", "ieee", "IEEEtran/bare_conf.tex"),
|
||||
("acl", "conference", "acl", "acl-style-files-master/acl_latex.tex"),
|
||||
("cvpr-2026", "conference", "cvpr-2026", "author-kit-CVPR2026-v1-latex-/main.tex"),
|
||||
("neurips-2025", "conference", "neurips-2025", "Styles/neurips_2025.tex"),
|
||||
]
|
||||
EPS_FIGURES = {
|
||||
"springer-nature": ["fig.eps"],
|
||||
@@ -111,19 +112,27 @@ def compile_sample(template, entry, evidence, args, engine, figures):
|
||||
assert sha(pdf) == figure["pdf_sha256"]
|
||||
shutil.copyfile(pdf, cwd / pdf.name)
|
||||
prefix = "texrra-oracle"
|
||||
jobname = prefix if engine == "reference" else Path(entry).stem
|
||||
jobname = Path(entry).stem
|
||||
output = cwd / f"{prefix}.pdf"
|
||||
assert not output.exists()
|
||||
aux = cwd / f"{jobname}.aux"
|
||||
job_directory = evidence / "job" if engine == "reference" else cwd
|
||||
produced_pdf = job_directory / f"{jobname}.pdf" if engine == "reference" else output
|
||||
aux = job_directory / f"{jobname}.aux"
|
||||
env = {**os.environ, "TEXINPUTS": os.pathsep, "TEXRRA_STATE_DIR": str(evidence / "state"),
|
||||
"BSTINPUTS": f"{cwd}/bst//:", "BIBINPUTS": f"{cwd}:", "SOURCE_DATE_EPOCH": "1783900800"}
|
||||
"BSTINPUTS": f"{cwd}/bst//{os.pathsep}{cwd}{os.pathsep}",
|
||||
"BIBINPUTS": f"{cwd}{os.pathsep}", "SOURCE_DATE_EPOCH": "1783900800"}
|
||||
if args.texmf_overlay:
|
||||
env["TEXMFHOME"] = str(args.texmf_overlay)
|
||||
if args.font_map:
|
||||
env["TEXFONTMAPS"] = str(args.font_map.parent) + os.pathsep
|
||||
if engine == "reference":
|
||||
latex = ["pdftex", f"-fmt={args.reference_format}", "-interaction=nonstopmode",
|
||||
"-halt-on-error", "-no-shell-escape", "-recorder", f"-jobname={prefix}", Path(entry).name]
|
||||
# TeX exposes the job name to the document. Keep it identical to the
|
||||
# native run and put generated files outside the copied input tree.
|
||||
job_directory.mkdir()
|
||||
env["TEXFORMATS"] = f"{args.reference_format.parent}{os.pathsep}"
|
||||
latex = ["pdftex", f"-fmt={args.reference_format.name}", "-interaction=nonstopmode",
|
||||
"-halt-on-error", "-no-shell-escape", "-recorder", f"-jobname={jobname}",
|
||||
f"-output-directory={job_directory}", Path(entry).name]
|
||||
else:
|
||||
latex = [args.binary, "native", "--job", "--etex", "--step-limit", "600000000",
|
||||
"--input-policy", "tex", "--load-format", args.native_format]
|
||||
@@ -140,7 +149,7 @@ def compile_sample(template, entry, evidence, args, engine, figures):
|
||||
command = [*latex[:-2], "--resource-manifest", evidence / f"{label}.resources.json",
|
||||
"--layout-manifest", evidence / f"{label}.layout.json", *latex[-2:]]
|
||||
step = run(command, cwd, env, label, evidence)
|
||||
recorder = cwd / f"{prefix}.fls"
|
||||
recorder = job_directory / f"{jobname}.fls"
|
||||
if engine == "reference" and recorder.is_file():
|
||||
shutil.copyfile(recorder, evidence / f"{label}.fls")
|
||||
commands.append(step)
|
||||
@@ -150,7 +159,7 @@ def compile_sample(template, entry, evidence, args, engine, figures):
|
||||
shutil.copyfile(aux, evidence / f"{label}.aux")
|
||||
aux_checksums.append(sha(aux) if aux.is_file() else None)
|
||||
if idx == 1 and aux.is_file() and b"\\bibdata{" in aux.read_bytes():
|
||||
step = run(["bibtex", jobname], cwd, env, "bibtex", evidence)
|
||||
step = run(["bibtex", jobname], job_directory, env, "bibtex", evidence)
|
||||
commands.append(step)
|
||||
if step["exit_code"]:
|
||||
break
|
||||
@@ -159,8 +168,10 @@ def compile_sample(template, entry, evidence, args, engine, figures):
|
||||
changed = [name for name, digest in frozen.items()
|
||||
if not (work / name).is_file() or sha(work / name) != digest]
|
||||
last = commands[-1]
|
||||
built = last["exit_code"] == 0 and output.is_file()
|
||||
logfile = cwd / f"{prefix}.log"
|
||||
built = last["exit_code"] == 0 and produced_pdf.is_file()
|
||||
if built and engine == "reference":
|
||||
shutil.copyfile(produced_pdf, output)
|
||||
logfile = job_directory / f"{jobname if engine == 'reference' else prefix}.log"
|
||||
log = logfile.read_text(errors="replace") if logfile.is_file() else ""
|
||||
pdf = {}
|
||||
if built:
|
||||
@@ -173,6 +184,7 @@ def compile_sample(template, entry, evidence, args, engine, figures):
|
||||
pages = re.search(r"^Pages:\s+(\d+)", info, re.M)
|
||||
pdf["pages"] = int(pages.group(1)) if pages else None
|
||||
return {"commands": commands, "diagnostics": diagnostics(evidence, last["label"]),
|
||||
"job_name": jobname,
|
||||
"aux_file": aux.name,
|
||||
"packaged_files_changed_in_work_directory": {
|
||||
name: {"before": frozen[name], "after": sha(work / name) if (work / name).is_file() else None}
|
||||
|
||||
@@ -26,5 +26,9 @@
|
||||
"cvpr-2026": [
|
||||
"ef672bf4ad1c6801237b957d57b0087d4412e7dee01ad3b512abe82960c6466c",
|
||||
"https://codeload.github.com/cvpr-org/author-kit/zip/refs/tags/CVPR2026-v1%28latex%29"
|
||||
],
|
||||
"neurips-2025": [
|
||||
"72032130232955b785cd622b7c52d893e3166f30a90e1e6279d0a28e8373beef",
|
||||
"https://media.neurips.cc/Conferences/NeurIPS2025/Styles.zip"
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user