bridge.pipelines.protocols package#
Public Interface#
This section documents user-facing interface of the bridge.pipelines.protocols package (as defined in its __init__.py file).
Classes#
|
Abstract class for mapping between repository and metadata models. |
|
Matching method for mapping metadata record from one platform to another (GitHub, bio.tools). |
|
Base class for pipeline argument models. |
|
Map metadata property to corresponding repository metadata property and match method. |
Protocol and base classes for pipeline argument models consumed by pipeline run functions.
- class bridge.pipelines.protocols.MapItem(**data)[source]#
Bases:
BaseModelMap metadata property to corresponding repository metadata property and match method.
- Parameters:
schema_entry (Any)
repo_entry (Any)
method (Method | None)
fn (Callable[[Any, Any], Any] | None)
- classmethod ensure_callable_or_none(v)[source]#
Validate that fn is either None, a callable, or a dotted path to a callable.
-
fn:
Callable[[Any,Any],Any] |None#
-
repo_entry:
Any#
- async run()[source]#
Run the mapping function if provided, otherwise return None.
- Returns:
The result of the mapping function or None.
- Return type:
Any
-
schema_entry:
Any#
- class bridge.pipelines.protocols.Method(*values)[source]#
Bases:
EnumMatching method for mapping metadata record from one platform to another (GitHub, bio.tools).
- class bridge.pipelines.protocols.ModelsMap(repo, metadata)[source]#
Bases:
ABCAbstract class for mapping between repository and metadata models.
- Parameters:
repo (Any) – A repository model instance.
metadata (Any) – A metadata model instance.
- abstract property map: dict[str, Any]#
Perform the mapping between repository and metadata models.
- Returns:
The map representation of the models.
- Return type:
Any
Submodules#
Abstract class for mapping between repository and metadata models. |
|
SafeAttr proxy class for safe attribute/item access and deep unwrapping utility. |
|
Base Pydantic class for pipeline arguments to keep inputs predictable. |
Dependencies diagram#
Each architecture diagram below visualizes the internal dependency structure of the bridge.pipelines.protocols package.
It shows how modules and subpackages within the package depend on each other, based on direct Python imports.
Packages are shown as purple rectangles
Modules are shown as pink rectangles
Arrows (A → B) indicate that A directly imports B
Each subpackage’s diagram focuses only on its own internal structure, it does not include imports to or from higher-level packages (those appear in the parent package’s diagram).