Skip to content
Draft
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
10 changes: 10 additions & 0 deletions modules/nf-core/dds/createproject/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
channels:
- conda-forge
- bioconda
dependencies:
- conda-forge::pip=25.3
- conda-forge::python=3.12.13
- pip:
- dds-cli==2.14.3
38 changes: 38 additions & 0 deletions modules/nf-core/dds/createproject/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
process DDS_CREATEPROJECT {
label 'process_single'

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ?
'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/73/7352a40103ce629fbc72986922a68e8f9cc35630b89ee836a0c03dfd676f2341/data':
'community.wave.seqera.io/library/pip_python_dds-cli:4a7daeb54b4c7a8c' }"

input:
val title
val description
val pi
path token_file

output:
path 'output.log', emit: log
tuple val("${task.process}"), val('dds'), eval("dds --version | sed 's/.*version //'"), topic: versions, emit: versions_dds

when:
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''

"""
# dds requires 600 permissions on the token file; copy first since Nextflow stages inputs as symlinks
cp $token_file token.conf
chmod 600 token.conf
dds --token-path token.conf project create --title "$title" --description "$description" --principal-investigator "$pi" > output.log
"""

stub:
def args = task.ext.args ?: ''

"""
touch output.log
"""
}
90 changes: 90 additions & 0 deletions modules/nf-core/dds/createproject/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json
name: "dds_createproject"
description: This module is used to create a project on the SciLifeLab Data
Delivery System (DDS).
keywords:
- DDS
- SciLifeLab
- data delivery
tools:
- "dds":
description: "The Data Delivery System (DDS) is a cloud-based system for the delivery
of data from SciLifeLab platforms to their users."
homepage: "https://delivery.scilifelab.se"
documentation: "https://scilifelabdatacentre.github.io/dds_cli/"
tool_dev_url: "https://github.com/ScilifelabDataCentre/dds_cli"
licence:
- "MIT"
identifier: ""
input:
- title:
type: string
description: The title of the project.
- description:
type: string
description: A description of the project.
- pi:
type: string
description: Email of the Principal Investigator.
- token_file:
type: file
description: Path to a DDS CLI token file (created via `dds auth`). Must be
readable by the pipeline user.
ontologies: []
output:
versions_dds:
- - ${task.process}:
type: string
description: The name of the process
- dds:
type: string
description: The name of the tool
- dds --version | sed 's/.*version //':
type: eval
description: The expression to obtain the version of the tool
log:
- output.log:
type: file
description: File containing the projectID of the project created.
ontologies: []
topics:
versions:
- - ${task.process}:
type: string
description: The name of the process
- dds:
type: string
description: The name of the tool
- dds --version | sed 's/.*version //':
type: eval
description: The expression to obtain the version of the tool
authors:
- "@annaasklof"
- "@mashehu"
maintainers:
- "@annaasklof"
containers:
docker:
linux/amd64:
name: community.wave.seqera.io/library/pip_python_dds-cli:4a7daeb54b4c7a8c
build_id: bd-4a7daeb54b4c7a8c_1
scan_id: sc-175817d0c023f7c1_1
linux/arm64:
name: community.wave.seqera.io/library/pip_python_dds-cli:ab6efd1ed8af3fea
build_id: bd-ab6efd1ed8af3fea_1
scan_id: sc-af3babfa6db44fcc_1
singularity:
linux/amd64:
name: oras://community.wave.seqera.io/library/pip_python_dds-cli:a1d1c0e2a13b5df4
build_id: bd-a1d1c0e2a13b5df4_1
https: https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/73/7352a40103ce629fbc72986922a68e8f9cc35630b89ee836a0c03dfd676f2341/data
linux/arm64:
name: oras://community.wave.seqera.io/library/pip_python_dds-cli:6f4fcdba4a36c4ed
build_id: bd-6f4fcdba4a36c4ed_1
https: https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/09/098a7aae2590da026a7b3f0e087492a2c10378a7f3e34f9dc8b80f9281555dd5/data
conda:
linux/amd64:
lock_file: modules/nf-core/dds/createproject/.conda-lock/linux_amd64-bd-4a7daeb54b4c7a8c_1.txt
linux/arm64:
lock_file: modules/nf-core/dds/createproject/.conda-lock/linux_arm64-bd-ab6efd1ed8af3fea_1.txt
34 changes: 34 additions & 0 deletions modules/nf-core/dds/createproject/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
nextflow_process {

name "Test Process DDS_CREATEPROJECT"
script "../main.nf"
process "DDS_CREATEPROJECT"

tag "modules"
tag "modules_nfcore"
tag "dds"
tag "dds/createproject"

test("dds/createproject - stub") {

options "-stub"

when {
process {
"""
input[0] = "Test title"
input[1] = "Test description"
input[2] = "test-pi@mail.com"
input[3] = file(params.modules_testdata_base_path + 'generic/txt/hello.txt')
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(sanitizeOutput(process.out)).match()}
)
}
}
}
23 changes: 23 additions & 0 deletions modules/nf-core/dds/createproject/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"dds/createproject - stub": {
"content": [
{
"log": [
"output.log:md5,d41d8cd98f00b204e9800998ecf8427e"
],
"versions_dds": [
[
"DDS_CREATEPROJECT",
"dds",
"2.14.3"
]
]
}
],
"timestamp": "2026-06-26T14:21:53.921262",
"meta": {
"nf-test": "0.9.5",
"nextflow": "26.04.4"
}
}
}
Loading