Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions nf_core/modules/lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,6 @@ def check_module_changes(self, nfcore_modules):
Downloads the 'main.nf', 'functions.nf' and 'meta.yml' files for every module
and compare them to the local copies
"""
all_modules_up_to_date = True
files_to_check = ["main.nf", "functions.nf", "meta.yml"]

progress_bar = rich.progress.Progress(
Expand Down Expand Up @@ -420,7 +419,6 @@ def check_module_changes(self, nfcore_modules):
remote_copy = r.content.decode("utf-8")

if local_copy != remote_copy:
all_modules_up_to_date = False
self.warned.append(
LintResult(
mod,
Expand All @@ -429,6 +427,15 @@ def check_module_changes(self, nfcore_modules):
f"{os.path.join(mod.module_dir, f)}",
)
)
else:
self.passed.append(
LintResult(
mod,
"check_local_copy",
"Local copy of module up to date",
f"{os.path.join(mod.module_dir, f)}",
)
)
except UnicodeDecodeError as e:
self.warned.append(
LintResult(
Expand All @@ -439,9 +446,6 @@ def check_module_changes(self, nfcore_modules):
)
)

if all_modules_up_to_date:
self.passed.append("All modules are up to date!")


class NFCoreModule(object):
"""
Expand Down
2 changes: 1 addition & 1 deletion tests/test_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def test_modules_lint_fastqc(self):
self.mods.install("fastqc")
module_lint = nf_core.modules.ModuleLint(dir=self.pipeline_dir)
module_lint.lint(print_results=False, all_modules=True)
assert len(module_lint.passed) == 16
assert len(module_lint.passed) == 18
assert len(module_lint.warned) == 0
assert len(module_lint.failed) == 0

Expand Down