Skip to content

Commit 8977418

Browse files
committed
Provide an easy way for timelines to get runnable effects
1 parent 6f211fc commit 8977418

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

demosys/project/base.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,14 @@ def _get_resource(self, label, source, resource_type):
126126
raise ValueError("Cannot find {0} with label '{1}'.\nExisting {0} labels: {2}".format(
127127
resource_type, label, list(source.keys())))
128128

129+
def get_runnable_effects(self):
130+
"""
131+
Returns all runnable effects in the project
132+
133+
:return: List of all runnable effects
134+
"""
135+
return [effect for name, effect in self._effects.items() if effect.runnable]
136+
129137
@property
130138
def ctx(self):
131139
return context.ctx()

0 commit comments

Comments
 (0)