Skip to content

Commit

Permalink
Update to metamodel v12, release 1.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MarekSuchanek committed Dec 5, 2023
1 parent dae1954 commit 3e34429
Show file tree
Hide file tree
Showing 13 changed files with 59 additions and 51 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ This document template for DSW is available as open-source via GitHub Repository

## Changelog

### 1.13.0

- Adjusted to template metamodel version 11 (released in DSW 3.20.0)

### 1.12.2

- Removed unused uuids
Expand Down
2 changes: 1 addition & 1 deletion src/contributors.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<br>{% if contributor.roles|length == 0 %}Role{% else %}Roles{% endif %}: {% for role in contributor.roles %}<span class="role">{{ role }}</span>{% if not loop.last %}, {% endif %}{% endfor %}
{%- endif %}
{%- if contributor.affiliation %}
<br>Affiliation: <span class="affiliation">{{ macros.integrationValue(contributor.affiliation, uuids.contributorAffiliationQUuid) }}</span>
<br>Affiliation: <span class="affiliation">{{ macros.integrationValue(contributor.affiliation) }}</span>
{%- endif %}
</li>
{% endfor %}
Expand Down
6 changes: 3 additions & 3 deletions src/frontpage.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<br>{{ macros.formatOrcid(contributorOrcid) }}
{%- endif -%}
{%- if contributorAffiliationReply %}
<br>{{ macros.integrationValue(contributorAffiliationReply, uuids.contributorAffiliationQUuid) }}
<br>{{ macros.integrationValue(contributorAffiliationReply) }}
{%- endif -%}
</li>
{%- endfor -%}
Expand Down Expand Up @@ -76,8 +76,8 @@
<dt>Generated on</dt>
<dd>{{ dc.doc.created_at|datetime_format("%d %b %Y") }}</dd>
</dl>
<p class="dsw">
Data Management Plan created in Data Stewardship Wizard &laquo;<a href="https://ds-wizard.org" target="_blank">ds-wizard.org</a>&raquo;
<p class="note">
Data Management Plan created in {{ globals.fullName }} &laquo;<a href="{{ globals.linkUrl }}" target="_blank">{{ globals.link }}</a>&raquo;
</p>
</div>
</header>
5 changes: 5 additions & 0 deletions src/globals.j2
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{%- set name = "DSW" -%}
{%- set fullName = "Data Stewardship Wizard" -%}
{%- set linkUrl = "https://ds-wizard.org" -%}
{%- set link = "ds-wizard.org" -%}

{#- Project or projects (based on number) -#}
{%- set projectsPath = [uuids.adminDetailsCUuid, uuids.projectsQUuid]|reply_path -%}
{%- set projectsItems = repliesMap[projectsPath]|reply_items -%}
Expand Down
7 changes: 2 additions & 5 deletions src/macros.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,9 @@
</svg></span>&nbsp;<a href="https://orcid.org/{{ orcid }}" target="_blank">{{ orcid }}</a></span>
{%- endmacro -%}

{%- macro integrationValue(reply, questionUuid) -%}
{%- macro integrationValue(reply) -%}
{%- if reply and reply.value.value.type == "IntegrationType" -%}
{%- set question = dc.e.questions[questionUuid] -%}
{%- set integration = question.integration -%}
{%- set integrationLink = integration.item(reply.value.value.id) -%}
<a href="{{ integrationLink }}" target="_blank">{{ reply.value.value.value|markdown }}</a>
{{ reply.value.value.value|markdown }}
{%- elif reply %}
{{ reply.value.value.value }}
{%- endif -%}
Expand Down
2 changes: 1 addition & 1 deletion src/projects.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
{%- set grantNumber = repliesMap[grantNumberPath]|reply_str_value -%}
{%- set funderStatusPath = [fundersPath, fundersItem, uuids.funderStatusQUuid]|reply_path -%}
{%- set funderStatus = repliesMap[funderStatusPath]|reply_str_value %}
<li>{{ macros.integrationValue(funderNameReply, uuids.funderNameQUuid) }}: {{ grantNumber if grantNumber else "grant number not yet given" }} {% if funderStatus == uuids.funderStatusPlannedAUuid %}(planned){% elif funderStatus == uuids.funderStatusAppliedAUuid %}(applied){% elif funderStatus == uuids.funderStatusGrantedAUuid %}(granted){% elif funderStatus == uuids.funderStatusRejectedAUuid %}(rejected){% endif %}</li>
<li>{{ macros.integrationValue(funderNameReply) }}: {{ grantNumber if grantNumber else "grant number not yet given" }} {% if funderStatus == uuids.funderStatusPlannedAUuid %}(planned){% elif funderStatus == uuids.funderStatusAppliedAUuid %}(applied){% elif funderStatus == uuids.funderStatusGrantedAUuid %}(granted){% elif funderStatus == uuids.funderStatusRejectedAUuid %}(rejected){% endif %}</li>
{%- endfor %}
</ul>
{%- else -%}
Expand Down
26 changes: 16 additions & 10 deletions src/questions/01-data-summary.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,15 @@
{%- set refDataWhere = repliesMap[[refDataPrefix, uuids.refDataWhereQUuid]|reply_path]|reply_str_value -%}
<li>
{# identification #}
<strong>{{ macros.integrationValue(refDataNameReply, uuids.refDataNameQUuid) }}</strong>
<div>{{ macros.integrationValue(refDataNameReply) }}</div>
{%- if refDataWhere -%}
<p>
{%- if refDataWhere.startswith("http://") or refDataWhere.startswith("https://") or refDataWhere.startswith("ftp://") %}
(<a href="{{ refDataWhere }}" target="_blank">{{ refDataWhere }}</a>)
It is available via: <a href="{{ refDataWhere }}" target="_blank">{{ refDataWhere }}</a>.
{%- else %}
({{ refDataWhere }})
It is available via: {{ refDataWhere }}.
{%- endif -%}
</p>
{%- endif -%}
{# version #}
{%- set refDataVersionedPath = [refDataUsedPrefix, uuids.refDataVersionedQUuid]|reply_path -%}
Expand Down Expand Up @@ -204,13 +206,15 @@
{%- set nrefDataWhere = repliesMap[[nrefDataPrefix, uuids.nrefDataWhereQUuid]|reply_path]|reply_str_value -%}
<li>
{# identification #}
<strong>{{ macros.integrationValue(nrefDataNameReply, uuids.nrefDataNameQUuid) }}</strong>
<div>{{ macros.integrationValue(nrefDataNameReply) }}</div>
{%- if nrefDataWhere -%}
<p>
{%- if nrefDataWhere.startswith("http://") or nrefDataWhere.startswith("https://") or nrefDataWhere.startswith("ftp://") %}
(<a href="{{ nrefDataWhere }}" target="_blank">{{ nrefDataWhere }}</a>)
It is available via: <a href="{{ nrefDataWhere }}" target="_blank">{{ nrefDataWhere }}</a>.
{%- else %}
({{ nrefDataWhere }})
It is available via: {{ nrefDataWhere }}.
{%- endif -%}
</p>
{%- endif -%}
{# version #}
{%- set refDataVersionedPath = [refDataUsedPrefix, uuids.refDataVersionedQUuid]|reply_path -%}
Expand Down Expand Up @@ -256,13 +260,15 @@
{%- set nrefDataWhere = repliesMap[[nrefDataPrefix, uuids.nrefDataWhereQUuid]|reply_path]|reply_str_value -%}
<li>
{# identification #}
<strong>{{ macros.integrationValue(nrefDataNameReply, uuids.nrefDataNameQUuid) }}</strong>
<div>{{ macros.integrationValue(nrefDataNameReply) }}</div>
{%- if nrefDataWhere -%}
<p>
{%- if nrefDataWhere.startswith("http://") or nrefDataWhere.startswith("https://") or nrefDataWhere.startswith("ftp://") %}
(<a href="{{ nrefDataWhere }}" target="_blank">{{ nrefDataWhere }}</a>)
It is available via: <a href="{{ nrefDataWhere }}" target="_blank">{{ nrefDataWhere }}</a>.
{%- else %}
({{ nrefDataWhere }})
It is available via: {{ nrefDataWhere }}.
{%- endif -%}
</p>
{%- endif -%}
{# data access #}
{%- set nrefDataAccessPath = [nrefDataUsedPrefix, uuids.nrefDataAccessQUuid]|reply_path -%}
Expand Down Expand Up @@ -309,7 +315,7 @@
{%- set formatsVolumeAUuid = repliesMap[formatsVolumePath]|reply_str_value -%}
<li>
{# identification #}
<strong>{{ macros.integrationValue(formatNameReply, uuids.formatsNameQUuid) }}</strong>
<div>{{ macros.integrationValue(formatNameReply) }}</div>
{%- if formatsIsStandardAUuid or formatsIsLTSuitableAUuid or formatsVolumeAUuid -%}
<p>
{# standard? #}
Expand Down
4 changes: 2 additions & 2 deletions src/questions/02-1-findable.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
{%- set domainSpecificRepoNamePath = [distroRepositoryKindPath, uuids.publishedDataRepositoryDomainSpecificAUuid, uuids.domainSpecificRepoNameQUuid]|reply_path -%}
{%- set domainSpecificRepoNameReply = repliesMap[domainSpecificRepoNamePath] -%}
{%- if domainSpecificRepoNameReply -%}
: {{ macros.integrationValue(domainSpecificRepoNameReply, uuids.domainSpecificRepoNameQUuid) }}.
: {{ macros.integrationValue(domainSpecificRepoNameReply) }}.
{%- else -%}.
{% endif -%}
{# Contact the repository #}
Expand Down Expand Up @@ -138,7 +138,7 @@
<p>There are the following 'Minimal Metadata About ...' (MIA...) standards for our experiments:
<ul>
{%- for metadataStandardReply in metadataStandardReplies -%}
<li>{{ macros.integrationValue(metadataStandardReply, uuids.metadataMiaWhichQUuid) }}</li>
<li>{{ macros.integrationValue(metadataStandardReply) }}</li>
{%- endfor -%}
</ul>
</p>
Expand Down
40 changes: 18 additions & 22 deletions src/questions/02-2-accessible.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -173,16 +173,15 @@
{%- set refDataConditionsAUuid = repliesMap[refDataConditionsPath]|reply_str_value -%}
{%- if refDataConditionsAUuid -%}
<li>
<strong>{{ macros.integrationValue(refDataNameReply, uuids.refDataNameQUuid) }}</strong>
<span class="separator">&ndash;</span>
<div>{{ macros.integrationValue(refDataNameReply) }}</div>
{% if refDataConditionsAUuid == uuids.refDataConditionsCC0AUuid -%}
freely available for any use (public domain or CC0).
It is freely available for any use (public domain or CC0).
{%- elif refDataConditionsAUuid == uuids.refDataConditionsCCBYAUuid -%}
freely available with obligation to quote the source (e.g. CC-BY).
It is freely available with obligation to quote the source (e.g. CC-BY).
{%- elif refDataConditionsAUuid == uuids.refDataConditionsOtherAUuid -%}
{%- set refDataConditionsOtherPath = [refDataConditionsPath, uuids.refDataConditionsOtherAUuid, uuids.refDataConditionsOtherQUuid]|reply_path -%}
{%- set refDataConditionsOther = repliesMap[refDataConditionsOtherPath]|reply_str_value -%}
available under specific restrictions, which we will follow in our project{{ ": " ~ refDataConditionsOther|dot if refDataConditionsOther else "." }}
It is available under specific restrictions, which we will follow in our project{{ ": " ~ refDataConditionsOther|dot if refDataConditionsOther else "." }}
{%- endif -%}
</li>
{%- endif -%}
Expand All @@ -194,16 +193,15 @@
{%- set nrefDataConditionsAUuid = repliesMap[nrefDataConditionsPath]|reply_str_value -%}
{%- if nrefDataConditionsAUuid -%}
<li>
<strong>{{ macros.integrationValue(nrefDataNameReply, uuids.nrefDataNameQUuid) }}</strong>
<span class="separator">&ndash;</span>
<div>{{ macros.integrationValue(nrefDataNameReply) }}</div>
{% if nrefDataConditionsAUuid == uuids.nrefDataConditionsCC0AUuid -%}
freely available for any use (public domain or CC0).
It is freely available for any use (public domain or CC0).
{%- elif nrefDataConditionsAUuid == uuids.nrefDataConditionsCCBYAUuid -%}
freely available with obligation to quote the source (e.g. CC-BY).
It is freely available with obligation to quote the source (e.g. CC-BY).
{%- elif nrefDataConditionsAUuid == uuids.nrefDataConditionsOtherAUuid -%}
{%- set nrefDataConditionsOtherPath = [nrefDataConditionsPath, uuids.nrefDataConditionsOtherAUuid, uuids.nrefDataConditionsOtherQUuid]|reply_path -%}
{%- set nrefDataConditionsOther = repliesMap[nrefDataConditionsOtherPath]|reply_str_value -%}
available under specific restrictions, which we will follow in our project{{ ": " ~ nrefDataConditionsOther|dot if nrefDataConditionsOther else "." }}
It is available under specific restrictions, which we will follow in our project{{ ": " ~ nrefDataConditionsOther|dot if nrefDataConditionsOther else "." }}
{%- endif -%}
</li>
{%- endif -%}
Expand All @@ -223,16 +221,15 @@
{%- set refDataConditionsAUuid = repliesMap[refDataConditionsPath]|reply_str_value -%}
{%- if refDataConditionsAUuid -%}
<li>
<strong>{{ macros.integrationValue(refDataNameReply, uuids.refDataNameQUuid) }}</strong>
<span class="separator">&ndash;</span>
<div>{{ macros.integrationValue(refDataNameReply) }}</div>
{% if refDataConditionsAUuid == uuids.refDataConditionsCC0AUuid -%}
freely available for any use (public domain or CC0).
It is freely available for any use (public domain or CC0).
{%- elif refDataConditionsAUuid == uuids.refDataConditionsCCBYAUuid -%}
freely available with obligation to quote the source (e.g. CC-BY).
It is freely available with obligation to quote the source (e.g. CC-BY).
{%- elif refDataConditionsAUuid == uuids.refDataConditionsOtherAUuid -%}
{%- set refDataConditionsOtherPath = [refDataConditionsPath, uuids.refDataConditionsOtherAUuid, uuids.refDataConditionsOtherQUuid]|reply_path -%}
{%- set refDataConditionsOther = repliesMap[refDataConditionsOtherPath]|reply_str_value -%}
available under specific restrictions, which we will follow in our project{{ ": " ~ refDataConditionsOther|dot if refDataConditionsOther else "." }}
It is available under specific restrictions, which we will follow in our project{{ ": " ~ refDataConditionsOther|dot if refDataConditionsOther else "." }}
{%- endif -%}
</li>
{%- endif -%}
Expand All @@ -246,16 +243,15 @@
{%- set nrefDataConditionsAUuid = repliesMap[nrefDataConditionsPath]|reply_str_value -%}
{%- if nrefDataConditionsAUuid -%}
<li>
<strong>{{ macros.integrationValue(nrefDataNameReply, uuids.nrefDataNameQUuid) }}</strong>
<span class="separator">&ndash;</span>
<div>{{ macros.integrationValue(nrefDataNameReply) }}</div>
{% if nrefDataConditionsAUuid == uuids.nrefDataConditionsCC0AUuid -%}
freely available for any use (public domain or CC0).
It is freely available for any use (public domain or CC0).
{%- elif nrefDataConditionsAUuid == uuids.nrefDataConditionsCCBYAUuid -%}
freely available with obligation to quote the source (e.g. CC-BY).
It is freely available with obligation to quote the source (e.g. CC-BY).
{%- elif nrefDataConditionsAUuid == uuids.nrefDataConditionsOtherAUuid -%}
{%- set nrefDataConditionsOtherPath = [nrefDataConditionsPath, uuids.nrefDataConditionsOtherAUuid, uuids.refDataConditionsOtherQUuid]|reply_path -%}
{%- set nrefDataConditionsOther = repliesMap[nrefDataConditionsOtherPath]|reply_str_value -%}
available under specific restrictions, which we will follow in our project{{ ": " ~ nrefDataConditionsOther|dot if nrefDataConditionsOther else "." }}
It is available under specific restrictions, which we will follow in our project{{ ": " ~ nrefDataConditionsOther|dot if nrefDataConditionsOther else "." }}
{%- endif -%}
</li>
{%- endif -%}
Expand Down Expand Up @@ -302,7 +298,7 @@
{%- set domainSpecificRepoNamePath = [distroRepositoryKindPath, uuids.publishedDataRepositoryDomainSpecificAUuid, uuids.domainSpecificRepoNameQUuid]|reply_path -%}
{%- set domainSpecificRepoNameReply = repliesMap[domainSpecificRepoNamePath] -%}
{%- if domainSpecificRepoNameReply -%}
: {{ macros.integrationValue(domainSpecificRepoNameReply, uuids.domainSpecificRepoNameQUuid) }}.
: {{ macros.integrationValue(domainSpecificRepoNameReply) }}.
{%- else -%}.
{% endif -%}
{# Contact the repository #}
Expand Down Expand Up @@ -397,7 +393,7 @@
The conditions will be published as part of open metadata.
{%- endif -%}
{% if licenseRestrictLink %}
More infomation about the restrictions can be found here: <a href="{{ licenseRestrictLink }}">{{ licenseRestrictLink }}</a>.
More infomation about the restrictions can be found here: <a href="{{ licenseRestrictLink }}" target="_blank">{{ licenseRestrictLink }}</a>.
{% endif %}
{%- endif -%}
</li>
Expand Down
4 changes: 2 additions & 2 deletions src/questions/02-3-interoperable.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{%- set formatsVolumeAUuid = repliesMap[formatsVolumePath]|reply_str_value -%}
<li>
{# identification #}
<strong>{{ macros.integrationValue(formatNameReply, uuids.formatsNameQUuid) }}</strong>
<div>{{ macros.integrationValue(formatNameReply) }}</div>
{%- if formatsIsStandardAUuid or formatsIsLTSuitableAUuid or formatsVolumeAUuid -%}
<p>
{# standard? #}
Expand Down Expand Up @@ -58,7 +58,7 @@
{%- set whatUsingUrlPath = [whatUsingPath, standardItem, uuids.whatUsingUrlQUuid]|reply_path -%}
{%- set whatUsingUrl = repliesMap[whatUsingUrlPath]|reply_str_value -%}
<li>
<strong>{{ macros.integrationValue(whatUsingNameReply, uuids.whatUsingNameQUuid) }}</strong>
<div>{{ macros.integrationValue(whatUsingNameReply) }}</div>
{% if whatUsingUrl %}({{ whatUsingUrl }}){% endif %}
</li>
{%- endfor -%}
Expand Down
2 changes: 1 addition & 1 deletion src/questions/06-other-issues.html.j2
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div id="q-other-issues" class="question">
<div class="answer">
{%- set project_url = dc.config.client_url ~ "/projects/" ~ dc.qtn.uuid -%}
<p>We use the <a href="https://ds-wizard.org">Data Stewardship Wizard</a> with its <em>{{ dc.pkg.name }}</em> (ID: <span class="package-id"><span class="organization-id">{{ dc.pkg.organization_id }}</span>:<span class="km-id">{{ dc.pkg.km_id }}</span>:<span class="version">{{ dc.pkg.version }}</span></span>) knowledge model to make our DMP. More specifically, we use the <a href="{{ dc.config.client_url }}">{{ dc.config.client_url }}</a> DSW instance where the project has direct URL: <a href="{{ project_url }}">{{ project_url }}</a>.</p>
<p>We use the <a href="{{ globals.linkUrl }}" target="_blank">{{ globals.fullName }}</a> with its <em>{{ dc.pkg.name }}</em> (ID: <span class="package-id"><span class="organization-id">{{ dc.pkg.organization_id }}</span>:<span class="km-id">{{ dc.pkg.km_id }}</span>:<span class="version">{{ dc.pkg.version }}</span></span>) knowledge model to make our DMP. More specifically, we use the <a href="{{ dc.config.client_url }}" target="_blank">{{ dc.config.client_url }}</a> {{ globals.name }} instance where the project has direct URL: <a href="{{ project_url }}" target="_blank">{{ project_url }}</a>.</p>
</div>
</div>
2 changes: 1 addition & 1 deletion src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ header .contact-orcid {
white-space: nowrap;
}

header .dsw {
header .note {
margin-top: 2cm;
text-align: center;
font-size: 10pt;
Expand Down
Loading

0 comments on commit 3e34429

Please sign in to comment.