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

Biocontainer api #1110

Merged
merged 9 commits into from
Jun 15, 2021
Merged

Biocontainer api #1110

merged 9 commits into from
Jun 15, 2021

Conversation

KevinMenden
Copy link
Contributor

Use the Biocontainers API instead of quay.io to get container tags for Docker and Singularity containers as suggested in #875

I have not implemented any questionary selection now, as you have suggested @ewels . Mainly because I think it would be good to have the most recent version as default, and allowing users to choose a container tag/version for both Docker and Singularity could mean they choose different builds. The linter should complain about this, or we could directly check within nf-core modules create, but easiest would be to just avoid this in the first place.

Wouldn't be too hard to add it in though so up for discussion I'd say :-)

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

Sorry, something went wrong.

Verified

This commit was signed with the committer’s verified signature.
KyleFromNVIDIA Kyle Edwards
@KevinMenden KevinMenden linked an issue Jun 15, 2021 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Jun 15, 2021

Codecov Report

Merging #1110 (3de0710) into dev (f18560d) will increase coverage by 0.07%.
The diff coverage is 81.48%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #1110      +/-   ##
==========================================
+ Coverage   72.31%   72.38%   +0.07%     
==========================================
  Files          36       36              
  Lines        4547     4552       +5     
==========================================
+ Hits         3288     3295       +7     
+ Misses       1259     1257       -2     
Impacted Files Coverage Δ
nf_core/modules/create.py 78.01% <71.42%> (+0.23%) ⬆️
nf_core/utils.py 83.83% <85.00%> (+0.68%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f18560d...3de0710. Read the comment docs.

Copy link
Member

@ewels ewels left a comment

Choose a reason for hiding this comment

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

Haven't tested it, but general code read-over looks good!

Co-authored-by: Phil Ewels <phil.ewels@scilifelab.se>
Copy link
Contributor

@ErikDanielsson ErikDanielsson left a comment

Choose a reason for hiding this comment

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

Looks good! Just found a few minor things.

continue
else:
singularity_image = img
return docker_image["image_name"], singularity_image["image_name"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we guaranteed by the API to at least get both one Docker and Singularity image tag? Since this might raise an error otherwise.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think if there the response is successful, then in theory, there should be at least one of both. And if one of them stays None then that's actually okay for the template. But yeah might be worth trying this out a little bit and make it a bit robuster ....

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes it should be fine, it either raises an error, returns the images or None, and None can be handled by nf-core modules create (will just print YOUR-TOOL-HERE in the main.nf file instead)

KevinMenden and others added 5 commits June 15, 2021 11:29
Co-authored-by: Erik Danielsson <53212377+ErikDanielsson@users.noreply.github.com>
Co-authored-by: Phil Ewels <phil.ewels@scilifelab.se>
@KevinMenden KevinMenden merged commit 201a249 into nf-core:dev Jun 15, 2021
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.

Use Biocontainers API for creating modules
3 participants