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

Record branch information in modules.json #1728

Closed
ErikDanielsson opened this issue Aug 3, 2022 · 1 comment · Fixed by #1738
Closed

Record branch information in modules.json #1728

ErikDanielsson opened this issue Aug 3, 2022 · 1 comment · Fixed by #1738
Labels
bug Something isn't working enhancement

Comments

@ErikDanielsson
Copy link
Contributor

ErikDanielsson commented Aug 3, 2022

Description of the bug

If a module is installed from a branch other than the default branch, commands that rely on the modules.json for version information will fail since they only look for the sha in the default branch of the repository.

Fixing this should be rather easy, just record the branch name along with the git sha in the module entry. So a new modules.jsoncould look like

{
    "name": "a/pipeline",
    "homePage": "https://a-pipeline.com",
    "repos": {
        "some/cool/repo": {
            "base_path": "modules",
            "git_url": "https://git-provider.com/some/cool/repo.git",
            "modules": {
                "first-modules": {
                    "git_sha": "<some sha>",
                    "branch": "main"
                },
                "second/module": {
                    "git_sha": "<another sha>",
                    "branch": "other-branch"
                }
            }
        }
    }
}

Command used and terminal output

$ nf-core modules -b <br> install mod
$ nf-core modules list local 
┏━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓
┃ Module Name   ┃ Repository    ┃ Version SHA   ┃ Message       ┃ Date         ┃
┡━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━┩
│ mod           │ repo          │ sha           │ Not Available │ Not          │
│               │               │               │               │ Available    │
└───────────────┴───────────────┴───────────────┴───────────────┴──────────────┘

System information

nf-core/tools 2.5dev

@ErikDanielsson
Copy link
Contributor Author

Closing due to merge of #1738.

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