Datasets:
Formats:
csv
Languages:
English
Size:
1K - 10K
Tags:
arxiv-artifact
reproducibility
research-artifact
computer-science
computer-logic
formal-methods
License:
| from __future__ import annotations | |
| import argparse | |
| import os | |
| import shutil | |
| import subprocess | |
| import zipfile | |
| from pathlib import Path | |
| ROOT = Path(__file__).resolve().parents[1] | |
| ARXIV = ROOT / "arxiv" | |
| SUBMISSION = ROOT / "submission" | |
| TOP_FIGURES = [ | |
| "real_video_certificate_case_study.pdf", | |
| "real_video_edit_defect_atlas.pdf", | |
| "sweep_defect_heatmap.pdf", | |
| "perturbation_defect_curves.pdf", | |
| "perturbation_certificate_defect_scatter.pdf", | |
| "certificate_stability_phase_diagram.pdf", | |
| "localization_stability_summary.pdf", | |
| "real_video_certificate_case_study.png", | |
| "real_video_edit_defect_atlas.png", | |
| "sweep_defect_heatmap.png", | |
| "perturbation_defect_curves.png", | |
| "perturbation_certificate_defect_scatter.png", | |
| "certificate_stability_phase_diagram.png", | |
| "localization_stability_summary.png", | |
| ] | |
| def main() -> int: | |
| parser = argparse.ArgumentParser() | |
| parser.add_argument("--no-zip", action="store_true", help="prepare arXiv tree and compile, but skip zip creation") | |
| args = parser.parse_args() | |
| prepare_arxiv_tree() | |
| compile_latex() | |
| if not args.no_zip: | |
| build_zips() | |
| return 0 | |
| def prepare_arxiv_tree() -> None: | |
| (ARXIV / "anc").mkdir(parents=True, exist_ok=True) | |
| for fig in TOP_FIGURES: | |
| src = ROOT / "figures" / fig | |
| if src.exists(): | |
| shutil.copy2(src, ARXIV / fig) | |
| def compile_latex() -> None: | |
| subprocess.run(["latexmk", "-pdf", "-interaction=nonstopmode", "paper.tex"], cwd=ARXIV, check=True) | |
| def build_zips() -> None: | |
| SUBMISSION.mkdir(parents=True, exist_ok=True) | |
| upload_zip = SUBMISSION / "pcmt_arxiv_upload_under50mb.zip" | |
| for path in [ | |
| upload_zip, | |
| SUBMISSION / "pcmt_arxiv_source.zip", | |
| SUBMISSION / "pcmt_arxiv_upload_single.zip", | |
| SUBMISSION / "pcmt_ancillary_artifact.zip", | |
| ARXIV / "anc" / "pcmt_artifact.zip", | |
| ]: | |
| if path.exists(): | |
| path.unlink() | |
| with zipfile.ZipFile(upload_zip, "w", compression=zipfile.ZIP_DEFLATED) as zf: | |
| for name in ["paper.tex", "refs.bib", *TOP_FIGURES]: | |
| path = ARXIV / name | |
| if path.exists(): | |
| zf.write(path, name) | |
| if __name__ == "__main__": | |
| raise SystemExit(main()) | |