Closed mandysulli closed 4 months ago
The problem is that you have a broken/changed, therefore you get the git error (it tries to update the cache via git pull
but you have some uncommite changes there (probably because of a unsuccessful update run). Can you try to remove it with rm -r ~/.config/nfcore
then it should work
That worked for v2.14.1. I ran it and realized I should probably be running v2.12.1 since that is the version I used to make the pipeline, but running nf-core lint
with v2.12.1 won't work even after running rm -r ~/.config/nfcore
. Now I receive this error:
,--./,-.
___ __ __ __ ___ /,-._.--~\
|\ | |__ __ / ` / \ |__) |__ } {
| \| | \__, \__/ | \ |___ \`-._,-`-,
`._,._,'
nf-core/tools version 2.12.1 - https://nf-co.re
There is a new version of nf-core/tools available! (2.14.1)
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /opt/conda/bin/nf-core:10 in <module> │
│ │
│ 7 │
│ 8 if __name__ == '__main__': │
│ 9 │ sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) │
│ ❱ 10 │ sys.exit(run_nf_core()) │
│ 11 │
│ │
│ /opt/conda/lib/python3.11/site-packages/nf_core/__main__.py:141 in run_nf_core │
│ │
│ 138 │ │ │ log.debug(f"Could not check latest version: {e}") │
│ 139 │ │ stderr.print("\n") │
│ 140 │ # Launch the click cli │
│ ❱ 141 │ nf_core_cli(auto_envvar_prefix="NFCORE") │
│ 142 │
│ 143 │
│ 144 @tui() │
│ │
│ /opt/conda/lib/python3.11/site-packages/click/core.py:1157 in __call__ │
│ │
│ 1154 │ │
│ 1155 │ def __call__(self, *args: t.Any, **kwargs: t.Any) -> t.Any: │
│ 1156 │ │ """Alias for :meth:`main`.""" │
│ ❱ 1157 │ │ return self.main(*args, **kwargs) │
│ 1158 │
│ 1159 │
│ 1160 class Command(BaseCommand): │
│ │
│ /opt/conda/lib/python3.11/site-packages/rich_click/rich_command.py:126 in main │
│ │
│ 123 │ │ try: │
│ 124 │ │ │ try: │
│ 125 │ │ │ │ with self.make_context(prog_name, args, **extra) as ctx: │
│ ❱ 126 │ │ │ │ │ rv = self.invoke(ctx) │
│ 127 │ │ │ │ │ if not standalone_mode: │
│ 128 │ │ │ │ │ │ return rv │
│ 129 │ │ │ │ │ # it's not safe to `ctx.exit(rv)` here! │
│ │
│ /opt/conda/lib/python3.11/site-packages/click/core.py:1688 in invoke │
│ │
│ 1685 │ │ │ │ super().invoke(ctx) │
│ 1686 │ │ │ │ sub_ctx = cmd.make_context(cmd_name, args, parent=ctx) │
│ 1687 │ │ │ │ with sub_ctx: │
│ ❱ 1688 │ │ │ │ │ return _process_result(sub_ctx.command.invoke(sub_ctx)) │
│ 1689 │ │ │
│ 1690 │ │ # In chain mode we create the contexts step by step, but after the │
│ 1691 │ │ # base command has been invoked. Because at that point we do not │
│ │
│ /opt/conda/lib/python3.11/site-packages/click/core.py:1434 in invoke │
│ │
│ 1431 │ │ │ echo(style(message, fg="red"), err=True) │
│ 1432 │ │ │
│ 1433 │ │ if self.callback is not None: │
│ ❱ 1434 │ │ │ return ctx.invoke(self.callback, **ctx.params) │
│ 1435 │ │
│ 1436 │ def shell_complete(self, ctx: Context, incomplete: str) -> t.List["CompletionItem"]: │
│ 1437 │ │ """Return a list of completions for the incomplete value. Looks │
│ │
│ /opt/conda/lib/python3.11/site-packages/click/core.py:783 in invoke │
│ │
│ 780 │ │ │
│ 781 │ │ with augment_usage_errors(__self): │
│ 782 │ │ │ with ctx: │
│ ❱ 783 │ │ │ │ return __callback(*args, **kwargs) │
│ 784 │ │
│ 785 │ def forward( │
│ 786 │ │ __self, __cmd: "Command", *args: t.Any, **kwargs: t.Any # noqa: B902 │
│ │
│ /opt/conda/lib/python3.11/site-packages/click/decorators.py:33 in new_func │
│ │
│ 30 │ """ │
│ 31 │ │
│ 32 │ def new_func(*args: "P.args", **kwargs: "P.kwargs") -> "R": │
│ ❱ 33 │ │ return f(get_current_context(), *args, **kwargs) │
│ 34 │ │
│ 35 │ return update_wrapper(new_func, f) │
│ 36 │
│ │
│ /opt/conda/lib/python3.11/site-packages/nf_core/__main__.py:607 in lint │
│ │
│ 604 │ │
│ 605 │ # Run the lint tests! │
│ 606 │ try: │
│ ❱ 607 │ │ lint_obj, module_lint_obj, subworkflow_lint_obj = run_linting( │
│ 608 │ │ │ dir, │
│ 609 │ │ │ release, │
│ 610 │ │ │ fix, │
│ │
│ /opt/conda/lib/python3.11/site-packages/nf_core/lint/__init__.py:94 in run_linting │
│ │
│ 91 │ lint_obj._list_files() │
│ 92 │ │
│ 93 │ # Create the modules lint object │
│ ❱ 94 │ module_lint_obj = nf_core.modules.lint.ModuleLint(pipeline_dir, hide_progress=hide_p │
│ 95 │ # Create the subworkflows lint object │
│ 96 │ try: │
│ 97 │ │ subworkflow_lint_obj = nf_core.subworkflows.lint.SubworkflowLint(pipeline_dir, h │
│ │
│ /opt/conda/lib/python3.11/site-packages/nf_core/modules/lint/__init__.py:51 in __init__ │
│ │
│ 48 │ │ registry=None, │
│ 49 │ │ hide_progress=False, │
│ 50 │ ): │
│ ❱ 51 │ │ super().__init__( │
│ 52 │ │ │ component_type="modules", │
│ 53 │ │ │ dir=dir, │
│ 54 │ │ │ fail_warned=fail_warned, │
│ │
│ /opt/conda/lib/python3.11/site-packages/nf_core/components/lint/__init__.py:100 in __init__ │
│ │
│ 97 │ │ │ │ │ │ ) │
│ 98 │ │ │ │ │ ) │
│ 99 │ │ │ if not self.all_remote_components: │
│ ❱ 100 │ │ │ │ raise LookupError( │
│ 101 │ │ │ │ │ f"No {self.component_type} from {self.modules_repo.remote_url} insta │
│ 102 │ │ │ │ ) │
│ 103 │ │ │ local_component_dir = Path(self.dir, self.component_type, "local") │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
LookupError: No modules from https://github.com/nf-core/modules.git installed in pipeline.
can you post your nf-core.yml
here please?
Yes!
lint:
files_exist:
- CODE_OF_CONDUCT.md
- assets/nf-core-cli_logo_light.png
- docs/images/nf-core-cli_logo_light.png
- docs/images/nf-core-cli_logo_dark.png
- .github/ISSUE_TEMPLATE/config.yml
- .github/workflows/awstest.yml
- .github/workflows/awsfulltest.yml
files_unchanged:
- CODE_OF_CONDUCT.md
- assets/nf-core-cli_logo_light.png
- docs/images/nf-core-cli_logo_light.png
- docs/images/nf-core-cli_logo_dark.png
- .github/ISSUE_TEMPLATE/bug_report.yml
multiqc_config:
- report_comment
nextflow_config:
- manifest.name
- manifest.homePage
repository_type: pipeline
template:
prefix: mira
skip: []
okay, looks okay and you have modules (i.e. main.nf files etc) in modules/nf-core
?
Yes. Here is the setup:
Hi @mandysulli, is running nf-core modules lint <module_name>
working for you with v2.12.1? Could you also try to run the commands with the nf-core --verbose
flag and share the output here?
Regarding linting with v2.12.1 or v2.14.1, if you don't see errors with the latest version, I would advise to use this one.
nf-core modules lint <module_name>
wasn't working with v2.12.1, but I think you are right about using the latest version. I am just updating my lay out and proceeding with v2.14.1 now. That is working fine. Thanks for the help.
Description of the bug
Hello, I am trying to run nf-core lint on my pipeline, but I keep getting an error message about no nf-core modules found. However, I do have modules from https://github.com/nf-core/modules.git installed, but it seems to have an issue retrieving them this is what is in my modules.json looks like: { "name": "m/cli", "homePage": "https://github.com/m/cli", "repos": { "https://github.com/nf-core/modules.git": { "modules": { "nf-core": { "custom/dumpsoftwareversions": { "branch": "master", "git_sha": "8ec825f465b9c17f9d83000022995b4f7de6fe93", "installed_by": ["modules"] }, "fastqc": { "branch": "master", "git_sha": "c9488585ce7bd35ccd2a30faa2371454c8112fb9", "installed_by": ["modules"] }, "multiqc": { "branch": "master", "git_sha": "8ec825f465b9c17f9d83000022995b4f7de6fe93", "installed_by": ["modules"] } } } } } }
If use 'nf-core modules update given_module' then it says they are all up to date, but if I use 'nf-core modules lint given_module" then I get the same error.
Command used and terminal output
System information
Nextflow version: nextflow/23.10.0 Hardware: HPC - interactive session OS: biolinux Version of nf-core/tools : 2.14.1