From 8fb3246faa05114b27de2cbb8c1f84179cfbdaa7 Mon Sep 17 00:00:00 2001 From: Bob Bird Date: Thu, 26 Sep 2024 09:29:17 -0600 Subject: [PATCH] Add filtering so warning is only given for non-default-selection Previously this would also work for pipelines that don't have phases (eg ramble on). This adds a simple check to only warn if the user requested a change to the phases away from the default path --- lib/ramble/ramble/filters.py | 4 +++- lib/ramble/ramble/pipeline.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/ramble/ramble/filters.py b/lib/ramble/ramble/filters.py index 9c4a7c9cc..30fbdc6f4 100644 --- a/lib/ramble/ramble/filters.py +++ b/lib/ramble/ramble/filters.py @@ -8,13 +8,15 @@ import itertools +ALL_PHASES = ["*"] + class Filters: """Object containing filters for limiting various operations in Ramble""" def __init__( self, - phase_filters=["*"], + phase_filters=ALL_PHASES, include_where_filters=None, exclude_where_filters=None, tags=None, diff --git a/lib/ramble/ramble/pipeline.py b/lib/ramble/ramble/pipeline.py index 6691d9579..c998fd298 100644 --- a/lib/ramble/ramble/pipeline.py +++ b/lib/ramble/ramble/pipeline.py @@ -182,7 +182,7 @@ def _execute(self): count += 1 - if phase_total == 0: + if phase_total == 0 and self.filters.phases != ramble.filters.ALL_PHASES: logger.warn("No valid phases were selected, please verify requested phases") def _complete(self):