← Về thư mục
skills/scientific-brainstorming/scripts/_common.py
- CliError · class · L24-L25 — class CliError(ValueError)
- bounded_float · function · L28-L42 — def bounded_float(minimum: float, maximum: float)
- convert · function · L31-L40 — def convert(raw: str) -> float
- require_identifier · function · L45-L53 — def require_identifier(value: Any, label: str) -> str
- require_text · function · L56-L72 — def require_text( value: Any, label: str, *, maximum: int = MAX_TEXT_CHARS, allow_empty: bool = False, ) -> str
- bounded_strings · function · L75-L94 — def bounded_strings( values: Iterable[str], label: str, *, maximum_items: int = 100, maximum_length: int = MAX_SHORT_TEXT_CHARS, ) -> list[str]
- require_iso_date · function · L97-L104 — def require_iso_date(value: str, label: str = "date") -> str
- finite_number · function · L107-L118 — def finite_number(value: Any, label: str) -> float
- read_bounded_text · function · L121-L162 — def read_bounded_text( raw_path: str, *, label: str, suffixes: set[str], encoding: str = "utf-8", ) -> tuple[Path, str]
- read_json · function · L165-L180 — def read_json(raw_path: str, *, label: str = "JSON input") -> tuple[Path, Any]
- reject_constant · function · L174-L175 — def reject_constant(value: str) -> None
- _safe_output_target · function · L183-L204 — def _safe_output_target(raw_path: str, suffix: str) -> Path
- write_json · function · L207-L279 — def write_json( raw_path: str, payload: Any, *, force: bool = False, ) -> Path
- emit_json · function · L282-L301 — def emit_json( payload: Any, output: str | None, *, force: bool = False, ) -> Path | None
- rounded · function · L304-L307 — def rounded(value: float) -> float