From 641c61148f9ce26c1dba5635d13ef156e1cb36fe Mon Sep 17 00:00:00 2001 From: Eric Charles Date: Fri, 8 Apr 2022 09:16:13 -0700 Subject: [PATCH] Include option to allow reloading modules without stage name clashes --- ceci/stage.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ceci/stage.py b/ceci/stage.py index eff2815..5d72203 100644 --- a/ceci/stage.py +++ b/ceci/stage.py @@ -38,6 +38,7 @@ class PipelineStage: dask_parallel = False config_options = {} doc = "" + allow_reload = False def __init__(self, args, comm=None): """Construct a pipeline stage, specifying the inputs, outputs, and configuration for it. @@ -252,7 +253,7 @@ def __init_subclass__(cls, **kwargs): if stage_is_complete: # Deal with duplicated class names - if cls.name in cls.pipeline_stages: + if cls.name in cls.pipeline_stages and not cls.allow_reload: other = cls.pipeline_stages[cls.name][1] raise errors.DuplicateStageName( "You created two pipeline stages with the"