Skip to content

Commit

Permalink
Conda module linting: Include package name in log file
Browse files Browse the repository at this point in the history
Tried to do this with GitHub Copilot Workspaces but it failed 😅 

As I was looking at the code anyway I could see the fix so figured I would put it manually.

Closes #3009

Untested, done in web browser only.
  • Loading branch information
ewels authored May 31, 2024
1 parent d7ce41b commit b96f56b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nf_core/modules/lint/main_nf.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,14 +367,14 @@ def check_process_section(self, lines, registry, fix_version, progress_bar):
# response = _bioconda_package(bp)
response = nf_core.utils.anaconda_package(bp)
except LookupError:
self.warned.append(("bioconda_version", "Conda version not specified correctly", self.main_nf))
self.warned.append(("bioconda_version", f"Conda version not specified correctly: {bp}", self.main_nf))
except ValueError:
self.failed.append(("bioconda_version", "Conda version not specified correctly", self.main_nf))
self.failed.append(("bioconda_version", f"Conda version not specified correctly: {bp}", self.main_nf))
else:
# Check that required version is available at all
if bioconda_version not in response.get("versions"):
self.failed.append(
("bioconda_version", f"Conda package had unknown version: `{bioconda_version}`", self.main_nf)
("bioconda_version", f"Conda package {bp} had unknown version: `{bioconda_version}`", self.main_nf)
)
continue # No need to test for latest version, continue linting
# Check version is latest available
Expand Down

0 comments on commit b96f56b

Please sign in to comment.