Datasets:
Download scripts/build_release.py from ulamai/UnsolvedEarth: direct link, hf CLI and curl.
- Browser
- Download file 1.66 kB
-
https://huggingface.co/datasets/ulamai/UnsolvedEarth/resolve/main/scripts/build_release.py
- Command line
-
hf download hf://datasets/ulamai/UnsolvedEarth/scripts/build_release.py
-
curl -L -o build_release.py https://huggingface.co/datasets/ulamai/UnsolvedEarth/resolve/main/scripts/build_release.py
1.66 kB
| #!/usr/bin/env python3 | |
| """ | |
| Release builder and verification runner for UnsolvedEarth v1.0.0. | |
| Runs validate.py, check_identifiers.py, and check_links.py, and prints the release summary. | |
| """ | |
| import json | |
| import subprocess | |
| import sys | |
| from pathlib import Path | |
| ROOT = Path(__file__).resolve().parent.parent | |
| def run_step(script_name): | |
| print(f"\n>>> Running {script_name} ...") | |
| res = subprocess.run([sys.executable, str(ROOT / "scripts" / script_name)], cwd=str(ROOT)) | |
| if res.returncode != 0: | |
| print(f"ERROR: {script_name} failed with exit code {res.returncode}") | |
| sys.exit(res.returncode) | |
| def main(): | |
| run_step("validate.py") | |
| run_step("check_identifiers.py") | |
| run_step("check_links.py") | |
| stats = json.loads((ROOT / "statistics.json").read_text(encoding="utf-8")) | |
| print("\n" + "=" * 72) | |
| print(f"UnsolvedEarth v{stats['version']} Release Summary ({stats['release_date']})") | |
| print("=" * 72) | |
| print(f" Total Records in problems.json : {stats['total_records']:,}") | |
| print(f" Published Open/Partial Problems: {stats['published_problems']:,}") | |
| print(f" Archived Audit Style Pack : {stats['archived_audit_records']:,}") | |
| print(f" Unique Registered Sources : {stats['unique_sources']:,}") | |
| print(f" Max Problems per Single Source : {stats['max_problems_per_source']}") | |
| print(f" International Source Share : {stats['international_source_share'] * 100:.1f}%") | |
| print(" Published Status Breakdown :", stats["by_status_published"]) | |
| print(" Published Difficulty Breakdown :", stats["by_difficulty_published"]) | |
| print("=" * 72) | |
| if __name__ == "__main__": | |
| main() | |