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

Update module template to support container registries #1991

Closed
wants to merge 19 commits into from

Conversation

edmundmiller
Copy link
Contributor

@edmundmiller edmundmiller commented Nov 2, 2022

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

Does the prep work for nf-core/modules#2291

@edmundmiller edmundmiller self-assigned this Nov 2, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Nov 2, 2022

Python linting (black) is failing

To keep the code consistent with lots of contributors, we run automated code consistency checks.
To fix this CI test, please run:

  • Install black: pip install black
  • Fix formatting errors in your pipeline: black .

Once you push these changes the test should pass, and you can hide this comment 👍

We highly recommend setting up Black in your code editor so that this formatting is done automatically on save. Ask about it on Slack for help!

Thanks again for your contribution!

@codecov
Copy link

codecov bot commented Nov 2, 2022

Codecov Report

Merging #1991 (984283e) into dev (6bf8f30) will increase coverage by 0.58%.
The diff coverage is 67.18%.

@@            Coverage Diff             @@
##              dev    #1991      +/-   ##
==========================================
+ Coverage   62.01%   62.59%   +0.58%     
==========================================
  Files          42       43       +1     
  Lines        4862     4898      +36     
==========================================
+ Hits         3015     3066      +51     
+ Misses       1847     1832      -15     
Impacted Files Coverage Δ
nf_core/modules/lint/main_nf.py 65.47% <63.79%> (+0.86%) ⬆️
nf_core/modules/lint/__init__.py 83.93% <100.00%> (+0.86%) ⬆️
nf_core/components/components_utils.py 32.20% <0.00%> (-22.35%) ⬇️
nf_core/lint_utils.py 77.77% <0.00%> (-8.89%) ⬇️
nf_core/launch.py 63.45% <0.00%> (-0.24%) ⬇️
nf_core/components/components_install.py 69.64% <0.00%> (ø)
nf_core/modules/modules_repo.py 79.51% <0.00%> (+1.29%) ⬆️
nf_core/subworkflows/install.py 22.50% <0.00%> (+7.68%) ⬆️
... and 1 more

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

Copy link
Member

@mahesh-panchal mahesh-panchal left a comment

Choose a reason for hiding this comment

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

Seems the JSON schema is also missing the new param.

nf_core/modules/bump_versions.py Outdated Show resolved Hide resolved
@drpatelh
Copy link
Member

drpatelh commented Nov 2, 2022

Think we need to iron out how we get nf-core download working with these new changes before this is merged. See Slack discussion here and feature request nextflow-io/nextflow#3340

edmundmiller and others added 17 commits November 2, 2022 08:48
This isn't testing the creation of a new module, it's just checking that
linting works in a new modules _repo_
Co-authored-by: mahesh-panchal <[email protected]>
nf_core/modules/lint/main_nf.py Outdated Show resolved Hide resolved
tests/test_modules.py Show resolved Hide resolved
singularity_image = all_singularity[k]["image"]
current_date = date
return docker_image["image_name"], singularity_image["image_name"]
return response.json()["tags"][0]["name"]
Copy link
Member

Choose a reason for hiding this comment

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

I tried with hla-la and I get an older version than for bioconda. Should we check if versions match and downgrade bioconda if they don't?

conda (params.enable_conda ? "bioconda::hla-la=1.0.3" : null)
def container_image = "hla-la:1.0.1--h1b026d1_5"
container [ params.container_registry ?: 'quay.io/biocontainers' , container_image ].join('/')

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can you manually check if there's a matching hla-la version? I was just lazy and hoped asking it for only one image gave you the latest 😬

I can check that myself.

Copy link
Contributor Author

@edmundmiller edmundmiller Nov 3, 2022

Choose a reason for hiding this comment

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

Okay there is a 1.0.3 version, the problem is it got pushed 4 months ago, but the 1.0.1 version with the _5 build got pushed 3 months ago.

IDK what that's about, or which one we'd want to choose in that case.
https://quay.io/repository/biocontainers/hla-la?tab=tags

Copy link
Member

Choose a reason for hiding this comment

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

Oh, I see that's an edge case. Then I guess we can let the user decide, but maybe still print a warning if the versions are different.

tests/modules/lint.py Show resolved Hide resolved
tests/modules/lint.py Outdated Show resolved Hide resolved
Co-authored-by: Júlia Mir Pedrol <[email protected]>
@mashehu
Copy link
Contributor

mashehu commented Jan 9, 2024

I think this is now implemented, please reopen @edmundmiller if that is not the case

@mashehu mashehu closed this Jan 9, 2024
@muffato muffato deleted the container_registry branch September 7, 2024 22:32
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.

5 participants