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 subworfklow + schema for references #7412

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

maxulysse
Copy link
Member

PR checklist

Closes #XXX

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added a new tool - have you followed the module conventions in the contribution docs
  • If necessary, include test data in your PR.
  • Remove all TODO statements.
  • Emit the versions.yml file.
  • Follow the naming conventions.
  • Follow the parameters requirements.
  • Follow the input/output options guidelines.
  • Add a resource label
  • Use BioConda and BioContainers if possible to fulfil software requirements.
  • Ensure that the test works with either Docker / Singularity. Conda CI tests can be quite flaky:
    • For modules:
      • nf-core modules test <MODULE> --profile docker
      • nf-core modules test <MODULE> --profile singularity
      • nf-core modules test <MODULE> --profile conda
    • For subworkflows:
      • nf-core subworkflows test <SUBWORKFLOW> --profile docker
      • nf-core subworkflows test <SUBWORKFLOW> --profile singularity
      • nf-core subworkflows test <SUBWORKFLOW> --profile conda

Comment on lines +1 to +21
// JUST TO TEST THE SUBWORKFLOW

workflow UTILS_REFERENCES {
take:
references
param_file
param_value
attribute_file
attribute_value
basepath

main:
// GIVING up writing a test for the functions, so writing a subworkflow to test it
references_file = extract_references_file(references, param_file, attribute_file, basepath)
references_value = extract_references_value(references, param_value, attribute_value)

emit:
references_file
references_value
}

Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
// JUST TO TEST THE SUBWORKFLOW
workflow UTILS_REFERENCES {
take:
references
param_file
param_value
attribute_file
attribute_value
basepath
main:
// GIVING up writing a test for the functions, so writing a subworkflow to test it
references_file = extract_references_file(references, param_file, attribute_file, basepath)
references_value = extract_references_value(references, param_value, attribute_value)
emit:
references_file
references_value
}

This is totally useless, but that was the only way I could find to actually test the functions

- pipeline
- references
components: []
input: []
Copy link
Member

Choose a reason for hiding this comment

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

You need to sort this out, yes?

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually no.
I just added a workflow because I couldn't properly tests the functions.
The actual workflow is never used, I'm just using the functions and the assets.

@pinin4fjords
Copy link
Member

Why is this a subworkflow and not a module?

@maxulysse
Copy link
Member Author

Why is this a subworkflow and not a module?

because it has no process, hence it cannot be a module

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants