{% macro code_curie(prefix, identifier) -%} {{ curie_to_str(prefix, identifier) }} {% endmacro %} {% macro link_curie(prefix, identifier, text) -%} {{ text }} {% endmacro %} {% macro link_code_curie(prefix, identifier) -%} {{ link_curie(prefix, identifier, code_curie(prefix, identifier)) }} {% endmacro %} {% macro render_prefix(prefix, classes="") -%} {{ prefix }} {% endmacro %} {% macro render_metaprefix(metaprefix) -%} {{ metaprefix }} {% endmacro %} {%- macro link_organization(organization) %} {{ organization.name }} {%- if organization.ror -%}{{ ror_img() }}{%- endif -%} {%- if organization.gnd -%}{{ gnd_img() }}{%- endif -%} {%- if organization.wikidata -%}{{ wikidata_img() }}{%- endif -%} {%- 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://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 %} Not 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 %}
Provider Name Provider Code 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 %}   {{ orcid_img() }} {{ 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 {{ config.METAREGISTRY_PYTHON_PACKAGE }} as br
>>> br.{{ func }}("{{ prefix }}")
{% if quote %}'{{ text }}'{% else %}{{ text }}{% endif %}
{% endmacro %} {%- macro orcid_img() -%} ORCiD logo {%- endmacro %} {%- macro ror_img() -%} ROR logo {%- endmacro %} {%- macro gnd_img() -%} GND logo {%- endmacro %} {%- macro wikidata_img() -%} Wikidata logo {%- endmacro %}