diff --git a/cylc/flow/cfgspec/workflow.py b/cylc/flow/cfgspec/workflow.py index ec33c49e1db..8ad315a7b2c 100644 --- a/cylc/flow/cfgspec/workflow.py +++ b/cylc/flow/cfgspec/workflow.py @@ -802,17 +802,17 @@ def get_script_common_text(this: str, example: Optional[str] = None): :ref:`SequentialTasks`. ''') - Conf('spawn from xtriggers sequentially', VDR.V_BOOLEAN, False, + Conf('sequential xtriggers', VDR.V_BOOLEAN, False, desc=''' If ``True``, tasks that only depend on xtriggers will not spawn - until their previous (cycle point) instance is satisfied. + until the xtrigger of previous (cycle point) instance is satisfied. Otherwise, they will all spawn at once out to the runahead limit. This setting can be overridden by the reserved keyword argument ``sequential`` in individual xtrigger declarations. One sequential xtrigger on a parentless task with multiple - xtriggers will cause sequential behavior. + xtriggers will cause sequential spawning. ''') with Conf('xtriggers', desc=''' This section is for *External Trigger* function declarations - diff --git a/cylc/flow/config.py b/cylc/flow/config.py index 8a3f6df076c..ad87315c4c1 100644 --- a/cylc/flow/config.py +++ b/cylc/flow/config.py @@ -1715,7 +1715,7 @@ def generate_triggers(self, lexpression, left_nodes, right, seq, if self.xtrigger_mgr is not None: self.xtrigger_mgr.sequential_xtriggers_default = ( - self.cfg['scheduling']['spawn from xtriggers sequentially'] + self.cfg['scheduling']['sequential xtriggers'] ) for label in xtrig_labels: try: diff --git a/cylc/flow/scheduler.py b/cylc/flow/scheduler.py index 67e63ab8874..a07f6744cea 100644 --- a/cylc/flow/scheduler.py +++ b/cylc/flow/scheduler.py @@ -2151,7 +2151,7 @@ def resume_workflow(self, quiet: bool = False) -> None: def command_force_trigger_tasks( self, tasks: Iterable[str], - flow: List[Union[str, int]], + flow: List[str], flow_wait: bool = False, flow_descr: Optional[str] = None ): @@ -2162,7 +2162,7 @@ def command_force_trigger_tasks( def command_set( self, tasks: List[str], - flow: List[Union[str, int]], + flow: List[str], outputs: Optional[List[str]] = None, prerequisites: Optional[List[str]] = None, flow_wait: bool = False, diff --git a/cylc/flow/task_pool.py b/cylc/flow/task_pool.py index 552cc06dd39..2b214d70943 100644 --- a/cylc/flow/task_pool.py +++ b/cylc/flow/task_pool.py @@ -1803,7 +1803,7 @@ def set_prereqs_and_outputs( items: Iterable[str], outputs: List[str], prereqs: List[str], - flow: List[Union[str, int]], + flow: List[str], flow_wait: bool = False, flow_descr: Optional[str] = None ): @@ -2001,7 +2001,7 @@ def remove_tasks(self, items): def _get_flow_nums( self, - flow: List[Union[str, int]], + flow: List[str], meta: Optional[str] = None, ) -> Optional[Set[int]]: """Get correct flow numbers given user command options.""" @@ -2073,7 +2073,7 @@ def _force_trigger(self, itask): def force_trigger_tasks( self, items: Iterable[str], - flow: List[Union[str, int]], + flow: List[str], flow_wait: bool = False, flow_descr: Optional[str] = None ): diff --git a/cylc/flow/xtrigger_mgr.py b/cylc/flow/xtrigger_mgr.py index 762d8aa5ba3..7f53b061463 100644 --- a/cylc/flow/xtrigger_mgr.py +++ b/cylc/flow/xtrigger_mgr.py @@ -204,20 +204,18 @@ class XtriggerManager: # Example: [scheduling] - sequential xtrigger default = True + sequential xtriggers = True [[xtriggers]] - clock_0 = wall_clock() # offset PT0H - clock_1 = wall_clock(offset=PT1H) - # or wall_clock(PT1H) + # "sequential=False" here overrides workflow and function default. + clock_0 = wall_clock(sequential=False) workflow_x = workflow_state( workflow=other, point=%(task_cycle_point)s, - sequential=False ):PT30S [[graph]] PT1H = ''' - @clock_1 & @workflow_x => foo & bar - @wall_clock = baz # pre-defined zero-offset clock + @workflow_x => foo & bar # spawned on workflow_x satisfaction + @clock_0 => baz # baz spawned out to RH ''' Args: @@ -259,7 +257,7 @@ def __init__( # Labels whose xtriggers are sequentially checked. self.sequential_xtrigger_labels: Set[str] = set() # Gather parentless tasks whose xtrigger(s) have been satisfied - # (these will be used to spawn the next occurance). + # (these will be used to spawn the next occurrence). self.sequential_spawn_next: Set[str] = set() self.sequential_has_spawned_next: Set[str] = set() diff --git a/tests/functional/cylc-config/00-simple/section1.stdout b/tests/functional/cylc-config/00-simple/section1.stdout index 87324cc9e97..f5ff23b77ae 100644 --- a/tests/functional/cylc-config/00-simple/section1.stdout +++ b/tests/functional/cylc-config/00-simple/section1.stdout @@ -6,7 +6,7 @@ hold after cycle point = stop after cycle point = cycling mode = integer runahead limit = P4 -spawn from xtriggers sequentially = False +sequential xtriggers = False [[queues]] [[[default]]] limit = 100 diff --git a/tests/functional/xtriggers/04-sequential.t b/tests/functional/xtriggers/04-sequential.t index f89c5454db5..211aa47277f 100644 --- a/tests/functional/xtriggers/04-sequential.t +++ b/tests/functional/xtriggers/04-sequential.t @@ -30,7 +30,7 @@ init_workflow "${TEST_NAME_BASE}" << '__FLOW_CONFIG__' [scheduling] initial cycle point = 3000 runahead limit = P5 - spawn from xtriggers sequentially = True + sequential xtriggers = True [[xtriggers]] clock_1 = wall_clock(offset=P2Y, sequential=False) clock_2 = wall_clock() diff --git a/tests/integration/test_sequential_xtriggers.py b/tests/integration/test_sequential_xtriggers.py index f7deee96eee..cbe0051d084 100644 --- a/tests/integration/test_sequential_xtriggers.py +++ b/tests/integration/test_sequential_xtriggers.py @@ -224,7 +224,7 @@ async def test_override(flow, scheduler, start): """Test that the 'sequential=False' arg can override a default of True.""" wid = flow({ 'scheduling': { - 'spawn from xtriggers sequentially': True, + 'sequential xtriggers': True, 'xtriggers': { 'xt1': 'custom_xt()', 'xt2': 'custom_xt(sequential=False)',