Skip to content

Commit

Permalink
Include option to allow reloading modules without stage name clashes
Browse files Browse the repository at this point in the history
  • Loading branch information
eacharles committed Apr 8, 2022
1 parent e52e956 commit 641c611
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ceci/stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 641c611

Please sign in to comment.