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

Add gantt plot nf-test #13

Merged
merged 12 commits into from
Nov 30, 2023
44 changes: 44 additions & 0 deletions modules/local/plot_run_gantt/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
nextflow_process {

name "Test Process PLOT_RUN_GANTT"
script "../main.nf"
process "PLOT_RUN_GANTT"
config "./nextflow.config"

tag "modules"
tag "modules_local"
tag "plot_run_gantt"

test("Should run without failures") {

setup {
run("SEQERA_RUNS_DUMP") {
script "../../seqera_runs_dump/main.nf"
process {
"""
input[0] = ['id': '4Bi5xBK6E2Nbhj', 'workspace': 'community/showcase']
input[1] = "https://api.tower.nf"
"""
}
}
}

when {
process {

"""
input[0] = SEQERA_RUNS_DUMP.out.run_dump
"""
}
}

then {
assertAll(
{ assert path(process.out.html.get(0).get(1)).getText().contains("GANTT plot for run: 4Bi5xBK6E2Nbhj") },
{ assert process.success }
)
}

}

}
2 changes: 2 additions & 0 deletions modules/local/plot_run_gantt/tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
process { withName: 'SEQERA_RUNS_DUMP' { container = 'public.ecr.aws/seqera-labs/wave/containers:tower-cli-0.9.0--2cb0f2e9d85d026b' } }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this file? Because I added a separate container.config? Maybe we need to put this in the process for now and we can move it later.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason the global container config wasn't pulled into the the tests. I tried using projectDir on the config line where you included it, but that didn't do the trick. So I put it in the 'figure out later' box.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. I'll have a play locally. Thanks!

process { withName: 'PLOT_RUN_GANTT' { container = 'quay.io/seqeralabs/nf-aggregate:click-8.0.1_pandas-1.1.5_plotly_express-0.4.1_typing-3.10.0.0--342dabfe6548a051' } }
2 changes: 2 additions & 0 deletions modules/local/plot_run_gantt/tests/tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
plot_run_gantt:
- modules/local/plot_run_gantt/**