validate¶
Validate Lambda layer artifacts against pyproject.toml dependencies.
Checks that each direct dependency declared in pyproject.toml is present
in artifacts/python/ and, optionally, that compiled extensions target Linux.
- aws_lbd_art_builder_uv.layer.validate.validate_artifacts(dir_python: Path, path_pyproject_toml: Path, check_linux: bool = False) dict[source]¶
Validate that
artifacts/python/contains the expected dependencies.- Parameters:
dir_python – Path to the
artifacts/python/directory.path_pyproject_toml – Path to the project’s
pyproject.toml.check_linux – If
True, also verify that compiled extensions target Linux (useful for container builds).
- Returns:
A dict with keys
"ok"(bool),"packages"(list of per-package results), and"errors"(list of error messages).
Raises
AssertionErrorif validation fails, making it easy to use in test scripts:validate_artifacts(dir_python, path_pyproject_toml, check_linux=True)