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
A few bugfixes #19
Conversation
Codecov Report
@@ Coverage Diff @@
## master #19 +/- ##
==========================================
+ Coverage 98.02% 98.03% +0.01%
==========================================
Files 2 2
Lines 152 153 +1
==========================================
+ Hits 149 150 +1
Misses 3 3
Continue to review full report at Codecov.
|
nf_core/lint.py
Outdated
@@ -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) |
There was a problem hiding this comment.
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.
nf_core/lint.py
Outdated
@@ -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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
nf_core/lint.py
Outdated
@@ -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: |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 😄
Thanks Remi! Could you also explain what you mean with "work on your Python 3.6" installation? Cause we are running CI with several Python versions. So if something is not working as expected, would be good to know (or even raise an issue) :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sry, need to resolve the list thing first
nf_core/lint.py
Outdated
@@ -210,7 +210,8 @@ 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 = str(l).split(' = ', 1) | |||
ul = l.decode() | |||
k, v = ul.split(' = ', 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
Hi Sven. Thanks. I was testing just testing this tool on my Nextflow pipeline and using the version of python I have installed locally ( |
Would you mind opening an issue and describe this in detail (StackTrace etc.) Have to look into this, because the CI does not throw the exceptions :( |
No worries, Sven. See #20 |
Some changes I made to make linting work on my python 3.6 installation