latent.version_check¶
Version pinning utilities for latent-py consumer projects.
Consumer repos declare their required latent-py version in pyproject.toml:
[tool.latent-py]
version = "3.3.0"
This module provides:
- read_pinned_version() — read the pinned version from pyproject.toml
- check_version() — compare pinned vs installed, return mismatch info
- scaffold_version_pin() — add [tool.latent-py] section to pyproject.toml
Classes¶
VersionCheckResult¶
Result of a version compatibility check.
Functions¶
check_version¶
Check if installed latent version matches the pinned version.
Returns a VersionCheckResult with compatibility info.
get_installed_version¶
Get the currently installed latent version.
read_pinned_version¶
Read [tool.latent-py].version from pyproject.toml.
Returns None if the section or key doesn't exist.
scaffold_version_pin¶
Add or update [tool.latent-py].version in pyproject.toml.
Returns the path to the modified file.