bridge.pipelines.gh2bt_for_meta.map_funcs.maturity module#
Mapping functions for maturity metrics.
This module derives bio.tools maturity metadata from GitHub repository signals. GitHub archived status is treated as authoritative, while a simple popularity-based heuristic is used to distinguish between emerging and mature tools when the repository is active.
- bridge.pipelines.gh2bt_for_meta.map_funcs.maturity.map_maturity(gh_schema, bt_maturity)[source]#
Map GitHub repository signals to bio.tools maturity metadata.
Policy: 1. If the GitHub repository is archived, maturity is always set to
Maturity.Legacy, regardless of existing bio.tools values.Otherwise, a popularity score based on stars, forks, watchers, and subscribers is computed.
Scores above a fixed threshold are classified as
Maturity.Mature; lower scores asMaturity.Emerging.Existing bio.tools maturity is preserved only when it matches the GitHub-derived classification.
Conflicting values are overwritten in favor of GitHub-derived maturity and logged as conflicts.
- Parameters:
gh_schema (dict[str, Any] | None) – GitHub repository metadata dictionary, or
Noneif unavailable. Expected keys include: - ‘archived’ : Boolean indicating if the repository is archived. - ‘stargazers_count’ : Number of stars. - ‘forks_count’ : Number of forks. - ‘watchers_count’ : Number of watchers. - ‘subscribers_count’ : Number of subscribers.bt_maturity (Maturity | None) – Existing bio.tools maturity annotation, or
Noneif unset.
- Returns:
The reconciled bio.tools maturity classification, or the existing value if no GitHub-derived maturity could be computed.
- Return type:
Maturity | None