← Về thư mục
skills/geniml/scripts/_common.py
- SafetyError · class · L44-L45 — class SafetyError(ValueError)
- bounded_int · function · L48-L62 — def bounded_int( value: str, *, minimum: int = 0, maximum: int, label: str, ) -> int
- int_type · function · L65-L79 — def int_type(*, minimum: int = 0, maximum: int, label: str)
- parse · function · L68-L77 — def parse(value: str) -> int
- _reject_unsafe_text_path · function · L82-L91 — def _reject_unsafe_text_path(raw: str) -> None
- _reject_symlink_components · function · L94-L103 — def _reject_symlink_components(path: Path) -> None
- local_path · function · L106-L142 — def local_path( raw: str, *, must_exist: bool = True, kind: str = "any", ) -> Path
- _open_binary_nofollow · function · L145-L154 — def _open_binary_nofollow(path: Path)
- iter_text_lines · function · L157-L200 — def iter_text_lines( path: Path, *, max_bytes: int, max_records: int, max_line_bytes: int = HARD_MAX_LINE_BYTES, ) -> Iterator[tuple[int, str]]
- sha256_file · function · L203-L218 — def sha256_file(path: Path, *, max_bytes: int) -> tuple[str, int]
- display_path · function · L221-L229 — def display_path(path: Path, index: int, mode: str) -> str
- add_path_mode_argument · function · L232-L238 — def add_path_mode_argument(parser) -> None
- print_json · function · L241-L244 — def print_json(payload: dict[str, Any]) -> None
- read_delimited_manifest · function · L247-L291 — def read_delimited_manifest( path: Path, *, delimiter_name: str, max_bytes: int, max_rows: int, ) -> tuple[list[str], list[dict[str, str]]]
- delimiter_from_path · function · L294-L297 — def delimiter_from_path(path: Path, requested: str) -> str
- load_chrom_sizes · function · L300-L335 — def load_chrom_sizes( path: Path, *, max_bytes: int, max_records: int, ) -> tuple[dict[str, int], list[str]]
- simple_yaml_mapping · function · L338-L386 — def simple_yaml_mapping( path: Path, *, max_bytes: int, max_records: int = 10_000, ) -> dict[str, Any]
- fail_json · function · L389-L399 — def fail_json(tool: str, exc: Exception) -> int