Skip to content

Commit

Permalink
Merge pull request #68 from eacharles/issue/66/allow_reload
Browse files Browse the repository at this point in the history
Include option to allow reloading modules without stage name clashes
  • Loading branch information
joezuntz authored Apr 11, 2022
2 parents 932a0a0 + 641c611 commit cd1f340
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 @@ -40,6 +40,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 @@ -296,7 +297,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 cd1f340

Please sign in to comment.