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

A few bugfixes #19

Merged
merged 3 commits into from Mar 19, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions nf_core/lint.py
Expand Up @@ -104,7 +104,7 @@ def pf(file_path):
files = [files]
if any([os.path.isfile(pf(f)) for f in files]):
self.passed.append((1, "File found: {}".format(files)))
self.files.append(f)
self.files.append(files)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be extend(files), as files will be a list.

else:
self.failed.append((1, "File not found: {}".format(files)))

Expand All @@ -114,7 +114,7 @@ def pf(file_path):
files = [files]
if any([os.path.isfile(pf(f)) for f in files]):
self.passed.append((1, "File found: {}".format(files)))
self.files.append(f)
self.files.append(files)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

else:
self.warned.append((1, "File not found: {}".format(files)))

Expand Down Expand Up @@ -210,7 +210,7 @@ def check_config_vars(self):
raise AssertionError("`nextflow config` returned non-zero error code: %s,\n %s", e.returncode, e.output)
else:
for l in nfconfig_raw.splitlines():
k, v = l.split(' = ', 1)
k, v = str(l).split(' = ', 1)
self.config[k] = v
for cf in config_fail:
if cf in self.config.keys():
Expand Down Expand Up @@ -269,7 +269,7 @@ def check_readme(self):
nf_config_version = self.config.get('params.nf_required_version').strip('\'"')
try:
assert nf_badge_version == nf_config_version
except AssertionError, KeyError:
except (AssertionError, KeyError) as e:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not necessary imo, cause the exception object is not accessed anywhere

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. I guess writing as e is more of a reflex for me 😄

self.failed.append((6, "README Nextflow minimum version badge does not match config. Badge: '{}', Config: '{}'".format(nf_badge_version, nf_config_version)))
else:
self.passed.append((6, "README Nextflow minimum version badge matched config. Badge: '{}', Config: '{}'".format(nf_badge_version, nf_config_version)))
Expand Down