Spaces:
Running
Running
Download scripts/check_provider_scope.py from RedinGhost/editorial-guard: direct link, hf CLI and curl.
- Browser
- Download file 900 Bytes
-
https://huggingface.co/spaces/RedinGhost/editorial-guard/resolve/main/scripts/check_provider_scope.py
- Command line
-
hf download hf://spaces/RedinGhost/editorial-guard/scripts/check_provider_scope.py
-
curl -L -o check_provider_scope.py https://huggingface.co/spaces/RedinGhost/editorial-guard/resolve/main/scripts/check_provider_scope.py
900 Bytes
| """Validate the currently supported provider scope without model calls.""" | |
| import json,sys | |
| from pathlib import Path | |
| ROOT=Path(__file__).resolve().parents[1] | |
| sys.path.insert(0,str(ROOT/'src')) | |
| from editorial_guard.dataset import PROVIDERS | |
| from editorial_guard.providers import ENDPOINTS,KEY_ENV | |
| from editorial_guard.supplemental import independent_judges | |
| expected={'codex','deepseek','glm'} | |
| assert set(PROVIDERS)==expected | |
| assert set(ENDPOINTS)==set(KEY_ENV)==expected-{'codex'} | |
| for name in ('config.example.json','config.coding-plan.example.json'): | |
| assert set(json.loads((ROOT/name).read_text(encoding='utf-8'))['providers'])==expected | |
| for author in expected: | |
| assert set(independent_judges(author))==expected-{author} | |
| assert set(json.loads((ROOT/'evals/provider-scope.json').read_text())['providers'])==expected | |
| print(json.dumps({'status':'pass','providers':sorted(expected),'new_model_calls':0})) | |