Skip to content

Commit

Permalink
Merge pull request #3014 from nf-core/lint-conda-name-in-log
Browse files Browse the repository at this point in the history
Conda module linting: Include package name in log file
  • Loading branch information
mirpedrol authored Jun 3, 2024
2 parents fd34107 + 847a376 commit 14f0da4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
### Linting

- Fix linting fail on nfcore_external_java_deps if nf_schema is used ([#2976](https://github.com/nf-core/tools/pull/2976))
- Conda module linting: Include package name in log file ([#3014](https://github.com/nf-core/tools/pull/3014))

### Download

Expand Down
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 14f0da4

Please # to comment.