Add docs/trust.md and a clean package task
docs/trust.md lists every badge and verdict the app shows (where code came from, what a compiler said, what a proof, the fuzzer, a translation and the model machine say): what earns each one, what it means, and what it does not mean. New badges get a row there in the same commit. pixi run package zips the files git tracks, plus new files it does not ignore, into package/programming-plus-<commit>.zip (marked -dirty with uncommitted changes). The zip shared before this held .DS_Store files, __pycache__ folders and __MACOSX entries (3,661 files); the package holds none of them (1,694 files). Python standard library only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FgvbRdoEheAHqsRmr2WuKZ
This commit is contained in:
5 files changed
+102
No files matched your search
@@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Zip the repository for sharing: the files git tracks, plus new files it does not ignore.
|
||||
|
||||
pixi run package # writes package/programming-plus-<commit>.zip
|
||||
|
||||
Nothing git ignores goes in: no .DS_Store, __pycache__, scratch/, dist/, site/, node_modules/ or
|
||||
.pixi/. Files are stored under a top folder named programming-plus/, as the shared zips were.
|
||||
Standard library only, like the corpus pipeline.
|
||||
"""
|
||||
import pathlib
|
||||
import subprocess
|
||||
import sys
|
||||
import zipfile
|
||||
|
||||
ROOT = pathlib.Path(__file__).resolve().parent.parent
|
||||
|
||||
|
||||
def git(*args: str) -> str:
|
||||
return subprocess.run(["git", *args], cwd=ROOT, check=True, capture_output=True, text=True).stdout
|
||||
|
||||
|
||||
def main() -> int:
|
||||
try:
|
||||
commit = git("rev-parse", "--short", "HEAD").strip()
|
||||
except (subprocess.CalledProcessError, FileNotFoundError):
|
||||
print("package: this needs a git checkout (git init and commit first)", file=sys.stderr)
|
||||
return 1
|
||||
dirty = bool(git("status", "--porcelain").strip())
|
||||
names = sorted(set(git("ls-files", "-z", "--cached", "--others", "--exclude-standard").split("\0")) - {""})
|
||||
names = [n for n in names if (ROOT / n).is_file()]
|
||||
out_dir = ROOT / "package"
|
||||
out_dir.mkdir(exist_ok=True)
|
||||
out = out_dir / f"programming-plus-{commit}{'-dirty' if dirty else ''}.zip"
|
||||
with zipfile.ZipFile(out, "w", compression=zipfile.ZIP_DEFLATED) as z:
|
||||
for n in names:
|
||||
z.write(ROOT / n, f"programming-plus/{n}")
|
||||
size = out.stat().st_size / 1e6
|
||||
print(f"wrote {out.relative_to(ROOT)}: {len(names)} files, {size:.1f} MB{' (with uncommitted changes)' if dirty else ''}")
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
Reference in new issue
Block a user