Download scripts/validate_map_atlas.py from build-small-hackathon/phantom-grid: direct link, hf CLI and curl.
- Browser
- Download file 509 Bytes
-
https://huggingface.co/spaces/build-small-hackathon/phantom-grid/resolve/4f670ea00a0db95a9e7dc6d80aa620e07d0e048f/scripts/validate_map_atlas.py
- Command line
-
hf download hf://spaces/build-small-hackathon/phantom-grid@4f670ea00a0db95a9e7dc6d80aa620e07d0e048f/scripts/validate_map_atlas.py
-
curl -L -o validate_map_atlas.py https://huggingface.co/spaces/build-small-hackathon/phantom-grid/resolve/4f670ea00a0db95a9e7dc6d80aa620e07d0e048f/scripts/validate_map_atlas.py
509 Bytes
| from __future__ import annotations | |
| import sys | |
| from pathlib import Path | |
| PROJECT_ROOT = Path(__file__).resolve().parents[1] | |
| if str(PROJECT_ROOT) not in sys.path: | |
| sys.path.insert(0, str(PROJECT_ROOT)) | |
| from grid_map.atlas import validate_map_atlas | |
| def main() -> int: | |
| errors = validate_map_atlas() | |
| if errors: | |
| for error in errors: | |
| print(f"ERROR: {error}") | |
| return 1 | |
| print("Map atlas is valid.") | |
| return 0 | |
| if __name__ == "__main__": | |
| raise SystemExit(main()) | |