This commit is contained in:
2026-05-17 08:47:25 +08:00
parent 1159d86b8b
commit 45513fe334
27 changed files with 4734 additions and 2 deletions
+36
View File
@@ -0,0 +1,36 @@
"""
Build a lean Dynamics.zip package for the website download button.
"""
from __future__ import annotations
import zipfile
from pathlib import Path
HERE = Path(__file__).resolve().parent
ZIP_PATH = HERE.parent / "Dynamics-demo.zip"
ARC_ROOT = "Dynamics"
INCLUDE_FILES = [
"README.md",
"dynamics.py",
"compute.py",
"sample.py",
"draw.py",
"plot_trajectory.py",
"examples\\case01\\input\\parameters.yaml",
"examples\\case01\\input\\coord.txt",
]
def main() -> None:
with zipfile.ZipFile(ZIP_PATH, "w", compression=zipfile.ZIP_DEFLATED) as archive:
for relative_name in INCLUDE_FILES:
path = HERE / relative_name
archive.write(path, arcname=f"{ARC_ROOT}/{relative_name}")
print(f"[release] wrote {ZIP_PATH}")
if __name__ == "__main__":
main()