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

allow specifying only one container #2121

Merged
merged 3 commits into from
Dec 12, 2022
Merged

allow specifying only one container #2121

merged 3 commits into from
Dec 12, 2022

Conversation

mirpedrol
Copy link
Member

Close #2116

PR checklist

  • This comment contains a description of changes (with reason)
  • CHANGELOG.md is updated
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated

Copy link
Contributor

@mashehu mashehu left a comment

Choose a reason for hiding this comment

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

Should we have a test for this?

@mirpedrol
Copy link
Member Author

mirpedrol commented Dec 9, 2022

Should we have a test for this?

Not sure if we need a test for that, the issue was mainly that I didn't have into account that someone can specify a container in a different syntax than the nf-core modules template 😓

@codecov
Copy link

codecov bot commented Dec 9, 2022

Codecov Report

Merging #2121 (a85b896) into dev (67e3702) will decrease coverage by 0.03%.
The diff coverage is 57.14%.

@@            Coverage Diff             @@
##              dev    #2121      +/-   ##
==========================================
- Coverage   71.43%   71.39%   -0.04%     
==========================================
  Files          77       77              
  Lines        8350     8356       +6     
==========================================
+ Hits         5965     5966       +1     
- Misses       2385     2390       +5     
Impacted Files Coverage Δ
nf_core/modules/lint/main_nf.py 65.72% <57.14%> (-0.47%) ⬇️
nf_core/modules/test_yml_builder.py 51.55% <0.00%> (-0.45%) ⬇️
nf_core/utils.py 82.47% <0.00%> (-0.19%) ⬇️
nf_core/components/components_create.py 75.00% <0.00%> (+0.23%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@awgymer
Copy link
Contributor

awgymer commented Dec 9, 2022

LGTM but have any of us actually tested it on a previously non-compliant but acceptable module?

@mirpedrol
Copy link
Member Author

LGTM but have any of us actually tested it on a previously non-compliant but acceptable module?

I tested one of the modules that only has one container, container "<URL>". This will pass the linting as long as there are <= 2 double quotes. It checks separately the lines that contain docker and singularity containers. If you can think of other formats, we should also test it :)

@awgymer
Copy link
Contributor

awgymer commented Dec 12, 2022

Only thing I can think of is what happens if the image names are really short and the docker/singularity are on the same line? Actually I think in that case we end up assuming there is only one container per-line and that the line starts with the url 😕
At the least we probably need to document that style if it's (semi?) required.

@maxulysse
Copy link
Member

you can check the deepvariant modules or the gatk4/cnnscorevariants that use only one container and no conda is available

@mirpedrol
Copy link
Member Author

you can check the deepvariant modules or the gatk4/cnnscorevariants

Works for this type of modules 👍

what happens if the image names are really short and the docker/singularity are on the same line?

In that case, it will check the number of double quotes, but only try to connect to the first container it finds. If a module is created with nf-core, even if the containers are short, they will be in two separate lines. For local modules, I will add a warning checking that.

@mirpedrol mirpedrol merged commit bc44d2e into nf-core:dev Dec 12, 2022
@mirpedrol mirpedrol deleted the dev branch December 12, 2022 15:35
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.

4 participants