bridge.pipelines.gh2bt_for_meta.map_funcs.language module

Contents

bridge.pipelines.gh2bt_for_meta.map_funcs.language module#

Map language metadata from GitHub to bio.tools.

This module aligns programming language information between GitHub and bio.tools. It compares the languages reported by GitHub for a repository with those listed in the bio.tools metadata, and suggests updates when discrepancies are found.

bridge.pipelines.gh2bt_for_meta.map_funcs.language.map_language(gh_languages, bt_languages)[source]#

Map and reconcile GitHub and bio.tools programming languages using the generic GitHub-over-bio.tools policy.

GitHub language keys and bio.tools LanguageEnum values are normalized to lowercased string sets for comparison. When GitHub is authoritative, the GitHub set is mapped back to LanguageEnum values; unknown languages are skipped with a log entry.

Parameters:
  • gh_languages (Language | None) – GitHub languages object, or None if no language data is available.

  • bt_languages (list[LanguageEnum] | None) – Existing bio.tools language annotations for the tool, or None if no languages are currently recorded in bio.tools.

Returns:

The reconciled list of bio.tools language enums following the policy. May be None if both inputs are None.

Return type:

list[LanguageEnum] | None