aiq.registry_handlers.package_utils#

Attributes#

Functions#

get_module_name_from_distribution(→ str | None)

Return the first top-level module name for a given distribution name.

build_wheel(...)

Builds a Python .whl for the specified package and saves to disk, sets self._whl_path, and returned as bytes.

build_package_metadata(...)

Loads discovery metadata for all registered AgentIQ components included in this Python package.

build_aiq_artifact(...)

Builds a complete AgentIQ Artifact that can be published for discovery and reuse.

Module Contents#

logger#
get_module_name_from_distribution(distro_name: str) str | None#

Return the first top-level module name for a given distribution name.

build_wheel(
package_root: str,
) aiq.registry_handlers.schemas.package.WheelData#

Builds a Python .whl for the specified package and saves to disk, sets self._whl_path, and returned as bytes.

Args:

package_root (str): Path to the local package repository.

Returns:

WheelData: Data model containing a built python wheel and its corresponding metadata.

build_package_metadata(
wheel_data: aiq.registry_handlers.schemas.package.WheelData | None,
) dict[aiq.data_models.component.AIQComponentEnum, list[dict | aiq.data_models.discovery_metadata.DiscoveryMetadata]]#

Loads discovery metadata for all registered AgentIQ components included in this Python package.

Args:

wheel_data (WheelData): Data model containing a built python wheel and its corresponding metadata.

Returns:

dict[AIQComponentEnum, list[typing.Union[dict, DiscoveryMetadata]]]: List containing each components discovery metadata.

build_aiq_artifact(
package_root: str,
) aiq.registry_handlers.schemas.publish.AIQArtifact#

Builds a complete AgentIQ Artifact that can be published for discovery and reuse.

Args:

package_root (str): Path to root of python package

Returns:

AIQArtifact: An publishabla AIQArtifact containing package wheel and discovery metadata.