Skip to content

Commit 1eca8d2

Browse files
committed
Add ability to query the current state of the scenarios. This is useful for debugging.
1 parent 6d1953d commit 1eca8d2

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/hg_systematic/strategy/scenario.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,18 @@ def get_active_parameters(label: str):
7373
return _ACTIVE_PARAMETERS.get(label, {})
7474

7575

76+
def get_all_active_parameters():
77+
"""The current active parameters."""
78+
global _ACTIVE_PARAMETERS
79+
return _ACTIVE_PARAMETERS
80+
81+
82+
def get_active_scenarios():
83+
"""The active scenarios."""
84+
global _ACTIVE_SCENARIOS
85+
return _ACTIVE_SCENARIOS
86+
87+
7688
def scenario(fn=None, *, label: str = None, overloads: Callable = None, parameters: Sequence[str] = None):
7789
"""
7890
Wraps a graph (or node) with a scenario label and associates the wrapped function with the overload provided.

0 commit comments

Comments
 (0)