bridge.pipelines package#

Public Interface#

This section documents user-facing interface of the bridge.pipelines package (as defined in its __init__.py file).

Functions#

run_bt2gh_pipeline_for_pr_issues(args)

Run the pipeline to generate repository file changes based on bio.tools metadata.

run_gh2bt_pipeline_for_meta(args)

Run the pipeline to extract bio.tools metadata from a GitHub repository.

Classes#

PipelineGoal(*values)

Enumeration of possible pipeline goals.

BiotoolsToGitHubForPRPipelineArgs(**data)

Pipeline argument model for the bio.tools to GitHub for PR pipeline.

GitHubToBiotoolsForMetaPipelineArgs(**data)

Pipeline argument model for the GitHub to bio.tools for metadata pipeline.

End-to-end pipelines that implement the bridge’s directional workflows. Exposes run functions for the pipelines and argument models.

class bridge.pipelines.BiotoolsToGitHubForPRPipelineArgs(**data)[source]#

Bases: PipelineArgs

Pipeline argument model for the bio.tools to GitHub for PR pipeline.

Parameters:
  • repo_path (str) – Path to the cloned GitHub repository to make changes in.

  • metadata_model (BiotoolsToolModel) – The source bio.tools metadata model.

  • existing_repo_model (GitHubRepoModel)

existing_repo_model: GitHubRepoModel#
metadata_model: ToolModel#
repo_path: str#
class bridge.pipelines.GitHubToBiotoolsForMetaPipelineArgs(**data)[source]#

Bases: PipelineArgs

Pipeline argument model for the GitHub to bio.tools for metadata pipeline.

Parameters:
  • repo_model (GitHubRepoModel) – The source GitHub repository model.

  • repo_path (str) – The local path to the cloned GitHub repository.

  • existing_metadata (BiotoolsToolModel | None) – Existing bio.tools metadata model, if available. Default is None.

existing_metadata: ToolModel | None#
repo_model: GitHubRepoModel#
repo_path: str#
class bridge.pipelines.PipelineGoal(*values)[source]#

Bases: str, Enum

Enumeration of possible pipeline goals.

CREATE_PR_ISSUES#

Goal to create a pull request and issues in a repository based on source metadata.

Type:

str

EXTRACT_METADATA#

Goal to extract metadata from a repository.

Type:

str

async bridge.pipelines.run_bt2gh_pipeline_for_pr_issues(args)#

Run the pipeline to generate repository file changes based on bio.tools metadata.

Parameters:

args (BiotoolsToGitHubForPRPipelineArgs) – The pipeline arguments containing a path to the cloned GitHub repository and metadata model.

Returns:

A dictionary mapping file paths to their new content, and a dictionary mapping issue titles to their bodies.

Return type:

tuple[dict, dict]

async bridge.pipelines.run_gh2bt_pipeline_for_meta(args)#

Run the pipeline to extract bio.tools metadata from a GitHub repository.

Parameters:

args (GitHubToBiotoolsForMetaPipelineArgs) – The pipeline arguments containing the GitHub repository model and existing bio.tools metadata.

Returns:

The extracted or updated bio.tools metadata model.

Return type:

BiotoolsToolModel

Subpackages#

bt2gh_for_pr_issues

Pipeline package for generating repository changes (PR-ready for GitHub) from bio.tools metadata.

gh2bt_for_meta

Pipeline package for extracting (or updating) bio.tools metadata from a GitHub repository.

policies

Generic reconciliation policies.

protocols

Protocol and base classes for pipeline argument models consumed by pipeline run functions.

shared

Shared components for mapping functions across pipelines.

utils

Utilities for pipelines.

Submodules#

goals

Enumeration of supported pipeline goals used to bind handlers to pipeline implementations.

Dependencies diagram#

Each architecture diagram below visualizes the internal dependency structure of the bridge.pipelines 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).

bridge package dependencies