Download testing/agent_evaluation/functions/read_comp_log.py from yuhanqin/ut-evaluation: direct link, hf CLI and curl.
- Browser
- Download file 766 Bytes
-
https://huggingface.co/datasets/yuhanqin/ut-evaluation/resolve/main/testing/agent_evaluation/functions/read_comp_log.py
- Command line
-
hf download hf://datasets/yuhanqin/ut-evaluation/testing/agent_evaluation/functions/read_comp_log.py
-
curl -L -o read_comp_log.py https://huggingface.co/datasets/yuhanqin/ut-evaluation/resolve/main/testing/agent_evaluation/functions/read_comp_log.py
766 Bytes
| """Read one ``comp.log`` body. | |
| M001 and M002 pass the text they already have, from disk or from a git blob. | |
| The UVS summary-line format is not known yet, so the counts stay unset. | |
| """ | |
| from __future__ import annotations | |
| from dataclasses import dataclass | |
| class CompLogSummary: | |
| """Error and warning totals from one compile log. | |
| ``None`` means the summary line could not be read. It is not zero. | |
| """ | |
| error_count: int | None | |
| warning_count: int | None | |
| def read_comp_log(text: str) -> CompLogSummary: | |
| """Return the summary-line error and warning counts in ``text``.""" | |
| if not isinstance(text, str): | |
| raise TypeError("text must be a string") | |
| return CompLogSummary(error_count=None, warning_count=None) | |