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

feat: add a modules mulled command #1519

Merged
merged 8 commits into from
Apr 21, 2022
Merged

feat: add a modules mulled command #1519

merged 8 commits into from
Apr 21, 2022

Conversation

Midnighter
Copy link
Contributor

Add a command nf-core modules mulled that can generate image names from given tool specifications. See the discussion at https://nfcore.slack.com/archives/C01LNCGJBMH/p1649431242727599

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

@codecov
Copy link

codecov bot commented Apr 20, 2022

Codecov Report

Merging #1519 (893fc9a) into dev (faf4716) will increase coverage by 0.02%.
The diff coverage is 78.57%.

@@            Coverage Diff             @@
##              dev    #1519      +/-   ##
==========================================
+ Coverage   64.91%   64.94%   +0.02%     
==========================================
  Files          52       53       +1     
  Lines        6063     6105      +42     
==========================================
+ Hits         3936     3965      +29     
- Misses       2127     2140      +13     
Impacted Files Coverage Δ
nf_core/__main__.py 51.40% <40.00%> (-0.28%) ⬇️
nf_core/modules/mulled.py 90.32% <90.32%> (ø)
nf_core/modules/__init__.py 100.00% <100.00%> (ø)
nf_core/modules/create.py 79.27% <0.00%> (-1.04%) ⬇️
nf_core/utils.py 83.00% <0.00%> (-0.50%) ⬇️

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 faf4716...893fc9a. Read the comment docs.

@Midnighter
Copy link
Contributor Author

I don't think that the failing pipeline lint test is my fault.

Copy link
Member

@JoseEspinosa JoseEspinosa left a comment

Choose a reason for hiding this comment

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

Very nice @Midnighter!
My only concern is that the hash of the mulled container is generated even if the container is not yet available. I am not aware that this could be checked using the Biocontainers API so maybe we could make a get request to the singularity registry and if the status code response is not 200 then print a warning? Or maybe we can just print always a warning that the hash is generated even if the image is not yet available?

@Midnighter
Copy link
Contributor Author

My only concern is that the hash of the mulled container is generated even if the container is not yet available. I am not aware that this could be checked using the Biocontainers API so maybe we could make a get request to the singularity registry and if the status code response is not 200 then print a warning? Or maybe we can just print always a warning that the hash is generated even if the image is not yet available?

That's a fair point. I've been struggling with this as well. My solution would have been to write in the docs that you should use the mulled-search to find an image but if you have an entry in the hash.tsv, you can use this tool.

@JoseEspinosa
Copy link
Member

Fair enough 😃 let's see what others think

@Midnighter Midnighter requested a review from JoseEspinosa April 21, 2022 14:31
@Midnighter
Copy link
Contributor Author

Please take another look. I'm now polling quay.io for the existence of the image.

Copy link
Member

@JoseEspinosa JoseEspinosa left a comment

Choose a reason for hiding this comment

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

Just made a small suggestion, it looks great to me now! Thanks @Midnighter 🚀

nf_core/__main__.py Outdated Show resolved Hide resolved
@Midnighter Midnighter merged commit 6052563 into dev Apr 21, 2022
@Midnighter Midnighter deleted the feat-mulled branch April 21, 2022 18:38
@jfy133
Copy link
Member

jfy133 commented Apr 22, 2022

Late to the game (sorry have a big backlog) but I think this would be really useful as I had this issue exactly yesterday trying to find something.

Only comments would be:

  1. I would expect someone would argue that this is not a nf-core specific tool, more towards biocontainers, so someone may ask to make it standalone
  2. I would say mulled as a subcommand alone is rather uninformative. Make biocontainers-search-mulled or something would be better (also I would say making the name longer would make it sort of clearer it's less nf-core specific)

@Midnighter
Copy link
Contributor Author

  1. Integrating it into the tools was an explicit wish by @ewels and @JoseEspinosa, I don't care myself.
  2. I don't have strong feelings regarding the command name, however, I would not name it search because it doesn't search anything. It generates the name by hashing the inputs and then verifies that this name exists.

@JoseEspinosa
Copy link
Member

Here is the link to the discussion we had for completeness: https://nfcore.slack.com/archives/C01LNCGJBMH/p1649431242727599

  1. Maybe we should check what others think?
  2. I don't have any strong opinion, I know my limitations and naming commands is not one of my strengths 😛 But I agree that search is misleading since in fact, the script creates the hash even if the mulled container has not yet been created.

@ewels
Copy link
Member

ewels commented May 5, 2022

I'm happy enough with this, it's a super obscure name but also a pretty obscure function...

This PR is missing any contributions to the docs though! Needs adding to README.md at least, with some long-form discussion about what it is and how to use it.

Ideally that would also be complemented with some docs on the website / in the modules readme if possible.

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