Skip to content

Commit

Permalink
Merge pull request #2304 from microbiomedata/linkml-issue-2438
Browse files Browse the repository at this point in the history
Modify `Mappings` table to reduce redundancy
  • Loading branch information
sujaypatil96 authored Jan 6, 2025
2 parents 4b01a37 + f02dde1 commit 8749b7e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/doc-templates/common_metadata.md.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,14 @@ Instances of this class *should* have identifiers with one of the following pref

| Mapping Type | Mapped Value |
| --- | --- |
{% for m, mt in schemaview.get_mappings(element.name).items() -%}
{% set native_mappings = schemaview.get_mappings(element.name).get('native', []) %}
{%- for m, mt in schemaview.get_mappings(element.name).items() -%}
{% if mt|length > 0 -%}
| {{ m }} | {{ mt|join(', ') }} |
{% set display_key = 'mappings' if m == 'undefined' else m -%}
{% set filtered_mt = mt | reject('in', native_mappings) | list -%}
{% if filtered_mt|length > 0 -%}
| {{ display_key }} | {{ filtered_mt|join(', ') }} |
{% endif -%}
{% endif -%}
{% endfor %}

Expand Down

0 comments on commit 8749b7e

Please sign in to comment.