| from __future__ import annotations | |
| import json | |
| from pathlib import Path | |
| from release import existing_files, load_config, manifest_paths | |
| def main() -> None: | |
| root, config = load_config() | |
| print(f"release: {config['release_name']}") | |
| print(f"root : {root}") | |
| print(f"window : {config.get('default_time_range')}") | |
| annotations = config.get("annotations", {}) | |
| for name, rel in annotations.items(): | |
| path = root / rel | |
| if not path.is_file(): | |
| raise FileNotFoundError(f"Missing annotation file for {name}: {rel}") | |
| try: | |
| with path.open("r", encoding="utf-8") as f: | |
| data = json.load(f) | |
| size = len(data) if hasattr(data, "__len__") else "unknown" | |
| print(f"annotation {name}: {rel} ({size} top-level items)") | |
| except json.JSONDecodeError: | |
| print(f"annotation {name}: {rel} (not JSON-decoded)") | |
| files = existing_files(root, manifest_paths(root, config)) | |
| print(f"manifest files: {len(files)}") | |
| print("OK") | |
| if __name__ == "__main__": | |
| main() | |