bridge.bootstrap package#
Public Interface#
This section documents user-facing interface of the bridge.bootstrap package (as defined in its __init__.py file).
Functions#
|
Retrieve the composer function for a given schema. |
|
Retrieve the (composer_function, RepoProviderClass) tuple for a given repo type. |
|
Retrieve the pipeline function and argument model for a given schema, repo_type, and goal. |
|
Retrieve the handler function for a specific pipeline goal. |
|
Register a handler function for a specific pipeline goal. |
Bootstrap utilities that register schemas, repositories, pipelines, and handlers into process-local registries, plus lookup helpers used by handlers at runtime.
- bridge.bootstrap.get_handler(goal)[source]#
Retrieve the handler function for a specific pipeline goal.
- Parameters:
goal (PipelineGoal) – The pipeline goal.
- Returns:
The handler function for the specified goal.
- Return type:
callable
- bridge.bootstrap.get_pipeline(schema, repo_type, goal)[source]#
Retrieve the pipeline function and argument model for a given schema, repo_type, and goal.
- Parameters:
schema (str) – The name of the schema (e.g., “biotools”).
repo_type (str) – The type of the repository (e.g., “github”).
goal (PipelineGoal) – The pipeline goal.
- Returns:
The (pipeline_function, args_model_class) for the specified combination.
- Return type:
tuple[callable, type[PipelineArgs]]
- bridge.bootstrap.get_repo_components(repo_type)[source]#
Retrieve the (composer_function, RepoProviderClass) tuple for a given repo type.
- Parameters:
repo_type (str) – The type of the repository (e.g., “github”).
- Returns:
The (composer_function, RepoProviderClass) for the repo type.
- Return type:
tuple[callable, type[RepoProvider]]
- bridge.bootstrap.get_schema_composer(schema)[source]#
Retrieve the composer function for a given schema.
- Parameters:
schema (str) – The name of the schema (e.g., “biotools”).
- Returns:
The composer function for the schema.
- Return type:
callable
- bridge.bootstrap.register_handler(goal, *, auto_wire=True, force_wire=False)[source]#
Register a handler function for a specific pipeline goal. Automatically ensures the registry wiring is initialized before the handler runs. Decorator function.
- Parameters:
goal (PipelineGoal) – The pipeline goal to register the handler for.
auto_wire (bool, optional) – If True, automatically wire the registry before running the handler (default: True).
force_wire (bool, optional) – If True, re-initialize wiring even if already initialized (default: False).
- Raises:
ValueError – If a handler is already registered for the specified goal.
Submodules#
Core in-memory registries and helpers for registration and lookup of schemas, repo providers, and pipeline bindings. |
|
Register a handler function for a specific pipeline goal. |
|
Minimal module tracking whether global wiring has been performed to prevent duplicate initialization. |
|
Default wiring for the bridge: registers the bio.tools schema, the GitHub repo provider, and both directional pipelines. |
Dependencies diagram#
Each architecture diagram below visualizes the internal dependency structure of the bridge.bootstrap 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).