Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include additional fields to manifest #5314

Merged
merged 4 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.icon`
: Project related icon location (Relative path or URL).

`manifest.license`
: Project 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.

Expand All @@ -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.

Expand Down
27 changes: 26 additions & 1 deletion modules/nextflow/src/main/groovy/nextflow/config/Manifest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,28 @@ class Manifest {
target.doi
}

String getDocsUrl() {
target.docsUrl
}

String getIcon(){
target.icon
}

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()
Expand All @@ -109,6 +129,11 @@ class Manifest {
result.version = getVersion()
result.nextflowVersion = getNextflowVersion()
result.doi = getDoi()
result.docsUrl = getDocsUrl()
result.icon = getIcon()
result.maintainer = getMaintainer()
result.organisation = getOrganisation()
result.license = getLicense()
return result
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,21 @@ 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', icon: 'icon.png',
docsUrl: 'https://docs.io', license: 'Apache v2']
when:
def manifest = new Manifest(MAN)
then:
manifest.with {
author == 'pablo'
nextflowVersion == '1.2.3'
name == 'foo'
maintainer == 'john'
organisation == 'My Organisation'
icon == 'icon.png'
docsUrl == 'https://docs.io'
license == 'Apache v2'
}

}
Expand All @@ -55,6 +61,11 @@ class ManifestTest extends Specification {
nextflowVersion == null
version == null
name == null
maintainer == null
docsUrl == null
organisation == null
icon == null
license == null
}

}
Expand Down
Loading