MCPcopy Create free account
hub / github.com/ScaleML/AgentSPEX / _build_zip

Function _build_zip

demo/ai_scientists/web/app.py:313–326  ·  view source on GitHub ↗

Create a zip of writer/sections/ contents plus PRIMEarxiv.sty. Does NOT modify the original sections directory (which may be read-only / owned by the sandbox VM user).

(sections_dir: Path, dest_path: Path)

Source from the content-addressed store, hash-verified

311# ---------------------------------------------------------------------------
312
313def _build_zip(sections_dir: Path, dest_path: Path) -> None:
314 """Create a zip of writer/sections/ contents plus PRIMEarxiv.sty.
315
316 Does NOT modify the original sections directory (which may be
317 read-only / owned by the sandbox VM user).
318 """
319 with zipfile.ZipFile(dest_path, "w", zipfile.ZIP_DEFLATED) as zf:
320 if sections_dir.is_dir():
321 for f in sorted(sections_dir.iterdir()):
322 if f.is_file():
323 zf.write(f, f.name)
324 # Always include PRIMEarxiv.sty from the demo source
325 if PRIMEARXIV_STY.is_file():
326 zf.write(PRIMEARXIV_STY, PRIMEARXIV_STY.name)
327
328
329def _compile_pdf(sections_dir: Path) -> Optional[Path]:

Callers 1

_post_processFunction · 0.85

Calls 1

writeMethod · 0.80

Tested by

no test coverage detected