From 3e34429f0682c1bb4643a6b332ab1b87aa52ea07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Such=C3=A1nek?= Date: Tue, 5 Dec 2023 17:31:22 +0100 Subject: [PATCH] Update to metamodel v12, release 1.13.0 --- README.md | 4 +++ src/contributors.html.j2 | 2 +- src/frontpage.html.j2 | 6 ++-- src/globals.j2 | 5 +++ src/macros.html.j2 | 7 ++--- src/projects.html.j2 | 2 +- src/questions/01-data-summary.html.j2 | 26 +++++++++------ src/questions/02-1-findable.html.j2 | 4 +-- src/questions/02-2-accessible.html.j2 | 40 +++++++++++------------- src/questions/02-3-interoperable.html.j2 | 4 +-- src/questions/06-other-issues.html.j2 | 2 +- src/style.css | 2 +- template.json | 6 ++-- 13 files changed, 59 insertions(+), 51 deletions(-) diff --git a/README.md b/README.md index 56ede8a..26177f9 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/src/contributors.html.j2 b/src/contributors.html.j2 index 6017c2c..1fd71d9 100644 --- a/src/contributors.html.j2 +++ b/src/contributors.html.j2 @@ -46,7 +46,7 @@
{% if contributor.roles|length == 0 %}Role{% else %}Roles{% endif %}: {% for role in contributor.roles %}{{ role }}{% if not loop.last %}, {% endif %}{% endfor %} {%- endif %} {%- if contributor.affiliation %} -
Affiliation: {{ macros.integrationValue(contributor.affiliation, uuids.contributorAffiliationQUuid) }} +
Affiliation: {{ macros.integrationValue(contributor.affiliation) }} {%- endif %} {% endfor %} diff --git a/src/frontpage.html.j2 b/src/frontpage.html.j2 index 3422408..02bd3a0 100644 --- a/src/frontpage.html.j2 +++ b/src/frontpage.html.j2 @@ -44,7 +44,7 @@
{{ macros.formatOrcid(contributorOrcid) }} {%- endif -%} {%- if contributorAffiliationReply %} -
{{ macros.integrationValue(contributorAffiliationReply, uuids.contributorAffiliationQUuid) }} +
{{ macros.integrationValue(contributorAffiliationReply) }} {%- endif -%} {%- endfor -%} @@ -76,8 +76,8 @@
Generated on
{{ dc.doc.created_at|datetime_format("%d %b %Y") }}
-

- Data Management Plan created in Data Stewardship Wizard «ds-wizard.org» +

+ Data Management Plan created in {{ globals.fullName }} «{{ globals.link }}»

diff --git a/src/globals.j2 b/src/globals.j2 index 2713139..578a9fc 100644 --- a/src/globals.j2 +++ b/src/globals.j2 @@ -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 -%} diff --git a/src/macros.html.j2 b/src/macros.html.j2 index ffc1aa5..07f163c 100644 --- a/src/macros.html.j2 +++ b/src/macros.html.j2 @@ -18,12 +18,9 @@  {{ orcid }} {%- 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) -%} - {{ reply.value.value.value|markdown }} + {{ reply.value.value.value|markdown }} {%- elif reply %} {{ reply.value.value.value }} {%- endif -%} diff --git a/src/projects.html.j2 b/src/projects.html.j2 index 34c3dc0..1a2b783 100644 --- a/src/projects.html.j2 +++ b/src/projects.html.j2 @@ -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 %} -
  • {{ 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 %}
  • +
  • {{ 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 %}
  • {%- endfor %} {%- else -%} diff --git a/src/questions/01-data-summary.html.j2 b/src/questions/01-data-summary.html.j2 index 6b4ef02..794cfb1 100644 --- a/src/questions/01-data-summary.html.j2 +++ b/src/questions/01-data-summary.html.j2 @@ -159,13 +159,15 @@ {%- set refDataWhere = repliesMap[[refDataPrefix, uuids.refDataWhereQUuid]|reply_path]|reply_str_value -%}
  • {# identification #} - {{ macros.integrationValue(refDataNameReply, uuids.refDataNameQUuid) }} +
    {{ macros.integrationValue(refDataNameReply) }}
    {%- if refDataWhere -%} +

    {%- if refDataWhere.startswith("http://") or refDataWhere.startswith("https://") or refDataWhere.startswith("ftp://") %} - ({{ refDataWhere }}) + It is available via: {{ refDataWhere }}. {%- else %} - ({{ refDataWhere }}) + It is available via: {{ refDataWhere }}. {%- endif -%} +

    {%- endif -%} {# version #} {%- set refDataVersionedPath = [refDataUsedPrefix, uuids.refDataVersionedQUuid]|reply_path -%} @@ -204,13 +206,15 @@ {%- set nrefDataWhere = repliesMap[[nrefDataPrefix, uuids.nrefDataWhereQUuid]|reply_path]|reply_str_value -%}
  • {# identification #} - {{ macros.integrationValue(nrefDataNameReply, uuids.nrefDataNameQUuid) }} +
    {{ macros.integrationValue(nrefDataNameReply) }}
    {%- if nrefDataWhere -%} +

    {%- if nrefDataWhere.startswith("http://") or nrefDataWhere.startswith("https://") or nrefDataWhere.startswith("ftp://") %} - ({{ nrefDataWhere }}) + It is available via: {{ nrefDataWhere }}. {%- else %} - ({{ nrefDataWhere }}) + It is available via: {{ nrefDataWhere }}. {%- endif -%} +

    {%- endif -%} {# version #} {%- set refDataVersionedPath = [refDataUsedPrefix, uuids.refDataVersionedQUuid]|reply_path -%} @@ -256,13 +260,15 @@ {%- set nrefDataWhere = repliesMap[[nrefDataPrefix, uuids.nrefDataWhereQUuid]|reply_path]|reply_str_value -%}
  • {# identification #} - {{ macros.integrationValue(nrefDataNameReply, uuids.nrefDataNameQUuid) }} +
    {{ macros.integrationValue(nrefDataNameReply) }}
    {%- if nrefDataWhere -%} +

    {%- if nrefDataWhere.startswith("http://") or nrefDataWhere.startswith("https://") or nrefDataWhere.startswith("ftp://") %} - ({{ nrefDataWhere }}) + It is available via: {{ nrefDataWhere }}. {%- else %} - ({{ nrefDataWhere }}) + It is available via: {{ nrefDataWhere }}. {%- endif -%} +

    {%- endif -%} {# data access #} {%- set nrefDataAccessPath = [nrefDataUsedPrefix, uuids.nrefDataAccessQUuid]|reply_path -%} @@ -309,7 +315,7 @@ {%- set formatsVolumeAUuid = repliesMap[formatsVolumePath]|reply_str_value -%}
  • {# identification #} - {{ macros.integrationValue(formatNameReply, uuids.formatsNameQUuid) }} +
    {{ macros.integrationValue(formatNameReply) }}
    {%- if formatsIsStandardAUuid or formatsIsLTSuitableAUuid or formatsVolumeAUuid -%}

    {# standard? #} diff --git a/src/questions/02-1-findable.html.j2 b/src/questions/02-1-findable.html.j2 index 59618bc..d7838c6 100644 --- a/src/questions/02-1-findable.html.j2 +++ b/src/questions/02-1-findable.html.j2 @@ -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 #} @@ -138,7 +138,7 @@

    There are the following 'Minimal Metadata About ...' (MIA...) standards for our experiments:

    diff --git a/src/questions/02-2-accessible.html.j2 b/src/questions/02-2-accessible.html.j2 index cacba68..91dd6d2 100644 --- a/src/questions/02-2-accessible.html.j2 +++ b/src/questions/02-2-accessible.html.j2 @@ -173,16 +173,15 @@ {%- set refDataConditionsAUuid = repliesMap[refDataConditionsPath]|reply_str_value -%} {%- if refDataConditionsAUuid -%}
  • - {{ macros.integrationValue(refDataNameReply, uuids.refDataNameQUuid) }} - +
    {{ macros.integrationValue(refDataNameReply) }}
    {% 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 -%}
  • {%- endif -%} @@ -194,16 +193,15 @@ {%- set nrefDataConditionsAUuid = repliesMap[nrefDataConditionsPath]|reply_str_value -%} {%- if nrefDataConditionsAUuid -%}
  • - {{ macros.integrationValue(nrefDataNameReply, uuids.nrefDataNameQUuid) }} - +
    {{ macros.integrationValue(nrefDataNameReply) }}
    {% 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 -%}
  • {%- endif -%} @@ -223,16 +221,15 @@ {%- set refDataConditionsAUuid = repliesMap[refDataConditionsPath]|reply_str_value -%} {%- if refDataConditionsAUuid -%}
  • - {{ macros.integrationValue(refDataNameReply, uuids.refDataNameQUuid) }} - +
    {{ macros.integrationValue(refDataNameReply) }}
    {% 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 -%}
  • {%- endif -%} @@ -246,16 +243,15 @@ {%- set nrefDataConditionsAUuid = repliesMap[nrefDataConditionsPath]|reply_str_value -%} {%- if nrefDataConditionsAUuid -%}
  • - {{ macros.integrationValue(nrefDataNameReply, uuids.nrefDataNameQUuid) }} - +
    {{ macros.integrationValue(nrefDataNameReply) }}
    {% 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 -%}
  • {%- endif -%} @@ -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 #} @@ -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: {{ licenseRestrictLink }}. + More infomation about the restrictions can be found here: {{ licenseRestrictLink }}. {% endif %} {%- endif -%} diff --git a/src/questions/02-3-interoperable.html.j2 b/src/questions/02-3-interoperable.html.j2 index 7465a33..f843783 100644 --- a/src/questions/02-3-interoperable.html.j2 +++ b/src/questions/02-3-interoperable.html.j2 @@ -16,7 +16,7 @@ {%- set formatsVolumeAUuid = repliesMap[formatsVolumePath]|reply_str_value -%}
  • {# identification #} - {{ macros.integrationValue(formatNameReply, uuids.formatsNameQUuid) }} +
    {{ macros.integrationValue(formatNameReply) }}
    {%- if formatsIsStandardAUuid or formatsIsLTSuitableAUuid or formatsVolumeAUuid -%}

    {# standard? #} @@ -58,7 +58,7 @@ {%- set whatUsingUrlPath = [whatUsingPath, standardItem, uuids.whatUsingUrlQUuid]|reply_path -%} {%- set whatUsingUrl = repliesMap[whatUsingUrlPath]|reply_str_value -%}

  • - {{ macros.integrationValue(whatUsingNameReply, uuids.whatUsingNameQUuid) }} +
    {{ macros.integrationValue(whatUsingNameReply) }}
    {% if whatUsingUrl %}({{ whatUsingUrl }}){% endif %}
  • {%- endfor -%} diff --git a/src/questions/06-other-issues.html.j2 b/src/questions/06-other-issues.html.j2 index 904406e..b7e98a9 100644 --- a/src/questions/06-other-issues.html.j2 +++ b/src/questions/06-other-issues.html.j2 @@ -1,6 +1,6 @@
    {%- set project_url = dc.config.client_url ~ "/projects/" ~ dc.qtn.uuid -%} -

    We use the Data Stewardship Wizard with its {{ dc.pkg.name }} (ID: {{ dc.pkg.organization_id }}:{{ dc.pkg.km_id }}:{{ dc.pkg.version }}) knowledge model to make our DMP. More specifically, we use the {{ dc.config.client_url }} DSW instance where the project has direct URL: {{ project_url }}.

    +

    We use the {{ globals.fullName }} with its {{ dc.pkg.name }} (ID: {{ dc.pkg.organization_id }}:{{ dc.pkg.km_id }}:{{ dc.pkg.version }}) knowledge model to make our DMP. More specifically, we use the {{ dc.config.client_url }} {{ globals.name }} instance where the project has direct URL: {{ project_url }}.

    diff --git a/src/style.css b/src/style.css index 0c1c5a5..16e4d95 100644 --- a/src/style.css +++ b/src/style.css @@ -104,7 +104,7 @@ header .contact-orcid { white-space: nowrap; } -header .dsw { +header .note { margin-top: 2cm; text-align: center; font-size: 10pt; diff --git a/template.json b/template.json index f8c7823..6a8bd92 100644 --- a/template.json +++ b/template.json @@ -1,11 +1,11 @@ { "templateId": "h2020-dmp", "organizationId": "dsw", - "version": "1.12.2", + "version": "1.13.0", "name": "Horizon 2020 DMP", "description": "Data Management Plan according to the H2020 template", "license": "Apache-2.0", - "metamodelVersion": 11, + "metamodelVersion": 12, "allowedPackages": [ { "orgId": "dsw", @@ -145,7 +145,7 @@ } ], "_tdk": { - "version": "3.20.0", + "version": "4.1.0", "readmeFile": "README.md", "files": [ "src/*",