You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! As always, thank you for the excellent work on this tool. It's really taken Nextflow development to the next level (😝).
However, I'd like to suggest a change to the config. Currently, it supports a boolean option, withTrace, to indicate whether to perform tracing. It seems that the option was added in response to #9 to support situations when procps is not available. When set to true, nf-test sets --with-trace trace.csv on the Nextflow CLI command.
This causes two issues, one is that it overrides the trace settings in the project nextflow.config and test nextflow.config (i.e., the one pointed to by nf-test.config). So even if the trace file is expected to have a different name or location, since CLI options have the highest priority the trace is saved as trace.csv (which is actually a misnomer since it's tab-separated by default). In my case, I have custom logic in an onComplete closure that expects a specific filename and structure for the trace file as defined in nextflow.config, which throws an error when the file isn't found (although the tests still pass since a failing event closure doesn't cause the workflow to fail).
Relatedly, the withTrace option is redundant since you can put the same config in the test-specific nextflow.config. When #9 was raised, I think this would have been a more natural solution. Although, I believe that the current behavior was designed so that nf-test knows where to find and how to parse the trace file so that workflow.trace works.
My suggestion is to deprecate this option in favor of recommending users use the test folder nextflow.config to configure tracing for tests differently from production runs. And rather than hardcoding the trace file name and location, let users specify the name to look for in nf-test.config and/or allow per test specification. Then, throw an error if a test tries to access workflow.trace when no trace file was found.
For my onComplete closure testing problem, I know of two workarounds:
Disable the onComplete closure by setting workflow.onComplete = {}. This kind of works, but makes it impossible to test aspects of the onComplete behavior.
Set withTrace = false in nf-test.config. This allows the included nextflow.config from the project to control tracing, which then allows the onComplete closure to run successfully. However, this disables workflow.trace, which makes other kinds of testing more challenging.
The text was updated successfully, but these errors were encountered:
Hello! As always, thank you for the excellent work on this tool. It's really taken Nextflow development to the next level (😝).
However, I'd like to suggest a change to the config. Currently, it supports a boolean option,
withTrace
, to indicate whether to perform tracing. It seems that the option was added in response to #9 to support situations whenprocps
is not available. When set totrue
,nf-test
sets--with-trace trace.csv
on the Nextflow CLI command.This causes two issues, one is that it overrides the trace settings in the project
nextflow.config
and testnextflow.config
(i.e., the one pointed to bynf-test.config
). So even if the trace file is expected to have a different name or location, since CLI options have the highest priority the trace is saved astrace.csv
(which is actually a misnomer since it's tab-separated by default). In my case, I have custom logic in anonComplete
closure that expects a specific filename and structure for the trace file as defined innextflow.config
, which throws an error when the file isn't found (although the tests still pass since a failing event closure doesn't cause the workflow to fail).Relatedly, the
withTrace
option is redundant since you can put the same config in the test-specificnextflow.config
. When #9 was raised, I think this would have been a more natural solution. Although, I believe that the current behavior was designed so thatnf-test
knows where to find and how to parse the trace file so thatworkflow.trace
works.My suggestion is to deprecate this option in favor of recommending users use the test folder
nextflow.config
to configure tracing for tests differently from production runs. And rather than hardcoding the trace file name and location, let users specify the name to look for innf-test.config
and/or allow per test specification. Then, throw an error if a test tries to accessworkflow.trace
when no trace file was found.For my
onComplete
closure testing problem, I know of two workarounds:onComplete
closure by settingworkflow.onComplete = {}
. This kind of works, but makes it impossible to test aspects of theonComplete
behavior.withTrace = false
innf-test.config
. This allows the includednextflow.config
from the project to control tracing, which then allows theonComplete
closure to run successfully. However, this disablesworkflow.trace
, which makes other kinds of testing more challenging.The text was updated successfully, but these errors were encountered: