Spaces:
Sleeping
Sleeping
Download scripts/check_quality.py from Kentlo/cert-study-app: direct link, hf CLI and curl.
- Browser
- Download file 939 Bytes
-
https://huggingface.co/spaces/Kentlo/cert-study-app/resolve/main/scripts/check_quality.py
- Command line
-
hf download hf://spaces/Kentlo/cert-study-app/scripts/check_quality.py
-
curl -L -o check_quality.py https://huggingface.co/spaces/Kentlo/cert-study-app/resolve/main/scripts/check_quality.py
939 Bytes
| from __future__ import annotations | |
| import subprocess | |
| import sys | |
| PYTHON_FILES = [ | |
| "streamlit_app.py", | |
| "cert_study_app/services/answer_normalizer.py", | |
| "cert_study_app/services/demo_seed_service.py", | |
| "cert_study_app/services/parse_quality_service.py", | |
| "cert_study_app/services/question_review_service.py", | |
| "cert_study_app/services/question_type_metadata_service.py", | |
| "cert_study_app/services/quiz_service.py", | |
| "scripts/export_hf_seed.py", | |
| ] | |
| TEST_FILES = [ | |
| "tests/test_answer_normalizer.py", | |
| "tests/test_question_type_metadata_service.py", | |
| "tests/test_export_hf_seed.py", | |
| ] | |
| def run(command: list[str]) -> None: | |
| print("+", " ".join(command)) | |
| subprocess.run(command, check=True) | |
| def main() -> int: | |
| run([sys.executable, "-m", "py_compile", *PYTHON_FILES]) | |
| run([sys.executable, "-m", "pytest", *TEST_FILES]) | |
| return 0 | |
| if __name__ == "__main__": | |
| raise SystemExit(main()) | |