Skip to content

Commit

Permalink
warn instead of fail when no components are installed from the repo
Browse files Browse the repository at this point in the history
  • Loading branch information
mirpedrol committed Jan 22, 2024
1 parent faf8529 commit c07afe1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions nf_core/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ def lint(

# Run the lint tests!
try:
lint_obj, module_lint_obj = run_linting(
lint_obj, module_lint_obj, subworkflow_lint_obj = run_linting(
dir,
release,
fix,
Expand All @@ -613,7 +613,7 @@ def lint(
json,
ctx.obj["hide_progress"],
)
if len(lint_obj.failed) + len(module_lint_obj.failed) > 0:
if len(lint_obj.failed) + len(module_lint_obj.failed) + len(subworkflow_lint_obj.failed) > 0:
sys.exit(1)
except AssertionError as e:
log.critical(e)
Expand Down
4 changes: 1 addition & 3 deletions nf_core/components/lint/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,7 @@ def __init__(
)
)
if not self.all_remote_components:
raise LookupError(
f"No {self.component_type} from {self.modules_repo.remote_url} installed in pipeline."
)
log.warning(f"No {self.component_type} from {self.modules_repo.remote_url} installed in pipeline.")
local_component_dir = Path(self.dir, self.component_type, "local")
self.all_local_components = []
if local_component_dir.exists():
Expand Down
2 changes: 1 addition & 1 deletion nf_core/lint_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

def print_joint_summary(lint_obj, module_lint_obj, subworkflow_lint_obj):
"""Print a joint summary of the general pipe lint tests and the module and subworkflow lint tests"""
nbr_passed = len(lint_obj.passed) + len(module_lint_obj.passed) + len(subworkflow_lint_obj.passed)
nbr_passed = len(lint_obj.passed) + len(module_lint_obj.passed) + len(subworkflow_lint_obj.passed or 0)
nbr_ignored = len(lint_obj.ignored)
nbr_fixed = len(lint_obj.fixed)
nbr_warned = len(lint_obj.warned) + len(module_lint_obj.warned) + len(subworkflow_lint_obj.warned)
Expand Down

0 comments on commit c07afe1

Please sign in to comment.