-
Notifications
You must be signed in to change notification settings - Fork 417
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
Remove exit statements #982
Conversation
|
Asking a second review by @robsyme for sanity |
I think it is ready, but conda 😡 :
where does this come from now. Ahhhhhhhhhrgh |
That's conda, don't wish to much |
got one conda test to pass by changing nothing, maybe it depends to which runner it is submitted too? |
workflows/sarek.nf
Outdated
@@ -4,6 +4,7 @@ | |||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |||
*/ | |||
|
|||
import nextflow.Nextflow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it failed with missing nextflow.Nextflow before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this tests is expected to fail
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The import and qualification with nextflow.error
prefix are only necessary in Groovy classes pulled into the classpath via inclusion in the lib
directory. Inside nextflow files such as main.nf
, or workflows/sarek.nf
, the error
and exit
methods are always in scope, so we can remove the import
statement and change all occurrences of Nextflow.error
to error
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just made a bunch of edits. I tried to batch them up, but I am bad at computers and may have messed it up by including some of them as individual commits. It would be good to squash them before any merge or rebase to dev. Apologies for any extra email/notification noise I may have created in the process :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤯 I see, thank you for fixing it up ❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to have that part in a Nextflow script:
import nextflow.Nextflow
Amazing work!!! |
We don't need to `import nextflow.Nextflow` inside Nextflow scripts because the methods are already in scope
Hey @robsyme ! I just discussed with @subwaystation on how to apply this to other pipelines, and we noticed that there is yet another Line 53 in 9f3ff50
|
Also note that in Line 64 in 9f3ff50
log.info without an actual exit. Just so we don't miss a case.
|
well it appears we have discussed this on slack and my squirrel brain just forgot. For posterity: https://nfcore.slack.com/archives/C04UK9FMKN0/p1680084277233609?thread_ts=1680080487.840229&cid=C04UK9FMKN0 TL;DR: can leave as is or replace with |
Close #805
PR checklist
nf-core lint
).nextflow run . -profile test,docker --outdir <OUTDIR>
).docs/usage.md
is updated.docs/output.md
is updated.CHANGELOG.md
is updated.README.md
is updated (including new tool citations and authors/contributors).