From 6aefbac5d394b656ed989afbbb831dabbf08c05f Mon Sep 17 00:00:00 2001 From: jorgee Date: Thu, 19 Sep 2024 11:42:56 +0200 Subject: [PATCH 1/4] Including docsURL iconURL maintainer and organisation properties to manifest Signed-off-by: jorgee --- .../groovy/nextflow/config/Manifest.groovy | 27 ++++++++++++++++++- .../nextflow/config/ManifestTest.groovy | 15 +++++++++-- 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/modules/nextflow/src/main/groovy/nextflow/config/Manifest.groovy b/modules/nextflow/src/main/groovy/nextflow/config/Manifest.groovy index ad06fa0a49..e8a9868aa2 100644 --- a/modules/nextflow/src/main/groovy/nextflow/config/Manifest.groovy +++ b/modules/nextflow/src/main/groovy/nextflow/config/Manifest.groovy @@ -98,8 +98,28 @@ class Manifest { target.doi } + String getDocsUrl() { + target.docsUrl + } + + String getIconUrl(){ + target.iconUrl + } + + String getMaintainer(){ + target.maintainer + } + + String getOrganisation(){ + target.organisation + } + + String getLicense(){ + target.license + } + Map toMap() { - final result = new HashMap(10) + final result = new HashMap(15) result.author = getAuthor() result.defaultBranch = getDefaultBranch() result.description = getDescription() @@ -109,6 +129,11 @@ class Manifest { result.version = getVersion() result.nextflowVersion = getNextflowVersion() result.doi = getDoi() + result.docsUrl = getDocsUrl() + result.iconUrl = getIconUrl() + result.maintainer = getMaintainer() + result.organisation = getOrganisation() + result.license = getLicense() return result } } diff --git a/modules/nextflow/src/test/groovy/nextflow/config/ManifestTest.groovy b/modules/nextflow/src/test/groovy/nextflow/config/ManifestTest.groovy index d189b28f28..ef8e7c0700 100644 --- a/modules/nextflow/src/test/groovy/nextflow/config/ManifestTest.groovy +++ b/modules/nextflow/src/test/groovy/nextflow/config/ManifestTest.groovy @@ -26,8 +26,9 @@ class ManifestTest extends Specification { def 'should check manifest object' () { given: - def MAN = [author: 'pablo', nextflowVersion: '1.2.3', name: 'foo'] - + def MAN = [author: 'pablo', nextflowVersion: '1.2.3', name: 'foo', + maintainer: 'john', organisation: 'My Organisation', iconUrl: 'icon.png', + docsUrl: 'https://docs.io', license: 'Apache v2'] when: def manifest = new Manifest(MAN) then: @@ -35,6 +36,11 @@ class ManifestTest extends Specification { author == 'pablo' nextflowVersion == '1.2.3' name == 'foo' + maintainer == 'john' + organisation == 'My Organisation' + iconUrl == 'icon.png' + docsUrl == 'https://docs.io' + license == 'Apache v2' } } @@ -55,6 +61,11 @@ class ManifestTest extends Specification { nextflowVersion == null version == null name == null + maintainer == null + docsUrl == null + organisation == null + iconUrl == null + license == null } } From 9f9ef3fdd1239c696a879bfc10475cc4260b5536 Mon Sep 17 00:00:00 2001 From: jorgee Date: Thu, 19 Sep 2024 12:22:27 +0200 Subject: [PATCH 2/4] Include new manifest fields in the documentation Signed-off-by: jorgee --- docs/config.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/config.md b/docs/config.md index d88aba4269..060e680875 100644 --- a/docs/config.md +++ b/docs/config.md @@ -1237,15 +1237,27 @@ The following settings are available: `manifest.description` : Free text describing the workflow project. +`manifest.docsUrl` +: Project documentation URL. + `manifest.doi` : Project related publication DOI identifier. `manifest.homePage` : Project home page URL. +`manifest.iconUrl` +: Project related icon location (Relative path or URL). + +`manifest.license` +: Workflow license. + `manifest.mainScript` : Project main script (default: `main.nf`). +`manifest.maintainer` +: Project maintainer name (use a comma to separate multiple names). + `manifest.name` : Project short name. @@ -1262,6 +1274,9 @@ The following settings are available: manifest.nextflowVersion = '!>=1.2' // with ! prefix, stop execution if current version does not match required version. ``` +`manifest.organisation` +: Project organisation + `manifest.recurseSubmodules` : Pull submodules recursively from the Git repository. From 7e4df25a5c03c9eb8b74d397aa0fa33770620c95 Mon Sep 17 00:00:00 2001 From: Jorge Ejarque Date: Thu, 19 Sep 2024 15:01:51 +0200 Subject: [PATCH 3/4] Update docs/config.md Co-authored-by: Ben Sherman Signed-off-by: Jorge Ejarque --- docs/config.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/config.md b/docs/config.md index 060e680875..bc2a4e7329 100644 --- a/docs/config.md +++ b/docs/config.md @@ -1250,7 +1250,7 @@ The following settings are available: : Project related icon location (Relative path or URL). `manifest.license` -: Workflow license. +: Project license. `manifest.mainScript` : Project main script (default: `main.nf`). From bcc652473e6df7e61c859bd14b8d82595a652a5d Mon Sep 17 00:00:00 2001 From: jorgee Date: Thu, 19 Sep 2024 15:43:15 +0200 Subject: [PATCH 4/4] iconURL field changed to icon Signed-off-by: jorgee --- docs/config.md | 2 +- .../src/main/groovy/nextflow/config/Manifest.groovy | 6 +++--- .../src/test/groovy/nextflow/config/ManifestTest.groovy | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/config.md b/docs/config.md index bc2a4e7329..55de60428a 100644 --- a/docs/config.md +++ b/docs/config.md @@ -1246,7 +1246,7 @@ The following settings are available: `manifest.homePage` : Project home page URL. -`manifest.iconUrl` +`manifest.icon` : Project related icon location (Relative path or URL). `manifest.license` diff --git a/modules/nextflow/src/main/groovy/nextflow/config/Manifest.groovy b/modules/nextflow/src/main/groovy/nextflow/config/Manifest.groovy index e8a9868aa2..f8592294e2 100644 --- a/modules/nextflow/src/main/groovy/nextflow/config/Manifest.groovy +++ b/modules/nextflow/src/main/groovy/nextflow/config/Manifest.groovy @@ -102,8 +102,8 @@ class Manifest { target.docsUrl } - String getIconUrl(){ - target.iconUrl + String getIcon(){ + target.icon } String getMaintainer(){ @@ -130,7 +130,7 @@ class Manifest { result.nextflowVersion = getNextflowVersion() result.doi = getDoi() result.docsUrl = getDocsUrl() - result.iconUrl = getIconUrl() + result.icon = getIcon() result.maintainer = getMaintainer() result.organisation = getOrganisation() result.license = getLicense() diff --git a/modules/nextflow/src/test/groovy/nextflow/config/ManifestTest.groovy b/modules/nextflow/src/test/groovy/nextflow/config/ManifestTest.groovy index ef8e7c0700..8fb398590b 100644 --- a/modules/nextflow/src/test/groovy/nextflow/config/ManifestTest.groovy +++ b/modules/nextflow/src/test/groovy/nextflow/config/ManifestTest.groovy @@ -27,7 +27,7 @@ class ManifestTest extends Specification { given: def MAN = [author: 'pablo', nextflowVersion: '1.2.3', name: 'foo', - maintainer: 'john', organisation: 'My Organisation', iconUrl: 'icon.png', + maintainer: 'john', organisation: 'My Organisation', icon: 'icon.png', docsUrl: 'https://docs.io', license: 'Apache v2'] when: def manifest = new Manifest(MAN) @@ -38,7 +38,7 @@ class ManifestTest extends Specification { name == 'foo' maintainer == 'john' organisation == 'My Organisation' - iconUrl == 'icon.png' + icon == 'icon.png' docsUrl == 'https://docs.io' license == 'Apache v2' } @@ -64,7 +64,7 @@ class ManifestTest extends Specification { maintainer == null docsUrl == null organisation == null - iconUrl == null + icon == null license == null }