Download task_027/tests/validate_outputs.py from Lego-X/UXInteract: direct link, hf CLI and curl.
- Browser
- Download file 537 Bytes
-
https://huggingface.co/datasets/Lego-X/UXInteract/resolve/main/task_027/tests/validate_outputs.py
- Command line
-
hf download hf://datasets/Lego-X/UXInteract/task_027/tests/validate_outputs.py
-
curl -L -o validate_outputs.py https://huggingface.co/datasets/Lego-X/UXInteract/resolve/main/task_027/tests/validate_outputs.py
537 Bytes
| """Output presence/CSV readability only; semantic checks live in dedicated modules.""" | |
| import csv | |
| from pathlib import Path | |
| for name in ('cut_price_stats.csv','price_bin_stats.csv','top_10_diamonds.csv','report.html'): | |
| path=Path(name) | |
| assert path.is_file() and path.stat().st_size>0, f'missing output {name}' | |
| if path.suffix=='.csv': | |
| with path.open(encoding='utf-8-sig',newline='') as source: | |
| assert list(csv.DictReader(source)), f'empty CSV {name}' | |
| print('Output files exist and CSV tables are readable') | |