← Về thư mục
skills/scholar-evaluation/scripts/_common.py
- ValidationError · class · L85-L91 — class ValidationError(ValueError)
- init · method · L88-L91 — def init(self, code: str, path: str = "$") -> None
- Issue · class · L95-L103 — class Issue
- as_dict · method · L102-L103 — def as_dict(self) -> dict[str, str]
- _pairs_no_duplicates · function · L106-L112 — def _pairs_no_duplicates(pairs: list[tuple[str, Any]]) -> dict[str, Any]
- _check_local_file · function · L115-L125 — def _check_local_file(path: Path, suffix: str) -> None
- _scan_structure · function · L128-L160 — def _scan_structure(value: Any, path: str = "$") -> None
- read_json · function · L163-L178 — def read_json(path: Path | str) -> Any
- read_csv_text · function · L181-L189 — def read_csv_text(path: Path | str) -> str
- write_json · function · L192-L211 — def write_json( value: dict[str, Any], output: Path | None, *, force: bool = False ) -> None
- failure_report · function · L214-L219 — def failure_report(error: ValidationError) -> dict[str, Any]
- is_number · function · L222-L223 — def is_number(value: Any) -> bool
- is_identifier · function · L226-L227 — def is_identifier(value: Any) -> bool
- is_nonempty_text · function · L230-L231 — def is_nonempty_text(value: Any, maximum: int = MAX_TEXT_CHARS) -> bool
- is_reference · function · L234-L242 — def is_reference(value: Any) -> bool
- is_date · function · L245-L252 — def is_date(value: Any) -> bool
- exact_keys · function · L255-L270 — def exact_keys( value: Any, expected: Iterable[str], path: str, issues: list[Issue], ) -> bool
- validate_identifier · function · L273-L277 — def validate_identifier( value: Any, path: str, issues: list[Issue], code: str = "IDENTIFIER_INVALID" ) -> None
- validate_reference · function · L280-L286 — def validate_reference( value: Any, path: str, issues: list[Issue], *, allow_empty: bool = False ) -> None
- validate_text · function · L289-L295 — def validate_text( value: Any, path: str, issues: list[Issue], *, allow_empty: bool = False ) -> None
- validate_bool · function · L298-L300 — def validate_bool(value: Any, path: str, issues: list[Issue]) -> None
- validate_text_list · function · L303-L321 — def validate_text_list( value: Any, path: str, issues: list[Issue], *, minimum: int = 0, maximum: int = 100, references: bool = False, ) -> None
- _validate_scale · function · L324-L363 — def _validate_scale(scale: Any, issues: list[Issue]) -> tuple[float, float, float]
- _validate_proxy_absence · function · L366-L379 — def _validate_proxy_absence(value: Any, path: str, issues: list[Issue]) -> None
- validate_rubric · function · L382-L725 — def validate_rubric(rubric: Any) -> list[Issue]
- scale_values · function · L728-L733 — def scale_values(rubric: dict[str, Any]) -> set[float]
- validate_evaluation · function · L736-L852 — def validate_evaluation( evaluation: Any, rubric: dict[str, Any] ) -> list[Issue]
- error_issues · function · L855-L856 — def error_issues(issues: Iterable[Issue]) -> list[Issue]
- require_valid · function · L859-L862 — def require_valid(issues: Iterable[Issue]) -> None
- rounded · function · L865-L868 — def rounded(value: float | None) -> float | None
- weights_by_criterion · function · L871-L875 — def weights_by_criterion(rubric: dict[str, Any]) -> dict[str, float]
- score_evaluation · function · L878-L986 — def score_evaluation( rubric: dict[str, Any], evaluation: dict[str, Any], *, weights: dict[str, float] | None = None, ) -> dict[str, Any]