36 lines
1.3 KiB
Python
36 lines
1.3 KiB
Python
|
|
#!/usr/bin/env python3
|
||
|
|
"""Package only explicit integration source files; never discover laptop data."""
|
||
|
|
|
||
|
|
import argparse
|
||
|
|
from pathlib import Path
|
||
|
|
import zipfile
|
||
|
|
|
||
|
|
|
||
|
|
ROOT = Path(__file__).resolve().parent
|
||
|
|
FILES = {
|
||
|
|
"local_inference/__init__.py": "test_planning/__init__.py",
|
||
|
|
"local_inference/client.py": "hermes_batch_client.py",
|
||
|
|
"local_inference/planning.py": "test_planning/planning.py",
|
||
|
|
"local_inference/policy.py": "test_planning/policy.py",
|
||
|
|
"local_inference/contracts.py": "test_planning/contracts.py",
|
||
|
|
"local_inference/profile_prompt.txt": "test_planning/profile_prompt.txt",
|
||
|
|
"local_inference/family_prompt.txt": "test_planning/family_prompt.txt",
|
||
|
|
"hermes_batch_curl.sh": "hermes_batch_curl.sh",
|
||
|
|
"INTEGRATION.md": "test_planning/INTEGRATION.md",
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
def main():
|
||
|
|
"""Create a portable source-only client archive at the requested output path."""
|
||
|
|
parser = argparse.ArgumentParser(description=__doc__)
|
||
|
|
parser.add_argument("output", type=Path)
|
||
|
|
arguments = parser.parse_args()
|
||
|
|
with zipfile.ZipFile(arguments.output, "w", compression=zipfile.ZIP_DEFLATED) as archive:
|
||
|
|
for destination, source in FILES.items():
|
||
|
|
archive.write(ROOT / source, destination)
|
||
|
|
print(f"Wrote {len(FILES)} explicitly selected source files to {arguments.output}")
|
||
|
|
|
||
|
|
|
||
|
|
if __name__ == "__main__":
|
||
|
|
main()
|