bridge.pipelines.gh2bt_for_meta.map_funcs.topic module

Contents

bridge.pipelines.gh2bt_for_meta.map_funcs.topic module#

Mapping GitHub topics to bio.tools EDAM topics.

This module aligns GitHub repository topics with bio.tools EDAM topics. It compares the list of topics reported by GitHub for a repository with the list of existing bio.tools EDAM topics and applies a reconciliation policy that prefers GitHub topics when they are present, while retaining existing bio.tools topics.

async bridge.pipelines.gh2bt_for_meta.map_funcs.topic.map_topics(gh_topics, bt_topics)[source]#

Map and reconcile GitHub topics with bio.tools EDAM topics using the generic GitHub-over-bio.tools policy.

GitHub topics are normalized to a lowercased set of strings, and bio.tools topics are similarly normalized to a set of lowercased topic names derived from the TopicItem enum members.

Parameters:
  • gh_topics (list[str] | None) – List of GitHub topics, or None if no topics are present.

  • bt_topics (list[TopicItem] | None) – List of existing bio.tools EDAM topic annotations, or None if no topics are recorded.

Returns:

A reconciled list of TopicItem enum members representing the topics for the tool, preferring GitHub topics when available, or None if no topics can be determined

Return type:

list[TopicItem] | None