httk.core.docs.lockfile¶
Portable documentation lock files and injectable uv pip compile tooling.
The lock keeps four contract headers: schema, a canonical-input SHA-256 hash,
Python 3.12, and Linux. The resolver’s comment noise is discarded; only
name==version pins are retained after the headers. Its pins cover runtime,
documentation, and build-backend requirements so a clean Python 3.12
environment can install the lock before using --no-build-isolation.
Exceptions¶
Raised when a documentation lock is absent, stale, or cannot be made. |
Functions¶
|
Hash the documentation dependency inputs, independent of TOML formatting. |
|
Generate a lock by invoking |
|
Raise |
|
Read normalized distribution names and versions from a lock file. |
|
Return pins excluding all |
|
Return the normalized subset of pins belonging to internal httk distributions. |
Module Contents¶
- exception httk.core.docs.lockfile.LockError[source]¶
Bases:
RuntimeErrorRaised when a documentation lock is absent, stale, or cannot be made.
- httk.core.docs.lockfile.compute_input_hash(pyproject_path: str | pathlib.Path) str[source]¶
Hash the documentation dependency inputs, independent of TOML formatting.
- httk.core.docs.lockfile.generate_lock(project_dir: str | pathlib.Path, output_path: str | pathlib.Path, *, command_prefix: collections.abc.Sequence[str] | None = None) None[source]¶
Generate a lock by invoking
uv pip compileor an injected command.
- httk.core.docs.lockfile.check_lock(project_dir: str | pathlib.Path, lock_path: str | pathlib.Path) None[source]¶
Raise
LockErrorif a lock is missing or stale for project_dir.
- httk.core.docs.lockfile.read_lock_pins(lock_path: str | pathlib.Path) dict[str, str][source]¶
Read normalized distribution names and versions from a lock file.
- httk.core.docs.lockfile.filter_lock_pins(pins: collections.abc.Mapping[str, str], *, drop: collections.abc.Iterable[str]) dict[str, str][source]¶
Return pins excluding all
httk-*names and the explicitly dropped names.