Spaces:
Sleeping
Sleeping
Download scripts/verify_overwatch.py from Coeinterns/bank-statement-api: direct link, hf CLI and curl.
- Browser
- Download file 1.09 kB
-
https://huggingface.co/spaces/Coeinterns/bank-statement-api/resolve/main/scripts/verify_overwatch.py
- Command line
-
hf download hf://spaces/Coeinterns/bank-statement-api/scripts/verify_overwatch.py
-
curl -L -o verify_overwatch.py https://huggingface.co/spaces/Coeinterns/bank-statement-api/resolve/main/scripts/verify_overwatch.py
1.09 kB
| """Quick verification that overwatch store reads data from NeonDB.""" | |
| import os | |
| from overwatch.store import LogStore | |
| s = LogStore() | |
| # Test query_events | |
| events, total = s.query_events(page=1, page_size=5) | |
| print(f"query_events — total: {total}") | |
| for e in events[:3]: | |
| print(f" [{e.log_level}] {e.stage:<30} {e.document_name[:25]}") | |
| # Test list_documents | |
| docs, doc_total = s.list_documents(page=1, page_size=5) | |
| print(f"\nlist_documents — total: {doc_total}") | |
| for d in docs[:3]: | |
| print(f" doc_id={d['document_id'][:12]} status={d['processing_status']:<12} " | |
| f"warn={d['warning_count']} err={d['error_count']}") | |
| # Test document summary on the first real document | |
| if docs: | |
| first_doc_id = docs[0]["document_id"] | |
| summary = s.get_document_summary(first_doc_id) | |
| if summary: | |
| print(f"\nget_document_summary({first_doc_id[:12]}...):") | |
| print(f" status : {summary['processing_status']}") | |
| print(f" total_events : {summary['total_events']}") | |
| print(f" extraction_summary stages: {list(summary['extraction_summary'].keys())}") | |