mafw.devtools.dependencies.verify
Dependency resolution verification utilities for MAFw.
This module provides functions to verify that resolved dependency environments
match the expected lower bounds declared in pyproject.toml.
Functions
Read pyproject.toml and extract dependencies with their expected lower bounds. |
|
|
Verify that the specified environment has the expected lowest dependency versions. |
- mafw.devtools.dependencies.verify.get_expected_lower_bounds() dict[str, Requirement][source]
Read pyproject.toml and extract dependencies with their expected lower bounds.
- Returns:
A dictionary mapping lowercase package names to their parsed Requirement objects.
- Return type:
dict[str, Requirement]
- Raises:
DevtoolsError – If the pyproject.toml cannot be parsed.
- mafw.devtools.dependencies.verify.verify_lowest_resolution(env_name: str, python_version: str, expected_bounds: dict[str, Requirement]) None[source]
Verify that the specified environment has the expected lowest dependency versions.
This function executes uv pip list in the given environment, parses the output, and compares installed versions against the expected lower bounds extracted from pyproject.toml.
- Parameters:
env_name (str) – The name of the environment (e.g., ‘hatch-test’, ‘types’).
python_version (str) – The Python version string (e.g., ‘3.11’).
expected_bounds (dict[str, Requirement]) – Mapping of package names to their Requirement objects.
- Raises:
DevtoolsError – If a required dependency is missing.