bridge.pipelines.bt2gh_for_pr_issues.map_funcs.topics module#
Functions for mapping bio.tools EDAM annotations to GitHub topics.
This module inspects EDAM-based annotations from bio.tools (topics and function-level operation/input/output terms) and compares them to the existing set of GitHub topics for a repository. When one or more EDAM terms are missing from the GitHub topics, it proposes a GitHub issue suggesting that these terms be added as topics, using a generic bio.tools-on-top-of-GitHub additive policy.
- bridge.pipelines.bt2gh_for_pr_issues.map_funcs.topics.map_topics(gh_topics, bt_edam)[source]#
Propose a GitHub issue to add missing EDAM-based topics from bio.tools.
This function inspects EDAM annotations from bio.tools (both high-level topics and function-level operation/input/output terms), normalizes them to GitHub-topic-style slugs, and compares them against the normalized set of existing GitHub topics. It then applies the generic bio.tools-on-top-of-GitHub additive policy to decide whether an issue should be proposed and which EDAM terms to include.
- Parameters:
gh_topics (list[str] | None) – Current list of GitHub topics for the repository, or
Noneif no topics are set.bt_edam (dict[str, Any] | None) – EDAM-related metadata from bio.tools. Expected keys include: - “topics” : list[TopicItem] - “functions” : list[FunctionItem]
- Returns:
A mapping with the issue title as key and the issue body as value, or
Noneif no issue is needed under the policy.- Return type:
dict[str, str] | None