From 570b9baf54e3a09511965fb50fcccf7ad5b689a9 Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Sat, 6 Apr 2019 14:48:13 +0200 Subject: [PATCH 1/2] Linting: Don't reverse the conda channel order --- nf_core/lint.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nf_core/lint.py b/nf_core/lint.py index e1094a8bf1..cd90406464 100755 --- a/nf_core/lint.py +++ b/nf_core/lint.py @@ -683,7 +683,7 @@ def check_anaconda_package(self, dep): if '::' in depname: dep_channels = [depname.split('::')[0]] depname = depname.split('::')[1] - for ch in reversed(dep_channels): + for ch in dep_channels: anaconda_api_url = 'https://api.anaconda.org/package/{}/{}'.format(ch, depname) try: response = requests.get(anaconda_api_url, timeout=10) @@ -701,6 +701,8 @@ def check_anaconda_package(self, dep): elif response.status_code != 404: self.warned.append((8, "Anaconda API returned unexpected response code '{}' for: {}\n{}".format(response.status_code, anaconda_api_url, response))) raise ValueError + elif response.status_code == 404: + logging.debug("Could not find {} in conda channel {}".format(dep, ch)) else: # We have looped through each channel and had a 404 response code on everything self.failed.append((8, "Could not find Conda dependency using the Anaconda API: {}".format(dep))) From 9672f5067a14455c9b7c91771ff6ae1c0ea8ce61 Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Sat, 6 Apr 2019 14:54:45 +0200 Subject: [PATCH 2/2] Changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a32203aa33..ac1318345d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,8 @@ * Sorting now works again * Output is partially coloured (better highlighting out of date pipelines) * Improved documentation +* Fixed bugs in `nf-core lint` + * The order of conda channels is now correct, avoiding occasional erroneous errors that packages weren't found ([#207](https://github.com/nf-core/tools/issues/207)) ## [v1.5](https://github.com/nf-core/tools/releases/tag/1.5) - 2019-03-13 Iron Shark