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

nf-core modules list works on pipeline repos as well as module repos #2418

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

adamrtalbot
Copy link
Contributor

@adamrtalbot adamrtalbot commented Sep 11, 2023

Handles case where nf-core modules list would not work on pipeline repos because of missing org_path value in nf-core YAML file. In theory, this should work regardless of the nf-core definitions as long as the structure of the repository looks like nf-core, e.g. ./modules/local/....

This now uses the existing utility function to retrieve the organisation automatically and should provide a prompt if it is missing. I haven't updated the tests but they do not appear to cover this use case so I should.

I did try to harmonise SyncedRepo class to be more consistent everywhere but there are a number of circular dependencies that appear very quickly and this would take longer than I have right now. There are multiple copy-pasted uses of methods in this class so we should resolve this.

Fixes #2417

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 Sep 19, 2023

Codecov Report

Merging #2418 (56fa2e9) into dev (6b20a81) will increase coverage by 0.04%.
Report is 20 commits behind head on dev.
The diff coverage is 28.57%.

❗ Current head 56fa2e9 differs from pull request most recent head d17b708. Consider uploading reports for the commit d17b708 to get more accurate results

@@            Coverage Diff             @@
##              dev    #2418      +/-   ##
==========================================
+ Coverage   71.07%   71.11%   +0.04%     
==========================================
  Files          87       87              
  Lines        9431     9427       -4     
==========================================
+ Hits         6703     6704       +1     
+ Misses       2728     2723       -5     
Files Changed Coverage Δ
nf_core/download.py 59.35% <20.83%> (ø)
nf_core/synced_repo.py 82.58% <50.00%> (+1.47%) ⬆️
nf_core/modules/modules_repo.py 77.61% <100.00%> (+2.24%) ⬆️

Copy link
Member

@mirpedrol mirpedrol left a comment

Choose a reason for hiding this comment

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

LGTM when all tests pass, thanks for the fix!

@mirpedrol
Copy link
Member

There are multiple copy-pasted uses of methods in this class so we should resolve this.

I would leave this for a different PR

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.

None yet

2 participants