Download testing/agent_evaluation/functions/read_dashboard.py from yuhanqin/ut-evaluation: direct link, hf CLI and curl.
- Browser
- Download file 1.1 kB
-
https://huggingface.co/datasets/yuhanqin/ut-evaluation/resolve/main/testing/agent_evaluation/functions/read_dashboard.py
- Command line
-
hf download hf://datasets/yuhanqin/ut-evaluation/testing/agent_evaluation/functions/read_dashboard.py
-
curl -L -o read_dashboard.py https://huggingface.co/datasets/yuhanqin/ut-evaluation/resolve/main/testing/agent_evaluation/functions/read_dashboard.py
1.1 kB
| """Read one ``cov_report/data/dashboard.js`` body. | |
| Q001 passes the text it already has, from disk or from a git blob. | |
| The dashboard summary format is not known yet, so every value stays unset. | |
| """ | |
| from __future__ import annotations | |
| from dataclasses import dataclass | |
| class DashboardSummary: | |
| """Cumulative golden coverage from ``dashboard.js``. | |
| ``None`` means that number could not be read. It is not zero. | |
| """ | |
| stmt: float | None | |
| cond: float | None | |
| tgl: float | None | |
| fsm: float | None | |
| group: float | None | |
| assert_attempted: int | None | |
| assert_success: int | None | |
| assert_failed: int | None | |
| assert_vacuous: int | None | |
| def read_dashboard(text: str) -> DashboardSummary: | |
| """Return stmt, cond, tgl, fsm, group, and assert counts from ``text``.""" | |
| if not isinstance(text, str): | |
| raise TypeError("text must be a string") | |
| return DashboardSummary( | |
| stmt=None, cond=None, tgl=None, fsm=None, group=None, | |
| assert_attempted=None, assert_success=None, assert_failed=None, assert_vacuous=None, | |
| ) | |