← Về thư mục
skills/hypogenic/scripts/_common.py
- CliError · class · L71-L72 — class CliError(ValueError)
- _reject_constant · function · L75-L76 — def _reject_constant(value: str) -> None
- _unique_object · function · L79-L85 — def _unique_object(pairs: list[tuple[str, Any]]) -> dict[str, Any]
- _reject_url_or_secret_path · function · L88-L97 — def _reject_url_or_secret_path(value: str) -> None
- _absolute_lexical · function · L100-L101 — def _absolute_lexical(path: Path) -> Path
- _reject_symlink_components · function · L104-L113 — def _reject_symlink_components(path: Path) -> None
- _within_root · function · L116-L120 — def _within_root(candidate: Path, root: Path) -> None
- checked_root · function · L123-L137 — def checked_root(value: str | os.PathLike[str]) -> Path
- checked_input_file · function · L140-L176 — def checked_input_file( value: str | os.PathLike[str], *, root: str | os.PathLike[str] = ".", suffixes: Iterable[str], max_bytes: int, ) -> Path
- safe_relative_path · function · L179-L201 — def safe_relative_path( value: Any, *, name: str, suffixes: Iterable[str] | None = None, allow_dot: bool = False, ) -> str
- resolve_manifest_path · function · L204-L219 — def resolve_manifest_path( value: str, *, data_root: Path, suffixes: Iterable[str], max_bytes: int, ) -> Path
- _validate_plain_document · function · L222-L257 — def _validate_plain_document(value: Any) -> Any
- visit · function · L227-L255 — def visit(item: Any, depth: int) -> Any
- _load_yaml · function · L260-L311 — def _load_yaml(text: str) -> Any
- UniqueSafeLoader · class · L287-L288 — class UniqueSafeLoader(yaml.SafeLoader)
- construct_mapping · function · L290-L300 — def construct_mapping(loader: Any, node: Any, deep: bool = False) -> dict[str, Any]
- load_structured_document · function · L314-L347 — def load_structured_document( value: str | os.PathLike[str], *, root: str | os.PathLike[str] = ".", max_bytes: int = MAX_CONFIG_BYTES, ) -> Any
- load_json_document · function · L350-L373 — def load_json_document( value: str | os.PathLike[str], *, root: str | os.PathLike[str] = ".", max_bytes: int = MAX_JSON_BYTES, ) -> Any
- validate_keys · function · L376-L393 — def validate_keys( value: Any, *, required: Iterable[str], optional: Iterable[str] = (), context: str, ) -> dict[str, Any]
- bounded_int · function · L396-L401 — def bounded_int(value: Any, *, name: str, minimum: int, maximum: int) -> int
- finite_number · function · L404-L416 — def finite_number( value: Any, *, name: str, minimum: float = 0.0, maximum: float = 1_000_000_000.0, ) -> float
- nonempty_text · function · L419-L429 — def nonempty_text(value: Any, *, name: str, maximum: int = 1024) -> str
- strict_bool · function · L432-L437 — def strict_bool(value: Any, *, name: str, expected: bool | None = None) -> bool
- normalized_sha256 · function · L440-L443 — def normalized_sha256(value: Any, *, name: str) -> str
- normalized_date · function · L446-L453 — def normalized_date(value: Any, *, name: str) -> str
- _validate_no_secret_fields · function · L456-L477 — def _validate_no_secret_fields(value: Any, *, context: str = "config") -> None
- validate_run_config · function · L480-L765 — def validate_run_config(document: Any) -> dict[str, Any]
- named_env_presence · function · L768-L781 — def named_env_presence(config: Mapping[str, Any]) -> dict[str, Any]
- _validate_prompt_value · function · L784-L804 — def _validate_prompt_value(value: Any, *, context: str, depth: int = 0) -> None
- validate_task_config · function · L807-L866 — def validate_task_config(document: Any) -> dict[str, Any]
- validate_dataset_manifest · function · L869-L973 — def validate_dataset_manifest(document: Any) -> dict[str, Any]
- validate_hypothesis_bank · function · L976-L1078 — def validate_hypothesis_bank(document: Any) -> list[dict[str, Any]]
- validate_result_document · function · L1081-L1142 — def validate_result_document(document: Any) -> dict[str, Any]
- label_fingerprint · function · L1145-L1146 — def label_fingerprint(label: str) -> str
- classification_metrics · function · L1149-L1221 — def classification_metrics(records: Sequence[Mapping[str, str | None]]) -> dict[str, Any]
- canonical_json_bytes · function · L1224-L1234 — def canonical_json_bytes(value: Any) -> bytes
- sha256_file · function · L1237-L1251 — def sha256_file(path: Path, *, max_bytes: int = MAX_JSON_BYTES) -> str
- summarize_numbers · function · L1254-L1261 — def summarize_numbers(values: Sequence[float | int]) -> dict[str, float | int | None]
- count_values · function · L1264-L1272 — def count_values(values: Iterable[str]) -> list[dict[str, Any]]
- strict_json_bytes · function · L1275-L1291 — def strict_json_bytes(document: Any) -> bytes
- emit_json · function · L1294-L1297 — def emit_json(document: Any, *, stream: Any = None) -> None
- emit_error · function · L1300-L1312 — def emit_error(error: Exception) -> int