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

modules list has issues with non-standard branch/path #1726

Closed
awgymer opened this issue Aug 3, 2022 · 7 comments · Fixed by #1727
Closed

modules list has issues with non-standard branch/path #1726

awgymer opened this issue Aug 3, 2022 · 7 comments · Fixed by #1727
Labels
bug Something isn't working

Comments

@awgymer
Copy link
Contributor

awgymer commented Aug 3, 2022

Description of the bug

Not sure if this is intended/expected but modules list with non-standard path/branch appears to have some issues finding the correct branch/path and information.

Command used and terminal output

Given modules installed with:
"modules --git-remote <repo> --branch <br> --base-path <otherpath> install mod1"


modules --git-remote <repo> list local

WARNING  Repository '<repo>' (master) does not contain the '<otherpath>' directory         
INFO     Modules installed in '.':                                                       
                                                                                         
┏━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Module Name ┃ Repository     ┃ Version SHA          ┃ Message       ┃ Date          ┃
┡━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ mod1        │ repo           │  sha                 │ Not Available │ Not Available │
└─────────────┴────────────────┴──────────────────────┴───────────────┴───────────────┘

------------------------

modules --git-remote <repo> --branch <br> --base-path <otherpath> list local 

WARNING  Repository '<repo>' (master) does not contain the '<otherpath>' directory         
INFO     Modules installed in '.':                                                       
                                                                                         
┏━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Module Name ┃ Repository     ┃ Version SHA          ┃ Message       ┃ Date          ┃
┡━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ mod1        │ repo           │  sha                 │ Not Available │ Not Available │
└─────────────┴────────────────┴──────────────────────┴───────────────┴───────────────┘
 
------------------------

modules --git-remote <repo> --branch <br> list local 

CRITICAL Repository '<repo>' (<br>) does not contain the 'modules' directory

System information

nf-core/tools version 2.5.dev0
python 3.9.7
macOS

@awgymer awgymer added the bug Something isn't working label Aug 3, 2022
@ErikDanielsson
Copy link
Contributor

ErikDanielsson commented Aug 3, 2022

The issue here is that we don't support different base-paths in different branches -- the base-path is only recorded once per remote. I not sure whether the right approach is to we should scrap the --base-path option altogether, or just make the documentation clearer.

However, this also pinpoints a bigger issue: while we allow modules to be installed from a branch, we don't record what branch they were installed from and therefore other commands fail when they are unable to find the git sha recorded in the modules.json. This should be supported however, so I'll make a PR.

@awgymer
Copy link
Contributor Author

awgymer commented Aug 3, 2022

To be clear, I only used that base-path. I did a clean install of the modules, removing any old copies and the pre-existing modules.json

@ErikDanielsson
Copy link
Contributor

So the master/main branch has the same base path? Because otherwise it will fail...

@ErikDanielsson
Copy link
Contributor

ErikDanielsson commented Aug 3, 2022

I've addressed a few of the minor issues causing some of the problems with --branch in #1727

@awgymer
Copy link
Contributor Author

awgymer commented Aug 3, 2022

So the master/main branch has the same base path? Because otherwise it will fail...

Ohhhhh, I see what you meant now. Sorry. Yeah I just made a test branch with a new name for the base-path, guess that's the issue.

@ErikDanielsson
Copy link
Contributor

I think the --base-path option was added without considering all the ways it could be used, so I'll make the documentation clearer on what can and can't do, and then we'll see if it survives to the next release.

@ErikDanielsson ErikDanielsson linked a pull request Aug 3, 2022 that will close this issue
4 tasks
@ErikDanielsson
Copy link
Contributor

Closing due to merge of #1727 and follow up issue in #1728

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants