Skip to content

Commit

Permalink
Update to metamodel v12, release 1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MarekSuchanek committed Dec 5, 2023
1 parent a85318b commit 88e6f74
Show file tree
Hide file tree
Showing 17 changed files with 58 additions and 115 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.6.0

- Adjusted to template metamodel version 12 (released in DSW 4.1.0)

### 1.5.1

- Fixed broken uuids
Expand Down
54 changes: 0 additions & 54 deletions extract_uuids.py

This file was deleted.

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 == 1 %}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
4 changes: 2 additions & 2 deletions src/frontpage.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
<div class="date">{{ dc.doc.created_at|datetime_format("%d %B %Y") }}</div>
</div>

<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;<br/>
<p class="note">
Data Management Plan created in {{ globals.fullName }} &laquo;<a href="{{ globals.linkUrl }}" target="_blank">{{ globals.link }}</a>&raquo;<br/>
using {{ dc.pkg.name }} v{{ dc.pkg.version }} (<span class="package-id"><span class="organization-id">{{ dc.pkg.org_id }}</span>:<span class="km-id">{{ dc.pkg.km_id }}</span>:<span class="version">{{ dc.pkg.version }}</span></span>).
</p>
</div>
Expand Down
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 = km.entities.questions[questionUuid] -%}
{%- set integration = km.entities.integrations[question.integrationUuid] -%}
{%- set integrationLink = integration.itemUrl|replace("${id}", 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 @@ -42,7 +42,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
47 changes: 20 additions & 27 deletions src/questions/01-data-summary.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -178,20 +178,20 @@
{%- set isUsed = refDataUsedAUuid == uuids.refDataUseYesAUuid -%}
<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 }})
{%- endif -%}
{%- if isUsed %}
✔️
It is available via: {{ refDataWhere }}.
{%- endif %}
{% if isUsed %}
It is used in the project.
{%- elif isNotUsed %}
{%- else %}
It was considered but will not be used in the project.
{%- endif -%}
</p>
{%- endif -%}
{# ref data - not used #}
{%- if isNotUsed -%}
Expand Down Expand Up @@ -288,20 +288,20 @@
{%- set isUsed = nrefDataUsedAUuid == uuids.nrefDataUseYesAUuid -%}
<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 }})
{%- endif -%}
{%- if isUsed %}
✔️
It is available via: {{ nrefDataWhere }}.
{%- endif %}
{% if isUsed %}
It is used in the project.
{%- elif isNotUsed %}
{%- else %}
It was considered but will not be used in the project.
{%- endif -%}
</p>
{%- endif -%}
{# nref data - not used #}
{%- if isNotUsed -%}
Expand Down Expand Up @@ -440,14 +440,7 @@
{%- elif standards|length > 1 %}
{%- set standardLinks = [] -%}
{%- for standardReply in standards %}
{%- if reply and reply.value.value.type == "IntegrationType" -%}
{%- set question = km.entities.questions[questionUuid] -%}
{%- set integration = km.entities.integrations[question.integrationUuid] -%}
{%- set integrationLink = integration.responseItemUrl|replace("${id}", reply.value.value.id) -%}
{%- do standardLinks.append('<a href="{{ integrationLink }}" target="_blank">' ~ reply.value.value.value ~ '</a>') -%}
{%- elif reply %}
{%- do standardLinks.append(reply.value.value.value) -%}
{%- endif -%}
{{ macros.integrationValue(standardReply) }}
{% endfor %}
{%- do dataCompReadSentences.append("For that, we will use the following formats: " ~ standardLinks|join(", ") ~ ".") -%}
{%- endif -%}
Expand Down Expand Up @@ -483,7 +476,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
8 changes: 4 additions & 4 deletions src/questions/02-1-findable.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
{%- if identifierTypeAUuid == uuids.dataIdentifierTypeHandleAUuid -%}
<li>Handle: <strong>{{ identifierValue }}</strong></li>
{%- elif identifierTypeAUuid == uuids.dataIdentifierTypeDoiAUuid -%}
<li>DOI: <strong><a href="https://doi.org/{{ identifierValue }}">{{ identifierValue }}</a></strong></li>
<li>DOI: <strong><a href="https://doi.org/{{ identifierValue }}" target="_blank">{{ identifierValue }}</a></strong></li>
{%- elif identifierTypeAUuid == uuids.dataIdentifierTypeArkAUuid -%}
<li>ARK: <strong>{{ identifierValue }}</strong></li>
{%- elif identifierTypeAUuid == uuids.dataIdentifierTypeUrlAUuid -%}
<li>URL: <strong><a href="{{ identifierValue }}">{{ identifierValue }}</a></strong></li>
<li>URL: <strong><a href="{{ identifierValue }}" target="_blank">{{ identifierValue }}</a></strong></li>
{%- elif identifierTypeAUuid == uuids.dataIdentifierTypeOtherAUuid -%}
{%- set identifierType = repliesMap[[identifierTypePath, uuids.dataIdentifierTypeOtherAUuid, uuids.dataIdentifierTypeOtherTypeQUuid]|reply_path]|reply_str_value -%}
<li>{{ identifierType }}: <strong>{{ identifierValue }}</strong></li>
Expand All @@ -62,7 +62,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 @@ -193,7 +193,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
20 changes: 9 additions & 11 deletions src/questions/02-2-accessible.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -207,16 +207,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 {{globals.projects}}{{ ": " ~ refDataConditionsOther|dot if refDataConditionsOther else "." }}
It is available under specific restrictions, which we will follow in our {{globals.projects}}{{ ": " ~ refDataConditionsOther|dot if refDataConditionsOther else "." }}
{%- endif -%}
</li>
{%- endif -%}
Expand All @@ -230,16 +229,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 {{globals.projects}}{{ ": " ~ nrefDataConditionsOther|dot if nrefDataConditionsOther else "." }}
It is available under specific restrictions, which we will follow in our {{globals.projects}}{{ ": " ~ nrefDataConditionsOther|dot if nrefDataConditionsOther else "." }}
{%- endif -%}
</li>
{%- endif -%}
Expand Down Expand Up @@ -380,7 +378,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/03-other-outputs.html.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div id="q-other-outputs" class="question">
<div class="answer">
<p>We use Data Stewardship Wizard for planning our data management and creating this DMP. The management and planning of other research outputs is done separately and is included as appendix to this DMP. Still, we benefit from data stewardship guidance (e.g. FAIR principles, openness, or security) and it is reflected in our plans with respect to other research outputs.</p>
<p>We use {{ globals.fullName }} for planning our data management and creating this DMP. The management and planning of other research outputs is done separately and is included as appendix to this DMP. Still, we benefit from data stewardship guidance (e.g. FAIR principles, openness, or security) and it is reflected in our plans with respect to other research outputs.</p>
</div>
</div>
2 changes: 1 addition & 1 deletion src/questions/07-other-issues.html.j2
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<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>

{# Applied policies #}
{%- set policiesPath = [uuids.adminDetailsCUuid, uuids.policiesQUuid]|reply_path -%}
Expand Down
2 changes: 1 addition & 1 deletion src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ header > div.info {
text-align: center;
}

header .dsw {
header .note {
margin-top: 2cm;
font-size: 10pt;
font-style: italic;
Expand Down
Loading

0 comments on commit 88e6f74

Please sign in to comment.