bridge.pipelines.gh2bt_for_meta.map_funcs.documentation module

bridge.pipelines.gh2bt_for_meta.map_funcs.documentation module#

Mapping functions for documentation metadata.

This module maps GitHub repository features (wiki, code of conduct, GitHub Pages) to the bio.tools documentation field by adding appropriate DocumentationItem entries when they are not already present.

bridge.pipelines.gh2bt_for_meta.map_funcs.documentation.map_documentation(gh_repo_data, bt_documentation)[source]#

Map and reconcile GitHub documentation-related metadata to the bio.tools documentation field.

This function applies the documentation mapping policies for all supported GitHub documentation sources: - Repository wiki - Code of conduct - GitHub Pages site

Each source is mapped independently and contributes a DocumentationItem entry when a corresponding URL is present on GitHub and not already recorded in bio.tools.

Parameters:
  • gh_repo_data (dict[str, Any] | None) – GitHub repository metadata dictionary. Expected keys include: - "html_url" - "has_wiki" - "code_of_conduct" - "github_pages"

  • bt_documentation (list[DocumentationItem] | None) – Existing bio.tools documentation entries.

Returns:

The updated bio.tools documentation list after applying all documentation mappings.

Return type:

list[DocumentationItem] | None