{% macro code_curie(prefix, identifier) -%} {{ curie_to_str(prefix, identifier) }} {% endmacro %} {% macro render_prefix(prefix, classes="") -%} {{ prefix }} {% endmacro %} {% macro render_metaprefix(metaprefix) -%} {{ metaprefix }} {% endmacro %} {% macro render_publication(publication) -%} {% if publication.year %} {{ publication.year }} {% endif %} {{ publication.title or publication.get_url() }} {% endmacro %} {% macro render_reference(reference) -%} {% if reference.startswith("https://twitter.com") %} Tweet {% elif reference.startswith("https://github.com/") and "issues/" in reference %} GitHub Issue {% elif reference.startswith("https://github.com/") and "pull" in reference %} GitHub PR {% elif reference.startswith("https://doi.org/") %} DOI {% else %} Other {% endif %} {{ reference }} {% endmacro %} {% macro render_resource_warnings(resource) -%} {% if resource.deprecated %} Deprecated {% elif resource.provides %} Provider {% elif resource.has_canonical %} Has Canonical {% endif %} {% if resource.proprietary %} Proprietary {% endif %} {% endmacro %} {% macro render_provider_table(prefix, identifier, providers) -%} {% if providers %} {% for provider in providers %} {% if provider.name %} {% endif %} {% endfor %}
Name Metaprefix URI
{% if provider.homepage %} {{ provider.name }} {% else %} {{ provider.name }} {% endif %} {{ provider.metaprefix }} {{ provider.uri }}
{% endif %} {% endmacro %} {% macro render_author(author, link=none) -%} {% if link or author.email %} {% if author.name %} {{ author.name }} {% else %} {{ author.email }} {% endif %} {% else %} {% if author.name %} {{ author.name }} {% endif %} {% endif %} {% if author.orcid %}   {{ author.orcid }} {% endif %} {% if author.github %}   {{ author.github }} {% endif %} {% endmacro %} {% macro render_author_modal(prefix, author, key) %} {% endmacro %} {% macro code_example(prefix, func, text, quote=True) -%}
>>> import bioregistry as br
>>> br.{{ func }}("{{ prefix }}")
{% if quote %}'{{ text }}'{% else %}{{ text }}{% endif %}
{% endmacro %}