-
Notifications
You must be signed in to change notification settings - Fork 191
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
Make nf-core modules
commands work with arbitrary git remotes
#1724
Make nf-core modules
commands work with arbitrary git remotes
#1724
Conversation
nf-core modules
command work with repostories of greater nestingnf-core modules
command work with arbitrary git remotes
nf-core modules
command work with arbitrary git remotesnf-core modules
commands work with arbitrary git remotes
Codecov Report
@@ Coverage Diff @@
## dev #1724 +/- ##
==========================================
- Coverage 68.29% 68.23% -0.07%
==========================================
Files 59 59
Lines 7063 7071 +8
==========================================
+ Hits 4824 4825 +1
- Misses 2239 2246 +7
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
fe31bc8
to
c23690d
Compare
When trying
|
FWIW the |
Are you able to create and work with a branch where you've not changed the base-path? |
So I did some debugging and when it was doing the call to |
Not sure if this is intended/expected, and may be outside the scope of this PR, but
Leaving out the path resulted in:
|
Yes, put it in an issue and I'll have a look at it this afternoon |
The issues mentioned should've been address elsewhere, so this PR should be ready for review now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good to me, only a couple of suggestions :)
I am not sure how to test this functionality, so if @awgymer is happy with it I think we can merge
if module is None: | ||
module = questionary.autocomplete( | ||
"Tool name:", choices=self.module_names[repo_name], style=nf_core.utils.nfcore_question_style | ||
"Tool name:", | ||
choices=self.modules_from_repo(repo_name), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this line should change in the other commands also, is that right?
For example the one from patch.py
is failing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes you are right, thanks! Though it seems like patch.py
was the only one I missed, I've updated it now.
Co-authored-by: Júlia Mir Pedrol <mirp.julia@gmail.com>
The things I have tried so far all seem to be working. |
Thanks @awgymer for testing and @mirpedrol for reviewing! |
As @awgymer reported in #1721, several of the
nf-core modules
commands depended on that git remotes had the same format as in GitHub, i.e.owner/repo
. This meant that the commands failed when repo names of greater nesting were used, for examplegroup/subgroup/repo
.I've fixed this by letting the
modules.json
file be the only source of information for what modules are installed in a pipeline -- the commands should not need to interact with the directory structure directly.PR checklist
CHANGELOG.md
is updateddocs
is updated