From fce81698fbf011eaa81faead8eb3b005b85a3972 Mon Sep 17 00:00:00 2001 From: Marcos Bento Date: Wed, 20 May 2026 10:54:21 +0100 Subject: [PATCH 01/15] Update Python documentation The large amount of updated files is due to the migration from Boost.python to pybind11, but in practice there were no API changes. --- docs/python_api/AttrType.rst | 24 +- docs/python_api/Autoarchive.rst | 10 +- docs/python_api/Autocancel.rst | 8 +- docs/python_api/Autorestore.rst | 4 +- docs/python_api/AvisoAttr.rst | 14 +- docs/python_api/CheckPt.rst | 27 +- docs/python_api/ChildCmdType.rst | 29 +- docs/python_api/Client.rst | 2499 ++++++++++++---------- docs/python_api/Clock.rst | 16 +- docs/python_api/Complete.rst | 4 +- docs/python_api/Cron.rst | 37 +- docs/python_api/DState.rst | 39 +- docs/python_api/Date.rst | 8 +- docs/python_api/Day.rst | 4 +- docs/python_api/Days.rst | 27 +- docs/python_api/Defs.rst | 450 ++-- docs/python_api/Defstatus.rst | 4 +- docs/python_api/Ecf.rst | 10 +- docs/python_api/Edit.rst | 2 +- docs/python_api/Event.rst | 14 +- docs/python_api/Expression.rst | 6 +- docs/python_api/FamilyVec.rst | 56 +- docs/python_api/File.rst | 10 +- docs/python_api/Flag.rst | 18 +- docs/python_api/FlagType.rst | 65 +- docs/python_api/FlagTypeVec.rst | 56 +- docs/python_api/Generic.rst | 6 +- docs/python_api/InLimit.rst | 12 +- docs/python_api/JobCreationCtrl.rst | 20 +- docs/python_api/Label.rst | 10 +- docs/python_api/Late.rst | 70 +- docs/python_api/Limit.rst | 14 +- docs/python_api/Meter.rst | 14 +- docs/python_api/MirrorAttr.rst | 16 +- docs/python_api/Node.rst | 1921 +++++++++-------- docs/python_api/NodeContainer.rst | 100 +- docs/python_api/NodeVec.rst | 56 +- docs/python_api/PartExpression.rst | 8 +- docs/python_api/PrintStyle.rst | 6 +- docs/python_api/Queue.rst | 10 +- docs/python_api/Repeat.rst | 14 +- docs/python_api/RepeatDate.rst | 10 +- docs/python_api/RepeatDateList.rst | 8 +- docs/python_api/RepeatDateTime.rst | 10 +- docs/python_api/RepeatDateTimeList.rst | 8 +- docs/python_api/RepeatDay.rst | 2 +- docs/python_api/RepeatEnumerated.rst | 10 +- docs/python_api/RepeatInteger.rst | 10 +- docs/python_api/RepeatString.rst | 10 +- docs/python_api/SState.rst | 22 +- docs/python_api/State.rst | 34 +- docs/python_api/Style.rst | 27 +- docs/python_api/Submittable.rst | 10 +- docs/python_api/Suite.rst | 10 +- docs/python_api/SuiteVec.rst | 56 +- docs/python_api/TaskVec.rst | 56 +- docs/python_api/Time.rst | 4 +- docs/python_api/TimeSeries.rst | 12 +- docs/python_api/TimeSlot.rst | 8 +- docs/python_api/Today.rst | 6 +- docs/python_api/Trigger.rst | 4 +- docs/python_api/UrlCmd.rst | 4 +- docs/python_api/Variable.rst | 8 +- docs/python_api/VariableList.rst | 56 +- docs/python_api/Verify.rst | 2 +- docs/python_api/WhyCmd.rst | 4 +- docs/python_api/Zombie.rst | 48 +- docs/python_api/ZombieAttr.rst | 10 +- docs/python_api/ZombieType.rst | 25 +- docs/python_api/ZombieUserActionType.rst | 25 +- docs/python_api/ZombieVec.rst | 60 +- 71 files changed, 3592 insertions(+), 2685 deletions(-) diff --git a/docs/python_api/AttrType.rst b/docs/python_api/AttrType.rst index 08e790699..e232869a9 100644 --- a/docs/python_api/AttrType.rst +++ b/docs/python_api/AttrType.rst @@ -5,10 +5,24 @@ ecflow.AttrType .. py:class:: AttrType :module: ecflow - Bases: :py:class:`~Boost.Python.enum` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Sortable attribute type, currently [event | meter | label | limit | variable | all ] +Members: + + event + + meter + + label + + limit + + variable + + all + .. py:attribute:: AttrType.all :module: ecflow @@ -35,11 +49,19 @@ Sortable attribute type, currently [event | meter | label | limit | variable | a :value: ecflow.AttrType.meter +.. py:property:: AttrType.name + :module: ecflow + + .. py:attribute:: AttrType.names :module: ecflow :value: {'all': ecflow.AttrType.all, 'event': ecflow.AttrType.event, 'label': ecflow.AttrType.label, 'limit': ecflow.AttrType.limit, 'meter': ecflow.AttrType.meter, 'variable': ecflow.AttrType.variable} +.. py:property:: AttrType.value + :module: ecflow + + .. py:attribute:: AttrType.values :module: ecflow :value: {1: ecflow.AttrType.event, 2: ecflow.AttrType.meter, 3: ecflow.AttrType.label, 4: ecflow.AttrType.limit, 5: ecflow.AttrType.variable, 6: ecflow.AttrType.all} diff --git a/docs/python_api/Autoarchive.rst b/docs/python_api/Autoarchive.rst index 54df57cca..c573e3c32 100644 --- a/docs/python_api/Autoarchive.rst +++ b/docs/python_api/Autoarchive.rst @@ -5,7 +5,7 @@ ecflow.Autoarchive .. py:class:: Autoarchive :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Provides a way to automatically archive a suite/family which has completed or is *idle* @@ -48,25 +48,25 @@ Usage: attr = Autoarchive( 3,true ) # archive node 3 days after complete,queued or aborted, i.e node is idle -.. py:method:: Autoarchive.days( (Autoarchive)arg1) -> bool : +.. py:method:: Autoarchive.days(self: ecflow.Autoarchive) -> bool :module: ecflow Returns a boolean true if time was specified in days -.. py:method:: Autoarchive.idle( (Autoarchive)arg1) -> bool : +.. py:method:: Autoarchive.idle(self: ecflow.Autoarchive) -> bool :module: ecflow Returns a boolean true if archiving when idle, i.e queued,aborted,complete and time elapsed -.. py:method:: Autoarchive.relative( (Autoarchive)arg1) -> bool : +.. py:method:: Autoarchive.relative(self: ecflow.Autoarchive) -> bool :module: ecflow Returns a boolean where true means the time is relative -.. py:method:: Autoarchive.time( (Autoarchive)arg1) -> TimeSlot : +.. py:method:: Autoarchive.time(self: ecflow.Autoarchive) -> ecflow.TimeSlot :module: ecflow returns archive time as a TimeSlot diff --git a/docs/python_api/Autocancel.rst b/docs/python_api/Autocancel.rst index e2a8f2796..b6794070a 100644 --- a/docs/python_api/Autocancel.rst +++ b/docs/python_api/Autocancel.rst @@ -5,7 +5,7 @@ ecflow.Autocancel .. py:class:: Autocancel :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Provides a way to automatically delete/remove a node which has completed @@ -38,19 +38,19 @@ Usage: Autocancel(2,0,true)) # delete task 2 hours after completion -.. py:method:: Autocancel.days( (Autocancel)arg1) -> bool : +.. py:method:: Autocancel.days(self: ecflow.Autocancel) -> bool :module: ecflow Returns a boolean true if time was specified in days -.. py:method:: Autocancel.relative( (Autocancel)arg1) -> bool : +.. py:method:: Autocancel.relative(self: ecflow.Autocancel) -> bool :module: ecflow Returns a boolean where true means the time is relative -.. py:method:: Autocancel.time( (Autocancel)arg1) -> TimeSlot : +.. py:method:: Autocancel.time(self: ecflow.Autocancel) -> ecflow.TimeSlot :module: ecflow returns cancel time as a TimeSlot diff --git a/docs/python_api/Autorestore.rst b/docs/python_api/Autorestore.rst index b49f535e8..27fe090b0 100644 --- a/docs/python_api/Autorestore.rst +++ b/docs/python_api/Autorestore.rst @@ -5,7 +5,7 @@ ecflow.Autorestore .. py:class:: Autorestore :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Provides a way to automatically restore a previously archived node @@ -29,7 +29,7 @@ Usage: attr = Autorestore( ['/s1/f1','/s1/f2'] ) # restore archived node at /s1/f1 and /s1/f2 -.. py:method:: Autorestore.nodes_to_restore( (Autorestore)arg1) -> object : +.. py:method:: Autorestore.nodes_to_restore(self: ecflow.Autorestore) -> object :module: ecflow returns a list of nodes to be restored diff --git a/docs/python_api/AvisoAttr.rst b/docs/python_api/AvisoAttr.rst index 142ee3b28..02e2c7ed9 100644 --- a/docs/python_api/AvisoAttr.rst +++ b/docs/python_api/AvisoAttr.rst @@ -5,7 +5,7 @@ ecflow.AvisoAttr .. py:class:: AvisoAttr :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` An :term:`aviso` attribute, assigned to a :term:`node`, represents an external trigger holding the node queued untilan Aviso notification matching the attribute configuration is detected. @@ -51,37 +51,37 @@ Usage: The parameters `url`, `schema`, `polling`, and `auth` are optional -.. py:method:: AvisoAttr.auth( (AvisoAttr)arg1) -> str : +.. py:method:: AvisoAttr.auth(self: ecflow.AvisoAttr) -> str :module: ecflow Returns the path to Authentication credentials used to contact the Aviso server -.. py:method:: AvisoAttr.listener( (AvisoAttr)arg1) -> str : +.. py:method:: AvisoAttr.listener(self: ecflow.AvisoAttr) -> str :module: ecflow Returns the Aviso listener configuration -.. py:method:: AvisoAttr.name( (AvisoAttr)arg1) -> str : +.. py:method:: AvisoAttr.name(self: ecflow.AvisoAttr) -> str :module: ecflow Returns the name of the Aviso attribute -.. py:method:: AvisoAttr.polling( (AvisoAttr)arg1) -> str : +.. py:method:: AvisoAttr.polling(self: ecflow.AvisoAttr) -> str :module: ecflow Returns polling interval used to contact the Aviso server -.. py:method:: AvisoAttr.schema( (AvisoAttr)arg1) -> str : +.. py:method:: AvisoAttr.schema(self: ecflow.AvisoAttr) -> str :module: ecflow Returns the path to the schema used to contact the Aviso server -.. py:method:: AvisoAttr.url( (AvisoAttr)arg1) -> str : +.. py:method:: AvisoAttr.url(self: ecflow.AvisoAttr) -> str :module: ecflow Returns the URL used to contact the Aviso server diff --git a/docs/python_api/CheckPt.rst b/docs/python_api/CheckPt.rst index 03414cc1e..35b51793f 100644 --- a/docs/python_api/CheckPt.rst +++ b/docs/python_api/CheckPt.rst @@ -5,7 +5,7 @@ ecflow.CheckPt .. py:class:: CheckPt :module: ecflow - Bases: :py:class:`~Boost.Python.enum` + Bases: :py:class:`~pybind11_builtins.pybind11_object` CheckPt is enum that is used to control check pointing in the :term:`ecflow_server` @@ -15,32 +15,41 @@ CheckPt is enum that is used to control check pointing in the :term:`ecflow_serv - UNDEFINED : None of the the above, used to provide default argument +Members: + + NEVER + + ON_TIME + + ALWAYS + + UNDEFINED + + .. py:attribute:: CheckPt.ALWAYS :module: ecflow - :value: ecflow.CheckPt.ALWAYS + :value: .. py:attribute:: CheckPt.NEVER :module: ecflow - :value: ecflow.CheckPt.NEVER + :value: .. py:attribute:: CheckPt.ON_TIME :module: ecflow - :value: ecflow.CheckPt.ON_TIME + :value: .. py:attribute:: CheckPt.UNDEFINED :module: ecflow - :value: ecflow.CheckPt.UNDEFINED + :value: -.. py:attribute:: CheckPt.names +.. py:property:: CheckPt.name :module: ecflow - :value: {'ALWAYS': ecflow.CheckPt.ALWAYS, 'NEVER': ecflow.CheckPt.NEVER, 'ON_TIME': ecflow.CheckPt.ON_TIME, 'UNDEFINED': ecflow.CheckPt.UNDEFINED} -.. py:attribute:: CheckPt.values +.. py:property:: CheckPt.value :module: ecflow - :value: {0: ecflow.CheckPt.NEVER, 1: ecflow.CheckPt.ON_TIME, 2: ecflow.CheckPt.ALWAYS, 3: ecflow.CheckPt.UNDEFINED} diff --git a/docs/python_api/ChildCmdType.rst b/docs/python_api/ChildCmdType.rst index 4ac6990f3..2a8b64bde 100644 --- a/docs/python_api/ChildCmdType.rst +++ b/docs/python_api/ChildCmdType.rst @@ -5,7 +5,7 @@ ecflow.ChildCmdType .. py:class:: ChildCmdType :module: ecflow - Bases: :py:class:`~Boost.Python.enum` + Bases: :py:class:`~pybind11_builtins.pybind11_object` ChildCmdType represents the different :term:`child command`\ s. This type is used as a parameter to the class :py:class:`ecflow.ZombieAttr` @@ -21,6 +21,25 @@ Child commands are called within a :term:`job file`:: ChildCmdType::complete corresponds to : ecflow_client --complete +Members: + + init + + event + + meter + + label + + wait + + queue + + abort + + complete + + .. py:attribute:: ChildCmdType.abort :module: ecflow :value: ecflow.ChildCmdType.abort @@ -51,6 +70,10 @@ Child commands are called within a :term:`job file`:: :value: ecflow.ChildCmdType.meter +.. py:property:: ChildCmdType.name + :module: ecflow + + .. py:attribute:: ChildCmdType.names :module: ecflow :value: {'abort': ecflow.ChildCmdType.abort, 'complete': ecflow.ChildCmdType.complete, 'event': ecflow.ChildCmdType.event, 'init': ecflow.ChildCmdType.init, 'label': ecflow.ChildCmdType.label, 'meter': ecflow.ChildCmdType.meter, 'queue': ecflow.ChildCmdType.queue, 'wait': ecflow.ChildCmdType.wait} @@ -61,6 +84,10 @@ Child commands are called within a :term:`job file`:: :value: ecflow.ChildCmdType.queue +.. py:property:: ChildCmdType.value + :module: ecflow + + .. py:attribute:: ChildCmdType.values :module: ecflow :value: {0: ecflow.ChildCmdType.init, 1: ecflow.ChildCmdType.event, 2: ecflow.ChildCmdType.meter, 3: ecflow.ChildCmdType.label, 4: ecflow.ChildCmdType.wait, 5: ecflow.ChildCmdType.queue, 6: ecflow.ChildCmdType.abort, 7: ecflow.ChildCmdType.complete} diff --git a/docs/python_api/Client.rst b/docs/python_api/Client.rst index 624a38b55..aac9a058c 100644 --- a/docs/python_api/Client.rst +++ b/docs/python_api/Client.rst @@ -5,7 +5,7 @@ ecflow.Client .. py:class:: Client :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Class client provides an interface to communicate with the :term:`ecflow_server`.: @@ -66,250 +66,258 @@ Secure communication between client and server can be enabled when creating of a A secure connection can also be enabled/disabled using the `Client.enable_ssl()/.disable_ssl()` methods. The behaviour of `Client.enable_ssl()` follows the Client initialisation described above (assuming `ECF_SSL=1` when `ECF_SSL` is not defined). -.. py:method:: Client.alter( (Client)arg1, (list)paths, (str)alter_type, (str)attribute_type [, (str)name='' [, (str)value='']]) -> None : +.. py:method:: Client.alter(*args, **kwargs) :module: ecflow +Overloaded function. + +1. alter(self: ecflow.Client, paths: list, alter_type: str, attribute_type: str, name: str = '', value: str = '') -> None + Alter command is used to change the attributes of a node - :: - - void alter( - (list | string ) paths(s) : - One or more paths to the node with the attribute(s) to be altered. - string alter_type : - The type of alteration to perform. - Must be one of [ add, change, delete, set_flag, clear_flag, sort ] - string attr_type : - The type of attribute affected by the alteration. - Depending on the type of alteration, provide one of the following. - for add : [ - variable, time, today, date, day, zombie, event, meter, - late, limit, inlimit, label, aviso, mirror - ] - for delete : [ - variable, time, today, date, day, cron, event, meter, late, generic, - queue, label, trigger, complete, repeat, limit, inlimit, limit_path, - zombie, aviso, mirror - ] - for change : [ - variable, clock_type, clock_gain, clock_date, clock_sync , event, meter - label, trigger , complete, repeat, limit_max, limit_value, defstatus - late, time, today, aviso, mirror - ] - for set_flag or clear_flag: [ - force_aborted, user_edit, task_aborted, edit_failed, ecfcmd_failed, - statuscmd_failed, killcmd_failed, no_script, killed, status, late, - message complete, queue_limit, task_waiting, locked, zombie, archived, - restored, threshold, log_error, checkpt_error - ] - for sort: [ - event, meter, label, variable, limit, all ] - string name : - The name of the attribute(s) to be altered. - Used when multiple attributes of the same type exist e.g. a variable, - a meter, an event or a labet; but optional when changing unnamed attributes, - such as trigger or complete. - string value : - The new/updated value for the attribute. - ) - - This function will raise exceptions because: - - - A provided path does not exist. - - A provided value cannot be parsed - - A provided value is invalid or out of range - - The following describes the parameters in more detail: - - .. code-block:: shell - - add variable variable_name variable_value - - add time format - # where format is +hh:mm | hh:mm | hh:mm(start) hh:mm(finish) hh:mm(increment) - - add today format - # where format is +hh:mm | hh:mm | hh:mm(start) hh:mm(finish) hh:mm(increment) - - add date format - # where format is dd.mm.yyyy, and '*' can be used to indicate any day, month or year - - add day format - # where format is one of [ sunday,monday,tuesday,wednesday,friday,saturday ] - - add zombie format - # where format is based on the following grammar - # :: | : - # := [ user | ecf | path ] - # := [ init, event, meter, label, wait, abort, complete ] - # := [ adopt | delete ] - # := [ fob | fail | block(default) ] - # := lifetime of zombie in the server - # For example, to fob all child label requests, and remove zombie as soon as possible: - # 'add zombie :label:fob:0' - - add inlimit '/path/to/node:limit' '12' - # To add an inlimit, depending on '/path/to/node:limit' and value '12' - # Important: - # * an empty inlimit value will add an inlimit with default value of 1 - # * if a 0 or negative value is provided, an exception will be raised - # * if the limit node/name is not found, an exception will be raised - # * if both '-s' and '-n' are provided, an exception will be raised - - add inlimit '/path/to/node:limit' '-s 13' - # To add an inlimit, depending on '/path/to/node:limit' and value '13'. - # By including '-s' the inlimit will affect submissions only. - - add inlimit '/path/to/node:limit' '-n 14' - # To add an inlimit, depending on '/path/to/node:limit' and value '14'. - # By including '-n' the inlimit will affect node only. - - delete variable name - # Important: if name is empty, *all* variables on the node are deleted - - delete time name - # To delete a specific time, enter the time in same format as show above, - # or as specified in the defs file - # an empty name will delete all time attributes on the node - - delete today name - # To delete a specific today attribute, enter in same format as show above, - # or as specified in the defs file. - # an empty name will delete all today attributes on the node - - delete date name - # To delete a specific date attribute, enter in same format as show above, - # or as specified in the defs file - # an empty name will delete all date attributes on the node - - delete day name - # To delete a specific day attribute, enter in same format as show above, - # or as specified in the defs file - # an empty name will delete all day attributes on the node - - delete cron name - # To delete a specific cron attribute, enter in same as specified in the defs file - # an empty name will delete all cron attributes on the node - - delete event name - # To delete a specific event, enter name or number - # an empty name will delete all events on the node - - delete meter name - # To delete a specific meter , enter the meter name - # an empty name will delete all meter on the node - - delete label name - # To delete a specific label , enter the label name - # an empty name will delete all labels on the node - - delete limit name - # To delete a specific limit , enter the limit name - # an empty name will delete all limits on the node - - delete inlimit name - # To delete a specific inlimit , enter the inlimit name - # an empty name will delete all inlimits on the node - - delete limit_path limit_name limit_path - # To delete a specific limit path - - delete trigger - # A node can only have one trigger expression, hence the name is not required - - delete complete - # A node can only have one complete expression, hence the name is not required - - delete repeat - # A node can only have one repeat, hence the name is not required - - change variable name value - # Find the specified variable, and set the new value. - - change clock_type name - # The name must be one of 'hybrid' or 'real'. - - change clock_gain name - # The gain must be convertible to an integer. - - change clock_sync name - # Sync suite calendar with the computer. - - change event name(optional ) - # if no name specified the event is set, otherwise name must be 'set' or 'clear' - - change meter name value - # The meter value must be convertible to an integer, and between meter min-max range. - - change label name value - # sets the label - - change trigger name - # The name must be expression. returns an error if the expression does not parse - - change complete name - # The name must be expression. returns an error if the expression does not parse - - change limit_max name value - # Sets the max value of the limit. The value must be convertible to an integer - - change limit_value name value - # Sets the consumed tokens to value. The value must be convertible to an integer - - change repeat value - # For date repeats, the value must be an yyyymmdd formtted integer, defined in - # the [begin, end] dates range. - # For integer repeats, the value must be an integer, defined in the [begin, end] - # values range. - # For string or enum repeats, the value must either be a valid integer (to be used - # as index) or a string matching a valid enum or strings list value. - - - Usage: - - .. code-block:: python - - try: - ci = Client() # uses default host(ECF_HOST) & port(ECF_PORT) - ci.alter('/suite/task','change','trigger','b2 == complete') - except RuntimeError, e: - print(str(e)) - - -alter( (Client)arg1, (str)abs_node_path, (str)alter_type, (str)attribute_type [, (str)name='' [, (str)value='']]) -> None - - -.. py:method:: Client.archive( (Client)arg1, (str)arg2) -> None : +:: + + void alter( + (list | string ) paths(s) : + One or more paths to the node with the attribute(s) to be altered. + string alter_type : + The type of alteration to perform. + Must be one of [ add, change, delete, set_flag, clear_flag, sort ] + string attr_type : + The type of attribute affected by the alteration. + Depending on the type of alteration, provide one of the following. + for add : [ + variable, time, today, date, day, zombie, event, meter, + late, limit, inlimit, label, aviso, mirror + ] + for delete : [ + variable, time, today, date, day, cron, event, meter, late, generic, + queue, label, trigger, complete, repeat, limit, inlimit, limit_path, + zombie, aviso, mirror + ] + for change : [ + variable, clock_type, clock_gain, clock_date, clock_sync , event, meter + label, trigger , complete, repeat, limit_max, limit_value, defstatus + late, time, today, aviso, mirror + ] + for set_flag or clear_flag: [ + force_aborted, user_edit, task_aborted, edit_failed, ecfcmd_failed, + statuscmd_failed, killcmd_failed, no_script, killed, status, late, + message complete, queue_limit, task_waiting, locked, zombie, archived, + restored, threshold, log_error, checkpt_error + ] + for sort: [ + event, meter, label, variable, limit, all ] + string name : + The name of the attribute(s) to be altered. + Used when multiple attributes of the same type exist e.g. a variable, + a meter, an event or a labet; but optional when changing unnamed attributes, + such as trigger or complete. + string value : + The new/updated value for the attribute. + ) + +This function will raise exceptions because: + +- A provided path does not exist. +- A provided value cannot be parsed +- A provided value is invalid or out of range + +The following describes the parameters in more detail: + +.. code-block:: shell + + add variable variable_name variable_value + + add time format + # where format is +hh:mm | hh:mm | hh:mm(start) hh:mm(finish) hh:mm(increment) + + add today format + # where format is +hh:mm | hh:mm | hh:mm(start) hh:mm(finish) hh:mm(increment) + + add date format + # where format is dd.mm.yyyy, and '*' can be used to indicate any day, month or year + + add day format + # where format is one of [ sunday,monday,tuesday,wednesday,friday,saturday ] + + add zombie format + # where format is based on the following grammar + # :: | : + # := [ user | ecf | path ] + # := [ init, event, meter, label, wait, abort, complete ] + # := [ adopt | delete ] + # := [ fob | fail | block(default) ] + # := lifetime of zombie in the server + # For example, to fob all child label requests, and remove zombie as soon as possible: + # 'add zombie :label:fob:0' + + add inlimit '/path/to/node:limit' '12' + # To add an inlimit, depending on '/path/to/node:limit' and value '12' + # Important: + # * an empty inlimit value will add an inlimit with default value of 1 + # * if a 0 or negative value is provided, an exception will be raised + # * if the limit node/name is not found, an exception will be raised + # * if both '-s' and '-n' are provided, an exception will be raised + + add inlimit '/path/to/node:limit' '-s 13' + # To add an inlimit, depending on '/path/to/node:limit' and value '13'. + # By including '-s' the inlimit will affect submissions only. + + add inlimit '/path/to/node:limit' '-n 14' + # To add an inlimit, depending on '/path/to/node:limit' and value '14'. + # By including '-n' the inlimit will affect node only. + + delete variable name + # Important: if name is empty, *all* variables on the node are deleted + + delete time name + # To delete a specific time, enter the time in same format as show above, + # or as specified in the defs file + # an empty name will delete all time attributes on the node + + delete today name + # To delete a specific today attribute, enter in same format as show above, + # or as specified in the defs file. + # an empty name will delete all today attributes on the node + + delete date name + # To delete a specific date attribute, enter in same format as show above, + # or as specified in the defs file + # an empty name will delete all date attributes on the node + + delete day name + # To delete a specific day attribute, enter in same format as show above, + # or as specified in the defs file + # an empty name will delete all day attributes on the node + + delete cron name + # To delete a specific cron attribute, enter in same as specified in the defs file + # an empty name will delete all cron attributes on the node + + delete event name + # To delete a specific event, enter name or number + # an empty name will delete all events on the node + + delete meter name + # To delete a specific meter , enter the meter name + # an empty name will delete all meter on the node + + delete label name + # To delete a specific label , enter the label name + # an empty name will delete all labels on the node + + delete limit name + # To delete a specific limit , enter the limit name + # an empty name will delete all limits on the node + + delete inlimit name + # To delete a specific inlimit , enter the inlimit name + # an empty name will delete all inlimits on the node + + delete limit_path limit_name limit_path + # To delete a specific limit path + + delete trigger + # A node can only have one trigger expression, hence the name is not required + + delete complete + # A node can only have one complete expression, hence the name is not required + + delete repeat + # A node can only have one repeat, hence the name is not required + + change variable name value + # Find the specified variable, and set the new value. + + change clock_type name + # The name must be one of 'hybrid' or 'real'. + + change clock_gain name + # The gain must be convertible to an integer. + + change clock_sync name + # Sync suite calendar with the computer. + + change event name(optional ) + # if no name specified the event is set, otherwise name must be 'set' or 'clear' + + change meter name value + # The meter value must be convertible to an integer, and between meter min-max range. + + change label name value + # sets the label + + change trigger name + # The name must be expression. returns an error if the expression does not parse + + change complete name + # The name must be expression. returns an error if the expression does not parse + + change limit_max name value + # Sets the max value of the limit. The value must be convertible to an integer + + change limit_value name value + # Sets the consumed tokens to value. The value must be convertible to an integer + + change repeat value + # For date repeats, the value must be an yyyymmdd formtted integer, defined in + # the [begin, end] dates range. + # For integer repeats, the value must be an integer, defined in the [begin, end] + # values range. + # For string or enum repeats, the value must either be a valid integer (to be used + # as index) or a string matching a valid enum or strings list value. + + +Usage: + +.. code-block:: python + + try: + ci = Client() # uses default host(ECF_HOST) & port(ECF_PORT) + ci.alter('/suite/task','change','trigger','b2 == complete') + except RuntimeError, e: + print(str(e)) + + +2. alter(self: ecflow.Client, abs_node_path: str, alter_type: str, attribute_type: str, name: str = '', value: str = '') -> None + + +.. py:method:: Client.archive(*args, **kwargs) :module: ecflow +Overloaded function. + +1. archive(self: ecflow.Client, arg0: str) -> None + Archives suite or family nodes. Saves the suite/family nodes to disk, and then removes then from the definition - This saves memory in the server, when dealing with huge definitions that are not needed. - If the node is re-queued or begun, it is automatically restored - Use --restore to reload the archived nodes manually - The nodes are saved to ECF_HOME/ECF_NAME.check - Usage:: - - string archive( - list paths # List of paths. - ) - string archive( - string absolute_node_path - ) - - Usage: - - .. code-block:: python - - try: - ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) - print ci.archive('/suite1') - except RuntimeError, e: - print str(e) - - -archive( (Client)arg1, (list)arg2) -> None - - -.. py:method:: Client.begin_all_suites( (Client)arg1 [, (bool)force=False]) -> int : +This saves memory in the server, when dealing with huge definitions that are not needed. +If the node is re-queued or begun, it is automatically restored +Use --restore to reload the archived nodes manually +The nodes are saved to ECF_HOME/ECF_NAME.check +Usage:: + + string archive( + list paths # List of paths. + ) + string archive( + string absolute_node_path + ) + +Usage: + +.. code-block:: python + + try: + ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) + print ci.archive('/suite1') + except RuntimeError, e: + print str(e) + + +2. archive(self: ecflow.Client, arg0: list) -> None + + +.. py:method:: Client.begin_all_suites(self: ecflow.Client, force: bool = False) -> int :module: ecflow Begin playing all the :term:`suite`\ s in the :term:`ecflow_server` @@ -334,7 +342,7 @@ Usage: print(str(e)) -.. py:method:: Client.begin_suite( (Client)arg1, (str)suite_name [, (bool)force=False]) -> int : +.. py:method:: Client.begin_suite(self: ecflow.Client, suite_name: str, force: bool = False) -> int :module: ecflow Begin playing the chosen :term:`suite`\ s in the :term:`ecflow_server` @@ -359,129 +367,141 @@ Usage: print(str(e)) -.. py:method:: Client.ch_add( (Client)arg1, (int)arg2, (list)arg3) -> None : +.. py:method:: Client.ch_add(*args, **kwargs) :module: ecflow +Overloaded function. + +1. ch_add(self: ecflow.Client, arg0: typing.SupportsInt | typing.SupportsIndex, arg1: list) -> None + Add a set of suites, to an existing registered handle - - When dealing with large definitions, where a user is only interested in a small subset - of suites, registering them, improves download performance from the server. - Registered suites have an associated handle. - :: - - integer ch_add( - integer handle : the handle obtained after ch_register - list suite_names : list of strings representing suite names - ) - integer ch_add( - list suite_names : list of strings representing suite names - ) - - Usage: - - .. code-block:: python - - try: - with Client() as ci: # use default host(ECF_HOST) & port(ECF_PORT) - ci.ch_register(True,[]) # register interest in any new suites - ci.ch_add(['s1','s2']) # add suites s1,s2 to the last added handle - except RuntimeError, e: - print(str(e)) - - - -ch_add( (Client)arg1, (list)arg2) -> None - - -.. py:method:: Client.ch_auto_add( (Client)arg1, (int)arg2, (bool)arg3) -> int : + +When dealing with large definitions, where a user is only interested in a small subset +of suites, registering them, improves download performance from the server. +Registered suites have an associated handle. +:: + + integer ch_add( + integer handle : the handle obtained after ch_register + list suite_names : list of strings representing suite names + ) + integer ch_add( + list suite_names : list of strings representing suite names + ) + +Usage: + +.. code-block:: python + + try: + with Client() as ci: # use default host(ECF_HOST) & port(ECF_PORT) + ci.ch_register(True,[]) # register interest in any new suites + ci.ch_add(['s1','s2']) # add suites s1,s2 to the last added handle + except RuntimeError, e: + print(str(e)) + + + +2. ch_add(self: ecflow.Client, arg0: list) -> None + + +.. py:method:: Client.ch_auto_add(*args, **kwargs) :module: ecflow +Overloaded function. + +1. ch_auto_add(self: ecflow.Client, arg0: typing.SupportsInt | typing.SupportsIndex, arg1: bool) -> int + Change an existing handle so that new suites can be added automatically - - When dealing with large definitions, where a user is only interested in a small subset - of suites, registering them, improves download performance from the server. - Registered suites have an associated handle. - :: - - void ch_auto_add( - integer handle, : the handle obtained after ch_register - bool auto_add_new_suite : automatically add new suites, this handle when they are created - ) - void ch_auto_add( - bool auto_add_new_suite : automatically add new suites using handle on the client - ) - - Usage: - - .. code-block:: python - - try: - with Client() as ci: # use default host(ECF_HOST) & port(ECF_PORT) - ci.ch_register(True,['s1','s2','s3']) # register interest in suites s1,s2,s3 and any new suites - ci.ch_auto_add( False ) # disable adding newly created suites to my handle - except RuntimeError, e: - print(str(e)) - - - -ch_auto_add( (Client)arg1, (bool)arg2) -> int - - -.. py:method:: Client.ch_drop( (Client)arg1, (int)arg2) -> int : + +When dealing with large definitions, where a user is only interested in a small subset +of suites, registering them, improves download performance from the server. +Registered suites have an associated handle. +:: + + void ch_auto_add( + integer handle, : the handle obtained after ch_register + bool auto_add_new_suite : automatically add new suites, this handle when they are created + ) + void ch_auto_add( + bool auto_add_new_suite : automatically add new suites using handle on the client + ) + +Usage: + +.. code-block:: python + + try: + with Client() as ci: # use default host(ECF_HOST) & port(ECF_PORT) + ci.ch_register(True,['s1','s2','s3']) # register interest in suites s1,s2,s3 and any new suites + ci.ch_auto_add( False ) # disable adding newly created suites to my handle + except RuntimeError, e: + print(str(e)) + + + +2. ch_auto_add(self: ecflow.Client, arg0: bool) -> int + + +.. py:method:: Client.ch_drop(*args, **kwargs) :module: ecflow +Overloaded function. + +1. ch_drop(self: ecflow.Client, arg0: typing.SupportsInt | typing.SupportsIndex) -> int + Drop/de-register the client handle. - - When dealing with large definitions, where a user is only interested in a small subset - of suites, registering them, improves download performance from the server. - Registered suites have an associated handle. - Client must ensure un-used handle are dropped otherwise they will stay, in the :term:`ecflow_server` - :: - - void ch_drop( - int client_handle : The handle must be an integer that is > 0 - ) - void ch_drop() : Uses the local handle stored on the client, from last call to ch_register() - - Exception: - - - RunTimeError thrown if handle has not been previously registered - - Usage: - - .. code-block:: python - + +When dealing with large definitions, where a user is only interested in a small subset +of suites, registering them, improves download performance from the server. +Registered suites have an associated handle. +Client must ensure un-used handle are dropped otherwise they will stay, in the :term:`ecflow_server` +:: + + void ch_drop( + int client_handle : The handle must be an integer that is > 0 + ) + void ch_drop() : Uses the local handle stored on the client, from last call to ch_register() + +Exception: + +- RunTimeError thrown if handle has not been previously registered + +Usage: + +.. code-block:: python + try: - ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) + ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) + ci.ch_register(False,['s1','s2']) + while( 1 ): + # get incremental changes to suites s1 & s2, uses data stored on ci/defs + ci.sync_local() # will only retrieve data for suites s1 & s2 + update(ci.get_defs()) + finally: + ci.ch_drop() + +To automatically drop the handle(Preferred) use with +: + +.. code-block:: python + + try: + with Client() as ci: ci.ch_register(False,['s1','s2']) while( 1 ): - # get incremental changes to suites s1 & s2, uses data stored on ci/defs - ci.sync_local() # will only retrieve data for suites s1 & s2 - update(ci.get_defs()) - finally: - ci.ch_drop() - - To automatically drop the handle(Preferred) use with - : - - .. code-block:: python - - try: - with Client() as ci: - ci.ch_register(False,['s1','s2']) - while( 1 ): - # get incremental changes to suites s1 & s2, uses data stored on ci/defs - ci.sync_local() # will only retrieve data for suites s1 & s2 - update(ci.get_defs()) - .... # will automatically drop last handle - except RuntimeError, e: - print(str(e)) - - -ch_drop( (Client)arg1) -> int - - -.. py:method:: Client.ch_drop_user( (Client)arg1, (str)arg2) -> int : + # get incremental changes to suites s1 & s2, uses data stored on ci/defs + ci.sync_local() # will only retrieve data for suites s1 & s2 + update(ci.get_defs()) + .... # will automatically drop last handle + except RuntimeError, e: + print(str(e)) + + +2. ch_drop(self: ecflow.Client) -> int + + +.. py:method:: Client.ch_drop_user(self: ecflow.Client, arg0: str) -> int :module: ecflow Drop/de-register all handles associated with user. @@ -514,8 +534,7 @@ Usage: ci.ch_drop_user('') # drop all handles associated with current user - -.. py:method:: Client.ch_handle( (Client)arg1) -> int : +.. py:method:: Client.ch_handle(self: ecflow.Client) -> int :module: ecflow Register interest in a set of :term:`suite`\ s. @@ -572,7 +591,7 @@ To automatically drop the handle(preferred) use with: print(str(e)) -.. py:method:: Client.ch_register( (Client)arg1, (bool)arg2, (list)arg3) -> None : +.. py:method:: Client.ch_register(self: ecflow.Client, arg0: bool, arg1: list) -> None :module: ecflow Register interest in a set of :term:`suite`\ s. @@ -629,41 +648,45 @@ To automatically drop the handle(preferred) use with: print(str(e)) -.. py:method:: Client.ch_remove( (Client)arg1, (int)arg2, (list)arg3) -> None : +.. py:method:: Client.ch_remove(*args, **kwargs) :module: ecflow +Overloaded function. + +1. ch_remove(self: ecflow.Client, arg0: typing.SupportsInt | typing.SupportsIndex, arg1: list) -> None + Remove a set of suites, from an existing handle - - When dealing with large definitions, where a user is only interested in a small subset - of suites, registering them, improves download performance from the server. - Registered suites have an associated handle. - :: - - integer ch_remove( - integer handle : the handle obtained after ch_register - list suite_names : list of strings representing suite names - ) - integer ch_remove( - list suite_names : list of strings representing suite names - ) - - Usage: - - .. code-block:: python - - try: - with Client() as ci: # use default host(ECF_HOST) & port(ECF_PORT) - ci.ch_register(True,['s1','s2','s3']) # register interest in suites s1,s2,s3 and any new suites - ci.ch_remove( ['s1'] ) # remove suites s1 from the last added handle - except RuntimeError, e: - print(str(e)) - - - -ch_remove( (Client)arg1, (list)arg2) -> None - - -.. py:method:: Client.ch_suites( (Client)arg1) -> None : + +When dealing with large definitions, where a user is only interested in a small subset +of suites, registering them, improves download performance from the server. +Registered suites have an associated handle. +:: + + integer ch_remove( + integer handle : the handle obtained after ch_register + list suite_names : list of strings representing suite names + ) + integer ch_remove( + list suite_names : list of strings representing suite names + ) + +Usage: + +.. code-block:: python + + try: + with Client() as ci: # use default host(ECF_HOST) & port(ECF_PORT) + ci.ch_register(True,['s1','s2','s3']) # register interest in suites s1,s2,s3 and any new suites + ci.ch_remove( ['s1'] ) # remove suites s1 from the last added handle + except RuntimeError, e: + print(str(e)) + + + +2. ch_remove(self: ecflow.Client, arg0: list) -> None + + +.. py:method:: Client.ch_suites(self: ecflow.Client) -> None :module: ecflow Writes to standard out the list of registered handles and the suites they reference. @@ -709,38 +732,42 @@ Usage: print(str(e)) -.. py:method:: Client.check( (Client)arg1, (str)arg2) -> str : +.. py:method:: Client.check(*args, **kwargs) :module: ecflow +Overloaded function. + +1. check(self: ecflow.Client, arg0: str) -> str + Check :term:`trigger` and :term:`complete expression`\ s and :term:`limit`\ s - - The :term:`ecflow_server` does not store :term:`extern`\ s. Hence all unresolved references - are reported as errors. - Returns a non empty string for any errors or warning - :: - - string check( - list paths # List of paths. - ) - string check( - string absolute_node_path - ) - - Usage: - - .. code-block:: python - - try: - ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) - print(ci.check('/suite1')) - except RuntimeError, e: - print(str(e)) - - -check( (Client)arg1, (list)arg2) -> str - - -.. py:method:: Client.checkpt( (Client)arg1 [, (CheckPt)mode=ecflow.CheckPt.UNDEFINED [, (int)check_pt_interval=0 [, (int)check_pt_save_alarm_time=0]]]) -> int : + +The :term:`ecflow_server` does not store :term:`extern`\ s. Hence all unresolved references +are reported as errors. +Returns a non empty string for any errors or warning +:: + + string check( + list paths # List of paths. + ) + string check( + string absolute_node_path + ) + +Usage: + +.. code-block:: python + + try: + ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) + print(ci.check('/suite1')) + except RuntimeError, e: + print(str(e)) + + +2. check(self: ecflow.Client, arg0: list) -> str + + +.. py:method:: Client.checkpt(self: ecflow.Client, mode: ecflow.CheckPt = , check_pt_interval: typing.SupportsInt | typing.SupportsIndex = 0, check_pt_save_alarm_time: typing.SupportsInt | typing.SupportsIndex = 0) -> int :module: ecflow Request the :term:`ecflow_server` :term:`check point`\ s the definition held in the server immediately @@ -793,55 +820,55 @@ Usage: print(str(e)) -.. py:method:: Client.child_abort( (Client)arg1 [, (str)reason='']) -> None : +.. py:method:: Client.child_abort(self: ecflow.Client, reason: str = '') -> None :module: ecflow Child command,notify server job has aborted, can provide an optional reason -.. py:method:: Client.child_complete( (Client)arg1) -> None : +.. py:method:: Client.child_complete(self: ecflow.Client) -> None :module: ecflow Child command,notify server job has complete -.. py:method:: Client.child_event( (Client)arg1, (str)event_name [, (bool)value=True]) -> None : +.. py:method:: Client.child_event(self: ecflow.Client, event_name: str, value: bool = True) -> None :module: ecflow Child command,notify server event occurred, requires the event name -.. py:method:: Client.child_init( (Client)arg1) -> None : +.. py:method:: Client.child_init(self: ecflow.Client) -> None :module: ecflow Child command,notify server job has started -.. py:method:: Client.child_label( (Client)arg1, (str)arg2, (str)arg3) -> None : +.. py:method:: Client.child_label(self: ecflow.Client, arg0: str, arg1: str) -> None :module: ecflow Child command,notify server label changed, requires label name, and new value -.. py:method:: Client.child_meter( (Client)arg1, (str)arg2, (int)arg3) -> None : +.. py:method:: Client.child_meter(self: ecflow.Client, arg0: str, arg1: typing.SupportsInt | typing.SupportsIndex) -> None :module: ecflow Child command,notify server meter changed, requires meter name and value -.. py:method:: Client.child_queue( (Client)arg1, (str)queue_name, (str)action [, (str)step='' [, (str)path_to_node_with_queue='']]) -> str : +.. py:method:: Client.child_queue(self: ecflow.Client, queue_name: str, action: str, step: str = '', path_to_node_with_queue: str = '') -> str :module: ecflow -Child command,active:return current step as string, then increment index, requires queue name, and optionally path to node with the queue +Child command,active:return current step as string, then increment index,requires queue name, and optionally path to node with the queue -.. py:method:: Client.child_wait( (Client)arg1, (str)arg2) -> None : +.. py:method:: Client.child_wait(self: ecflow.Client, arg0: str) -> None :module: ecflow Child command,wait for expression to come true -.. py:method:: Client.clear_log( (Client)arg1) -> int : +.. py:method:: Client.clear_log(self: ecflow.Client) -> int :module: ecflow Request the :term:`ecflow_server` to clear log file. @@ -860,62 +887,66 @@ Usage: print(str(e)) -.. py:method:: Client.debug( (Client)arg1, (bool)arg2) -> None : +.. py:method:: Client.debug(self: ecflow.Client, arg0: bool) -> None :module: ecflow enable/disable client api debug -.. py:method:: Client.debug_server_off( (Client)arg1) -> int : +.. py:method:: Client.debug_server_off(self: ecflow.Client) -> int :module: ecflow Disable server debug -.. py:method:: Client.debug_server_on( (Client)arg1) -> int : +.. py:method:: Client.debug_server_on(self: ecflow.Client) -> int :module: ecflow Enable server debug, Will dump to standard out on server host. -.. py:method:: Client.delete( (Client)arg1, (str)abs_node_path [, (bool)force=False]) -> int : +.. py:method:: Client.delete(*args, **kwargs) :module: ecflow +Overloaded function. + +1. delete(self: ecflow.Client, abs_node_path: str, force: bool = False) -> int + Delete the :term:`node` (s) specified. - - If a node is :term:`submitted` or :term:`active`, then a Exception will be raised. - To force the deletion at the expense of :term:`zombie` creation, then set - the force parameter to true - :: - - void delete( - list paths : List of paths. - [(bool)force=False] : If true delete even if in 'active' or 'submitted' states - Which risks creating zombies. - ) - void delete( - string absolute_node_path: Path name of node to delete. - [(bool)force=False] : If true delete even if in 'active' or 'submitted' states - ) - - Usage: - - .. code-block:: python - - try: - ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) - ci.delete('/s1/f1/task1') - - paths = ['/s1/f1/t1','/s2/f1/t2'] - ci.delete(paths) # delete all tasks specified in the paths - except RuntimeError, e: - print(str(e)) - - -delete( (Client)arg1, (list)paths [, (bool)force=False]) -> None - - -.. py:method:: Client.delete_all( (Client)arg1 [, (bool)force=False]) -> int : + +If a node is :term:`submitted` or :term:`active`, then a Exception will be raised. +To force the deletion at the expense of :term:`zombie` creation, then set +the force parameter to true +:: + + void delete( + list paths : List of paths. + [(bool)force=False] : If true delete even if in 'active' or 'submitted' states + Which risks creating zombies. + ) + void delete( + string absolute_node_path: Path name of node to delete. + [(bool)force=False] : If true delete even if in 'active' or 'submitted' states + ) + +Usage: + +.. code-block:: python + + try: + ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) + ci.delete('/s1/f1/task1') + + paths = ['/s1/f1/t1','/s2/f1/t2'] + ci.delete(paths) # delete all tasks specified in the paths + except RuntimeError, e: + print(str(e)) + + +2. delete(self: ecflow.Client, paths: list, force: bool = False) -> None + + +.. py:method:: Client.delete_all(self: ecflow.Client, force: bool = False) -> int :module: ecflow Delete all the :term:`node`\ s held in the :term:`ecflow_server`. @@ -943,7 +974,7 @@ Usage: print(str(e)); # expect failure since all nodes deleted -.. py:method:: Client.disable_ssl( (Client)arg1) -> None : +.. py:method:: Client.disable_ssl(self: ecflow.Client) -> None :module: ecflow Disable secure communication between client and server. @@ -961,21 +992,19 @@ Usage: print(str(e)) -.. py:method:: Client.edit_script_edit( (Client)arg1, (str)arg2) -> str : +.. py:method:: Client.edit_script_edit(self: ecflow.Client, arg0: str) -> str :module: ecflow get script for Edit - -.. py:method:: Client.edit_script_preprocess( (Client)arg1, (str)arg2) -> str : +.. py:method:: Client.edit_script_preprocess(self: ecflow.Client, arg0: str) -> str :module: ecflow get script for Edit Preprocess - -.. py:method:: Client.edit_script_submit( (Client)arg1, (str)arg2, (list)arg3, (list)arg4, (bool)arg5, (bool)arg6) -> int : +.. py:method:: Client.edit_script_submit(self: ecflow.Client, arg0: str, arg1: list, arg2: list, arg3: bool, arg4: bool) -> int :module: ecflow submit script from Edit/Preprocess @@ -985,26 +1014,26 @@ to run as alias or not: ci = Client() ci.edit_script_submit(path_to_task, - used_variables, # array name=value - file_contents, # strings array - alias, # bool False, - run # bool true + used_variables, # array name=value + file_contents, # strings array + alias, # bool False, + run # bool true ) -.. py:method:: Client.enable_http( (Client)arg1) -> None : +.. py:method:: Client.enable_http(self: ecflow.Client) -> None :module: ecflow Enable HTTP communication -.. py:method:: Client.enable_https( (Client)arg1) -> None : +.. py:method:: Client.enable_https(self: ecflow.Client) -> None :module: ecflow Enable HTTPS communication -.. py:method:: Client.enable_ssl( (Client)arg1) -> None : +.. py:method:: Client.enable_ssl(self: ecflow.Client) -> None :module: ecflow Enable secure communication between client and server. @@ -1022,7 +1051,7 @@ Usage: print(str(e)) -.. py:method:: Client.flush_log( (Client)arg1) -> int : +.. py:method:: Client.flush_log(self: ecflow.Client) -> int :module: ecflow Request the :term:`ecflow_server` to flush and then close log file @@ -1041,232 +1070,260 @@ Usage: print(str(e)) -.. py:method:: Client.force_event( (Client)arg1, (str)arg2, (str)arg3) -> None : +.. py:method:: Client.force_event(*args, **kwargs) :module: ecflow +Overloaded function. + +1. force_event(self: ecflow.Client, arg0: str, arg1: str) -> None + Set or clear a :term:`event` - :: - - void force_event( - string absolute_node_path:event: Path name to node: < event name | number> - The paths must begin with a leading '/' - string signal : [ set | clear ] - ) - void force_event( - list paths : A list of absolute node paths. Each path must include a event name - The paths must begin with a leading '/' - string signal : [ set | clear ] - ) - - Usage: - - .. code-block:: python - - try: - ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) - ci.force_event('/s1/f1:event_name','set') - - # Set or clear a event for a list of events - paths = [ '/s1/t1:ev1', '/s2/t2:ev2' ] - ci.force_event(paths,'clear') - except RuntimeError, e: - print(str(e)) - - -force_event( (Client)arg1, (list)arg2, (str)arg3) -> None - - -.. py:method:: Client.force_state( (Client)arg1, (str)arg2, (State)arg3) -> None : +:: + + void force_event( + string absolute_node_path:event: Path name to node: < event name | number> + The paths must begin with a leading '/' + string signal : [ set | clear ] + ) + void force_event( + list paths : A list of absolute node paths. Each path must include a event name + The paths must begin with a leading '/' + string signal : [ set | clear ] + ) + +Usage: + +.. code-block:: python + + try: + ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) + ci.force_event('/s1/f1:event_name','set') + + # Set or clear a event for a list of events + paths = [ '/s1/t1:ev1', '/s2/t2:ev2' ] + ci.force_event(paths,'clear') + except RuntimeError, e: + print(str(e)) + + +2. force_event(self: ecflow.Client, arg0: list, arg1: str) -> None + + +.. py:method:: Client.force_state(*args, **kwargs) :module: ecflow +Overloaded function. + +1. force_state(self: ecflow.Client, arg0: str, arg1: ecflow.State) -> None + Force a node(s) to a given state - - When a :term:`task` is set to :term:`complete`, it may be automatically re-queued if it has - multiple time :term:`dependencies`. In the specific case where a task has a single - time dependency and we want to interactively set it to :term:`complete` - a flag is set so that it is not automatically re-queued when set to complete. - The flag is applied up the node hierarchy until reach a node with a :term:`repeat` - or :term:`cron` attribute. This behaviour allow :term:`repeat` values to be incremented interactively. - A :term:`repeat` attribute is incremented when all the child nodes are :term:`complete` - in this case the child nodes are automatically re-queued - :: - - void force_state( - string absolute_node_path: Path name to node. The path must begin with a leading '/' - State::State state : [ unknown | complete | queued | submitted | active | aborted ] - ) - void force_state( - list paths : A list of absolute node paths. The paths must begin with a leading '/' - State::State state : [ unknown | complete | queued | submitted | active | aborted ] - ) - - Usage: - - .. code-block:: python - - try: - ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) - # force a single node to complete - ci.force_state('/s1/f1',State.complete) - - # force a list of nodes to complete - paths = [ '/s1/t1', '/s1/t2', '/s1/f1/t1' ] - ci.force_state(paths,State.complete) - except RuntimeError, e: - print(str(e)) - - Effect: - - Lets see the effect of forcing complete on the following defs - - .. code-block:: shell - - suite s1 - task t1; time 10:00 # will complete straight away - task t2; time 10:00 13:00 01:00 # will re-queue 3 times and complete on fourth - - In the last case (task t2) after each force complete, the next time slot is incremented. - This can be seen by calling the Why command. - -force_state( (Client)arg1, (list)arg2, (State)arg3) -> None - - -.. py:method:: Client.force_state_recursive( (Client)arg1, (str)arg2, (State)arg3) -> None : + +When a :term:`task` is set to :term:`complete`, it may be automatically re-queued if it has +multiple time :term:`dependencies`. In the specific case where a task has a single +time dependency and we want to interactively set it to :term:`complete` +a flag is set so that it is not automatically re-queued when set to complete. +The flag is applied up the node hierarchy until reach a node with a :term:`repeat` +or :term:`cron` attribute. This behaviour allow :term:`repeat` values to be incremented interactively. +A :term:`repeat` attribute is incremented when all the child nodes are :term:`complete` +in this case the child nodes are automatically re-queued +:: + + void force_state( + string absolute_node_path: Path name to node. The path must begin with a leading '/' + State::State state : [ unknown | complete | queued | submitted | active | aborted ] + ) + void force_state( + list paths : A list of absolute node paths. The paths must begin with a leading '/' + State::State state : [ unknown | complete | queued | submitted | active | aborted ] + ) + +Usage: + +.. code-block:: python + + try: + ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) + # force a single node to complete + ci.force_state('/s1/f1',State.complete) + + # force a list of nodes to complete + paths = [ '/s1/t1', '/s1/t2', '/s1/f1/t1' ] + ci.force_state(paths,State.complete) + except RuntimeError, e: + print(str(e)) + +Effect: + +Lets see the effect of forcing complete on the following defs + +.. code-block:: shell + + suite s1 + task t1; time 10:00 # will complete straight away + task t2; time 10:00 13:00 01:00 # will re-queue 3 times and complete on fourth + +In the last case (task t2) after each force complete, the next time slot is incremented. +This can be seen by calling the Why command. + +2. force_state(self: ecflow.Client, arg0: list, arg1: ecflow.State) -> None + + +.. py:method:: Client.force_state_recursive(*args, **kwargs) :module: ecflow +Overloaded function. + +1. force_state_recursive(self: ecflow.Client, arg0: str, arg1: ecflow.State) -> None + Force node(s) to a given state recursively - :: - - void force_state_recursive( - string absolute_node_path: Path name to node.The paths must begin with a leading '/' - State::State state : [ unknown | complete | queued | submitted | active | aborted ] - ) - void force_state_recursive( - list paths : A list of absolute node paths.The paths must begin with a leading '/' - State::State state : [ unknown | complete | queued | submitted | active | aborted ] - ) - - Usage: - - .. code-block:: python - - try: - ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) - ci.force_state_recursive('/s1/f1',State.complete) - - # recursively force a list of nodes to complete - paths = [ '/s1', '/s2', '/s1/f1/t1' ] - ci.force_state_recursive(paths,State.complete) - except RuntimeError, e: - print(str(e)) - - -force_state_recursive( (Client)arg1, (list)arg2, (State)arg3) -> None - - -.. py:method:: Client.free_all_dep( (Client)arg1, (str)arg2) -> None : +:: + + void force_state_recursive( + string absolute_node_path: Path name to node.The paths must begin with a leading '/' + State::State state : [ unknown | complete | queued | submitted | active | aborted ] + ) + void force_state_recursive( + list paths : A list of absolute node paths.The paths must begin with a leading '/' + State::State state : [ unknown | complete | queued | submitted | active | aborted ] + ) + +Usage: + +.. code-block:: python + + try: + ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) + ci.force_state_recursive('/s1/f1',State.complete) + + # recursively force a list of nodes to complete + paths = [ '/s1', '/s2', '/s1/f1/t1' ] + ci.force_state_recursive(paths,State.complete) + except RuntimeError, e: + print(str(e)) + + +2. force_state_recursive(self: ecflow.Client, arg0: list, arg1: ecflow.State) -> None + + +.. py:method:: Client.free_all_dep(*args, **kwargs) :module: ecflow +Overloaded function. + +1. free_all_dep(self: ecflow.Client, arg0: str) -> None + Free all :term:`trigger`, :term:`date` and all time(:term:`day`, :term:`today`, :term:`cron`,etc) :term:`dependencies` - :: - - void free_all_dep( - string absolute_node_path : Path name to node - ) - - After freeing the time related dependencies (i.e time,today,cron) - the next time slot will be missed. - - Usage: - - .. code-block:: python - - try: - ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) - ci.free_all_dep('/s1/task') - except RuntimeError, e: - print(str(e)) - - -free_all_dep( (Client)arg1, (list)arg2) -> None - - -.. py:method:: Client.free_date_dep( (Client)arg1, (str)arg2) -> None : +:: + + void free_all_dep( + string absolute_node_path : Path name to node + ) + +After freeing the time related dependencies (i.e time,today,cron) +the next time slot will be missed. + +Usage: + +.. code-block:: python + + try: + ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) + ci.free_all_dep('/s1/task') + except RuntimeError, e: + print(str(e)) + + +2. free_all_dep(self: ecflow.Client, arg0: list) -> None + + +.. py:method:: Client.free_date_dep(*args, **kwargs) :module: ecflow +Overloaded function. + +1. free_date_dep(self: ecflow.Client, arg0: str) -> None + Free :term:`date` :term:`dependencies` for a :term:`node` - :: - - void free_date_dep( - string absolute_node_path : Path name to node - ) - - Usage: - - .. code-block:: python - - try: - ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) - ci.free_date_dep('/s1/task') - except RuntimeError, e: - print(str(e)) - +:: -free_date_dep( (Client)arg1, (list)arg2) -> None + void free_date_dep( + string absolute_node_path : Path name to node + ) +Usage: + +.. code-block:: python -.. py:method:: Client.free_time_dep( (Client)arg1, (str)arg2) -> None : + try: + ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) + ci.free_date_dep('/s1/task') + except RuntimeError, e: + print(str(e)) + + +2. free_date_dep(self: ecflow.Client, arg0: list) -> None + + +.. py:method:: Client.free_time_dep(*args, **kwargs) :module: ecflow +Overloaded function. + +1. free_time_dep(self: ecflow.Client, arg0: str) -> None + Free all time :term:`dependencies`. i.e :term:`time`, :term:`day`, :term:`today`, :term:`cron` - :: - - void free_time_dep( - string absolute_node_path : Path name to node - ) - - After freeing the time related dependencies (i.e time,today,cron) - the next time slot will be missed. - - Usage: - - .. code-block:: python - - try: - ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) - ci.free_time_dep('/s1/task') - except RuntimeError, e: - print(str(e)) - - -free_time_dep( (Client)arg1, (list)arg2) -> None - - -.. py:method:: Client.free_trigger_dep( (Client)arg1, (str)arg2) -> None : +:: + + void free_time_dep( + string absolute_node_path : Path name to node + ) + +After freeing the time related dependencies (i.e time,today,cron) +the next time slot will be missed. + +Usage: + +.. code-block:: python + + try: + ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) + ci.free_time_dep('/s1/task') + except RuntimeError, e: + print(str(e)) + + +2. free_time_dep(self: ecflow.Client, arg0: list) -> None + + +.. py:method:: Client.free_trigger_dep(*args, **kwargs) :module: ecflow +Overloaded function. + +1. free_trigger_dep(self: ecflow.Client, arg0: str) -> None + Free :term:`trigger` :term:`dependencies` for a :term:`node` - :: - - void free_trigger_dep( - string absolute_node_path : Path name to node - ) - - Usage: - - .. code-block:: python - - try: - ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) - ci.free_trigger_dep('/s1/f1/task') - except RuntimeError, e: - print(str(e)) - +:: + + void free_trigger_dep( + string absolute_node_path : Path name to node + ) + +Usage: + +.. code-block:: python + + try: + ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) + ci.free_trigger_dep('/s1/f1/task') + except RuntimeError, e: + print(str(e)) -free_trigger_dep( (Client)arg1, (list)arg2) -> None +2. free_trigger_dep(self: ecflow.Client, arg0: list) -> None -.. py:method:: Client.get_certificate( (Client)arg1) -> str : + +.. py:method:: Client.get_certificate(self: ecflow.Client) -> str :module: ecflow Retrieves the full path to the secure communication certificate currently used by the client. @@ -1284,7 +1341,7 @@ Usage: print(str(e)) -.. py:method:: Client.get_defs( (Client)arg1) -> Defs : +.. py:method:: Client.get_defs(self: ecflow.Client) -> ecflow.Defs :module: ecflow Returns the :term:`suite definition` stored on the Client. @@ -1305,7 +1362,7 @@ Usage: print(str(e)) -.. py:method:: Client.get_file( (Client)arg1, (str)task [, (str)type='script' [, (str)max_lines='10000' [, (bool)as_bytes=False]]]) -> object : +.. py:method:: Client.get_file(self: ecflow.Client, task: str, type: str = 'script', max_lines: str = '10000', as_bytes: bool = False) -> object :module: ecflow The File command is used to request the various file types associated with a :term:`node`. @@ -1334,13 +1391,13 @@ Usage: print(str(e)) -.. py:method:: Client.get_host( (Client)arg1) -> str : +.. py:method:: Client.get_host(self: ecflow.Client) -> str :module: ecflow -Return the host, assume set_host_port() has been set, otherwise return localhost +Returns the host, assume set_host_port() has been set, otherwise return localhost -.. py:method:: Client.get_log( (Client)arg1, (int)arg2) -> str : +.. py:method:: Client.get_log(self: ecflow.Client, arg0: typing.SupportsInt | typing.SupportsIndex) -> str :module: ecflow Request the :term:`ecflow_server` to return the log file contents as a string @@ -1359,13 +1416,13 @@ Usage: print(str(e)) -.. py:method:: Client.get_port( (Client)arg1) -> str : +.. py:method:: Client.get_port(self: ecflow.Client) -> str :module: ecflow -Return the port, assume set_host_port() has been set. otherwise returns 3141 +Returns the port, assume set_host_port() has been set, otherwise returns 3141 -.. py:method:: Client.get_server_defs( (Client)arg1) -> int : +.. py:method:: Client.get_server_defs(self: ecflow.Client) -> int :module: ecflow Get all suite Node tree's from the :term:`ecflow_server`. @@ -1390,7 +1447,7 @@ Usage: print(str(e)) -.. py:method:: Client.group( (Client)arg1, (str)arg2) -> int : +.. py:method:: Client.group(self: ecflow.Client, arg0: str) -> int :module: ecflow Allows a series of commands to be executed in the :term:`ecflow_server` @@ -1412,7 +1469,7 @@ Usage: print(str(e)) -.. py:method:: Client.halt_server( (Client)arg1) -> int : +.. py:method:: Client.halt_server(self: ecflow.Client) -> int :module: ecflow Halt the :term:`ecflow_server` @@ -1431,176 +1488,184 @@ Usage: print(str(e)) -.. py:method:: Client.in_sync( (Client)arg1) -> bool : +.. py:method:: Client.in_sync(self: ecflow.Client) -> bool + :module: ecflow + +Returns true if the definition on the client is in sync with the :term:`ecflow_server` + +.. Warning:: Calling in_sync() is **only** valid after a call to sync_local(). + +Usage: + +.. code-block:: python + + try: + ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) + ci.sync_local() # very first call gets the full Defs + client_defs = ci.get_defs() # End user access to the returned Defs + ... after a period of time + ci.sync_local() # Subsequent calls to sync_local() users the local Defs to sync incrementally + if ci.in_sync(): # returns true changed and changes applied to client + print('Client is now in sync with server') + client_defs = ci.get_defs() # End user access to the returned Defs + except RuntimeError, e: + print(str(e)) + + +.. py:method:: Client.is_auto_sync_enabled(self: ecflow.Client) -> bool + :module: ecflow + +Returns true if automatic syncing enabled + + +.. py:method:: Client.job_generation(self: ecflow.Client, arg0: str) -> int + :module: ecflow + +Job submission for chosen Node *based* on :term:`dependencies` + +The :term:`ecflow_server` traverses the :term:`node` tree every 60 seconds, and if the dependencies are free +does `job creation` and submission. Sometimes the user may free time/date dependencies +to avoid waiting for the server poll, this commands allows early job generation +:: + + void job_generation( + string absolute_node_path: Path name for job generation to start from + ) + If empty string specified generates for full definition. + +Usage: + +.. code-block:: python + + try: + ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) + ci.job_generation('/s1') # generate jobs for suite '/s1 + except RuntimeError, e: + print(str(e)) + + +.. py:method:: Client.kill(*args, **kwargs) + :module: ecflow + +Overloaded function. + +1. kill(self: ecflow.Client, arg0: str) -> None + +Kills the job associated with the :term:`node` +:: + + void kill( + list paths: List of paths. Paths must begin with a leading '/' character + ) + void kill( + string absolute_node_path: Path name to node to kill. + ) + +If a :term:`family` or :term:`suite` is selected, will kill hierarchically. +Kill uses the ECF_KILL_CMD variable. After :term:`variable substitution` it is invoked as a command. +The ECF_KILL_CMD variable should be written in such a way that the output is written to %ECF_JOB%.kill, i.e: + +.. code-block:: shell + + kill -15 %ECF_RID% > %ECF_JOB%.kill 2>&1 + /home/ma/emos/bin/ecfkill %USER% %HOST% %ECF_RID% %ECF_JOB% > %ECF_JOB%.kill 2>&1 + + +Exceptions can be raised because: + +- The absolute_node_path does not exist in the server +- ECF_KILL_CMD variable is not defined +- :term:`variable substitution` fails + +Usage: + +.. code-block:: python + + try: + ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) + ci.kill('/s1/f1') + time.sleep(2) + print(ci.file('/s1/t1','kill')) # request kill output + except RuntimeError, e: + print(str(e)) + + +2. kill(self: ecflow.Client, arg0: list) -> None + + +.. py:method:: Client.load(*args, **kwargs) :module: ecflow -Returns true if the definition on the client is in sync with the :term:`ecflow_server` +Overloaded function. -.. Warning:: Calling in_sync() is **only** valid after a call to sync_local(). +1. load(self: ecflow.Client, path_to_defs: str, force: bool = False, check_only: bool = False, print: bool = False, stats: bool = False) -> int + +Load a :term:`suite definition` or checkpoint file given by the file_path argument into the :term:`ecflow_server` +:: + + void load( + string file_path : path name to the definition file + [(bool)force=False] : If true overwrite suite of same name + [(bool)print=False] : print parsed defs to standard out + ) + +By default throws a RuntimeError exception for errors. +If force is not used and :term:`suite` of the same name already exists in the server, +then a error is thrown Usage: .. code-block:: python + defs_file = 'Hello.def' + defs = Defs() + suite = def.add_suite('s1') + family = suite.add_family('f1') + for i in [ '_1', '_2', '_3' ]: + family.add_task( 't' + i ) + defs.save_as_defs(defs_file) # write out in memory defs into the file 'Hello.def' + ... try: - ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) - ci.sync_local() # very first call gets the full Defs - client_defs = ci.get_defs() # End user access to the returned Defs - ... after a period of time - ci.sync_local() # Subsequent calls to sync_local() users the local Defs to sync incrementally - if ci.in_sync(): # returns true changed and changes applied to client - print('Client is now in sync with server') - client_defs = ci.get_defs() # End user access to the returned Defs + ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) + ci.load(defs_file) # open and parse defs or checkpoint file, and load into server. except RuntimeError, e: print(str(e)) -.. py:method:: Client.is_auto_sync_enabled( (Client)arg1) -> bool : - :module: ecflow - -Returns true if automatic syncing enabled - - -.. py:method:: Client.job_generation( (Client)arg1, (str)arg2) -> int : - :module: ecflow - -Job submission for chosen Node *based* on :term:`dependencies` +2. load(self: ecflow.Client, defs: ecflow.Defs, force: bool = False) -> int -The :term:`ecflow_server` traverses the :term:`node` tree every 60 seconds, and if the dependencies are free -does `job creation` and submission. Sometimes the user may free time/date dependencies -to avoid waiting for the server poll, this commands allows early job generation +Load a in memory :term:`suite definition` into the :term:`ecflow_server` :: - void job_generation( - string absolute_node_path: Path name for job generation to start from + void load( + Defs defs : A in memory definition + [(bool)force=False] : for true overwrite suite of same name ) - If empty string specified generates for full definition. + +If force is not used and :term:`suite` already exists in the server, then a error is thrown. Usage: .. code-block:: python + defs = Defs() + suite = defs.add_suite('s1') + family = suite.add_family('f1') + for i in [ '_1', '_2', '_3' ]: + family.add_task( Task( 't' + i) ) + ... try: ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) - ci.job_generation('/s1') # generate jobs for suite '/s1 + ci.load(defs) # Load in memory defs, into the server except RuntimeError, e: print(str(e)) -.. py:method:: Client.kill( (Client)arg1, (str)arg2) -> None : +.. py:method:: Client.log_msg(self: ecflow.Client, arg0: str) -> int :module: ecflow -Kills the job associated with the :term:`node` - :: - - void kill( - list paths: List of paths. Paths must begin with a leading '/' character - ) - void kill( - string absolute_node_path: Path name to node to kill. - ) - - If a :term:`family` or :term:`suite` is selected, will kill hierarchically. - Kill uses the ECF_KILL_CMD variable. After :term:`variable substitution` it is invoked as a command. - The ECF_KILL_CMD variable should be written in such a way that the output is written to %ECF_JOB%.kill, i.e: - - .. code-block:: shell - - kill -15 %ECF_RID% > %ECF_JOB%.kill 2>&1 - /home/ma/emos/bin/ecfkill %USER% %HOST% %ECF_RID% %ECF_JOB% > %ECF_JOB%.kill 2>&1 - - - Exceptions can be raised because: - - - The absolute_node_path does not exist in the server - - ECF_KILL_CMD variable is not defined - - :term:`variable substitution` fails - - Usage: - - .. code-block:: python - - try: - ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) - ci.kill('/s1/f1') - time.sleep(2) - print(ci.file('/s1/t1','kill')) # request kill output - except RuntimeError, e: - print(str(e)) - - -kill( (Client)arg1, (list)arg2) -> None - - -.. py:method:: Client.load( (Client)arg1, (str)path_to_defs [, (bool)force=False [, (bool)check_only=False [, (bool)print=False [, (bool)stats=False]]]]) -> int : - :module: ecflow -Load a :term:`suite definition` or checkpoint file given by the file_path argument into the :term:`ecflow_server` - :: - - void load( - string file_path : path name to the definition file - [(bool)force=False] : If true overwrite suite of same name - [(bool)print=False] : print parsed defs to standard out - ) - - By default throws a RuntimeError exception for errors. - If force is not used and :term:`suite` of the same name already exists in the server, - then a error is thrown - - Usage: - - .. code-block:: python - - defs_file = 'Hello.def' - defs = Defs() - suite = def.add_suite('s1') - family = suite.add_family('f1') - for i in [ '_1', '_2', '_3' ]: - family.add_task( 't' + i ) - defs.save_as_defs(defs_file) # write out in memory defs into the file 'Hello.def' - ... - try: - ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) - ci.load(defs_file) # open and parse defs or checkpoint file, and load into server. - except RuntimeError, e: - print(str(e)) - - -load( (Client)arg1, (Defs)defs [, (bool)force=False]) -> int : - Load a in memory :term:`suite definition` into the :term:`ecflow_server` - :: - - void load( - Defs defs : A in memory definition - [(bool)force=False] : for true overwrite suite of same name - ) - - If force is not used and :term:`suite` already exists in the server, then a error is thrown. - - Usage: - - .. code-block:: python - - defs = Defs() - suite = defs.add_suite('s1') - family = suite.add_family('f1') - for i in [ '_1', '_2', '_3' ]: - family.add_task( Task( 't' + i) ) - ... - try: - ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) - ci.load(defs) # Load in memory defs, into the server - except RuntimeError, e: - print(str(e)) - - - -.. py:method:: Client.log_msg( (Client)arg1, (str)arg2) -> int - :module: ecflow - - -.. py:method:: Client.new_log( (Client)arg1 [, (str)path='']) -> int : +.. py:method:: Client.new_log(self: ecflow.Client, path: str = '') -> int :module: ecflow Request the :term:`ecflow_server` to use the path provided, as the new log file @@ -1621,7 +1686,7 @@ Usage: print(str(e)) -.. py:method:: Client.news_local( (Client)arg1) -> bool : +.. py:method:: Client.news_local(self: ecflow.Client) -> bool :module: ecflow Query the :term:`ecflow_server` to detect any changes. @@ -1650,7 +1715,7 @@ Usage: print(str(e)) -.. py:method:: Client.order( (Client)arg1, (str)arg2, (str)arg3) -> None : +.. py:method:: Client.order(self: ecflow.Client, arg0: str, arg1: str) -> None :module: ecflow Re-orders the :term:`node`\ s in the :term:`suite definition` held by the :term:`ecflow_server` @@ -1687,7 +1752,7 @@ Usage: print(str(e)) -.. py:method:: Client.ping( (Client)arg1) -> int : +.. py:method:: Client.ping(self: ecflow.Client) -> int :module: ecflow Checks if the :term:`ecflow_server` is running @@ -1713,7 +1778,7 @@ Usage: print('------- Server *NOT* running------' + str(e)) -.. py:method:: Client.plug( (Client)arg1, (str)arg2, (str)arg3) -> int : +.. py:method:: Client.plug(self: ecflow.Client, arg0: str, arg1: str) -> int :module: ecflow Plug command is used to move :term:`node`\ s @@ -1750,7 +1815,7 @@ Usage: print(str(e)) -.. py:method:: Client.query( (Client)arg1, (str)arg2, (str)arg3 [, (str)arg4]) -> str : +.. py:method:: Client.query(self: ecflow.Client, query_type: str, path_to_attribute: str, attribute: str = '') -> str :module: ecflow Query the status of event, meter, state, variable, limit, limit_max or trigger expression without blocking @@ -1803,19 +1868,19 @@ Usage: print str(e) -.. py:method:: Client.reload_custom_passwd_file( (Client)arg1) -> int : +.. py:method:: Client.reload_custom_passwd_file(self: ecflow.Client) -> int :module: ecflow reload the custom passwd file. ..ecf.custom_passwd. For users using ECF_USER or --user or set_user_name() -.. py:method:: Client.reload_passwd_file( (Client)arg1) -> int : +.. py:method:: Client.reload_passwd_file(self: ecflow.Client) -> int :module: ecflow reload the passwd file. ..ecf.passwd -.. py:method:: Client.reload_wl_file( (Client)arg1) -> int : +.. py:method:: Client.reload_wl_file(self: ecflow.Client) -> int :module: ecflow Request that the :term:`ecflow_server` reload the white list file. @@ -1836,107 +1901,115 @@ Usage: print(str(e)) -.. py:method:: Client.replace( (Client)arg1, (str)arg2, (str)arg3, (bool)arg4, (bool)arg5) -> int : +.. py:method:: Client.replace(*args, **kwargs) :module: ecflow +Overloaded function. + +1. replace(self: ecflow.Client, arg0: str, arg1: str, arg2: bool, arg3: bool) -> int + Replaces a :term:`node` in a :term:`suite definition` with the given path. The definition is in the :term:`ecflow_server` - :: - - void replace( - string absolute_node_path: Path name to node in the client defs. - This is also the node we want to replace in the server. - string client_defs_file : File path to defs files, that provides the definition of the new node - [(bool)parent=False] : create parent families or suite as needed, - when absolute_node_path does not exist in the server - [(bool)force=False] : check for zombies, if force = true, bypass checks - ) - - void replace( - string absolute_node_path: Path name to node in the client defs. - This is also the node we want to replace in the server. - Defs client_defs : In memory client definition that provides the definition of the new node - [(bool)parent=False] : create parent families or suite as needed, - when absolute_node_path does not exist in the server - [(bool)force=False] : check for zombies, force = true, bypass checks - ) - - Exceptions can be raised because: - - - The absolute_node_path does not exist in the provided definition - - The provided client definition must be free of errors - - If the third argument is not provided, then the absolute_node_path must exist in the server defs - - replace will fail, if child task nodes are in :term:`active` / :term:`submitted` state - - After replace is done, we check trigger expressions. These are reported to standard output. - It is up to the user to correct invalid trigger expressions, otherwise the tasks will *not* run. - Please note, you can use check() to check trigger expression and limits in the server. - - - Usage: - - .. code-block:: python - - try: - ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) - ci.replace('/s1/f1','/tmp/defs.def') - except RuntimeError, e: - print(str(e)) - - try: - ci.replace('/s1',client_defs) # replace suite 's1' in the server, with 's1' in the client_defs - except RuntimeError, e: - print(str(e)) - - -replace( (Client)arg1, (str)arg2, (Defs)arg3, (bool)arg4, (bool)arg5) -> int - -replace( (Client)arg1, (str)arg2, (Defs)arg3) -> None - -replace( (Client)arg1, (str)arg2, (str)arg3) -> None - - -.. py:method:: Client.requeue( (Client)arg1, (str)abs_node_path [, (str)option='']) -> None : +:: + + void replace( + string absolute_node_path: Path name to node in the client defs. + This is also the node we want to replace in the server. + string client_defs_file : File path to defs files, that provides the definition of the new node + [(bool)parent=False] : create parent families or suite as needed, + when absolute_node_path does not exist in the server + [(bool)force=False] : check for zombies, if force = true, bypass checks + ) + + void replace( + string absolute_node_path: Path name to node in the client defs. + This is also the node we want to replace in the server. + Defs client_defs : In memory client definition that provides the definition of the new node + [(bool)parent=False] : create parent families or suite as needed, + when absolute_node_path does not exist in the server + [(bool)force=False] : check for zombies, force = true, bypass checks + ) + +Exceptions can be raised because: + +- The absolute_node_path does not exist in the provided definition +- The provided client definition must be free of errors +- If the third argument is not provided, then the absolute_node_path must exist in the server defs +- replace will fail, if child task nodes are in :term:`active` / :term:`submitted` state + +After replace is done, we check trigger expressions. These are reported to standard output. +It is up to the user to correct invalid trigger expressions, otherwise the tasks will *not* run. +Please note, you can use check() to check trigger expression and limits in the server. + + +Usage: + +.. code-block:: python + + try: + ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) + ci.replace('/s1/f1','/tmp/defs.def') + except RuntimeError, e: + print(str(e)) + + try: + ci.replace('/s1',client_defs) # replace suite 's1' in the server, with 's1' in the client_defs + except RuntimeError, e: + print(str(e)) + + +2. replace(self: ecflow.Client, arg0: str, arg1: ecflow.Defs, arg2: bool, arg3: bool) -> int + +3. replace(self: ecflow.Client, arg0: str, arg1: ecflow.Defs) -> None + +4. replace(self: ecflow.Client, arg0: str, arg1: str) -> None + + +.. py:method:: Client.requeue(*args, **kwargs) :module: ecflow +Overloaded function. + +1. requeue(self: ecflow.Client, abs_node_path: str, option: str = '') -> None + Re queues the specified :term:`node` (s) - :: - - void requeue( - list paths : A list of paths. Node paths must begin with a leading '/' character - [(str)option=''] : option = ('' | 'abort' | 'force') - '' : empty string, the default, re-queue the node - abort: means re-queue only aborted tasks below node - force: means re-queueing even if there are nodes that are active or submitted - ) - void requeue( - string absolute_node_path : Path name to node - [(string)option=''] : option = ('' | 'abort' | 'force') - ) - - Usage: - - .. code-block:: python - - try: - ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) - ci.requeue('/s1','abort') # re-queue aborted tasks below suite /s1 - - path_list = ['/s1/f1/t1','/s2/f1/t2'] - ci.requeue(path_list) - except RuntimeError, e: - print(str(e)) - - -requeue( (Client)arg1, (list)paths [, (str)option='']) -> None - - -.. py:method:: Client.reset( (Client)arg1) -> None : +:: + + void requeue( + list paths : A list of paths. Node paths must begin with a leading '/' character + [(str)option=''] : option = ('' | 'abort' | 'force') + '' : empty string, the default, re-queue the node + abort: means re-queue only aborted tasks below node + force: means re-queueing even if there are nodes that are active or submitted + ) + void requeue( + string absolute_node_path : Path name to node + [(string)option=''] : option = ('' | 'abort' | 'force') + ) + +Usage: + +.. code-block:: python + + try: + ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) + ci.requeue('/s1','abort') # re-queue aborted tasks below suite /s1 + + path_list = ['/s1/f1/t1','/s2/f1/t2'] + ci.requeue(path_list) + except RuntimeError, e: + print(str(e)) + + +2. requeue(self: ecflow.Client, paths: list, option: str = '') -> None + + +.. py:method:: Client.reset(self: ecflow.Client) -> None :module: ecflow reset client definition, and handle number -.. py:method:: Client.restart_server( (Client)arg1) -> int : +.. py:method:: Client.restart_server(self: ecflow.Client) -> int :module: ecflow Restart the :term:`ecflow_server` @@ -1955,34 +2028,38 @@ Usage: print(str(e)) -.. py:method:: Client.restore( (Client)arg1, (str)arg2) -> None : +.. py:method:: Client.restore(*args, **kwargs) :module: ecflow +Overloaded function. + +1. restore(self: ecflow.Client, arg0: str) -> None + Restore archived nodes. - Usage:: - - string restore( - list paths # List of paths. - ) - string restore( - string absolute_node_path - ) - - Usage: - - .. code-block:: python - - try: - ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) - print ci.restore('/suite1') - except RuntimeError, e: - print str(e) - - -restore( (Client)arg1, (list)arg2) -> None - - -.. py:method:: Client.restore_from_checkpt( (Client)arg1) -> int : +Usage:: + + string restore( + list paths # List of paths. + ) + string restore( + string absolute_node_path + ) + +Usage: + +.. code-block:: python + + try: + ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) + print ci.restore('/suite1') + except RuntimeError, e: + print str(e) + + +2. restore(self: ecflow.Client, arg0: list) -> None + + +.. py:method:: Client.restore_from_checkpt(self: ecflow.Client) -> int :module: ecflow Request the :term:`ecflow_server` loads the :term:`check point` file from disk @@ -2003,121 +2080,134 @@ Usage: print(str(e)) -.. py:method:: Client.resume( (Client)arg1, (str)arg2) -> None : +.. py:method:: Client.resume(*args, **kwargs) :module: ecflow +Overloaded function. + +1. resume(self: ecflow.Client, arg0: str) -> None + Resume `job creation` / generation for the given :term:`node` - :: - - void resume( - list paths: List of paths. Paths must begin with a leading '/' character - ) - void resume( - string absolute_node_path: Path name to node to resume. - ) - - Usage: - - .. code-block:: python - - try: - ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) - ci.resume('/s1/f1/task1') - paths = ['/s1/f1/t1','/s2/f1/t2'] - ci.resume(paths) - except RuntimeError, e: - print(str(e)) - - -resume( (Client)arg1, (list)arg2) -> None - - -.. py:method:: Client.run( (Client)arg1, (str)arg2, (bool)arg3) -> None : +:: + + void resume( + list paths: List of paths. Paths must begin with a leading '/' character + ) + void resume( + string absolute_node_path: Path name to node to resume. + ) + +Usage: + +.. code-block:: python + + try: + ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) + ci.resume('/s1/f1/task1') + paths = ['/s1/f1/t1','/s2/f1/t2'] + ci.resume(paths) + except RuntimeError, e: + print(str(e)) + + +2. resume(self: ecflow.Client, arg0: list) -> None + + +.. py:method:: Client.run(*args, **kwargs) :module: ecflow +Overloaded function. + +1. run(self: ecflow.Client, arg0: str, arg1: bool) -> None + Immediately run the jobs associated with the input :term:`node`. - - Ignore :term:`trigger`\ s, :term:`limit`\ s, :term:`suspended`, :term:`time` or :term:`date` dependencies, - just run the :term:`task`. - When a job completes, it may be automatically re-queued if it has - multiple time :term:`dependencies`. In the specific case where a :term:`task` has a SINGLE - time dependency and we want to avoid re running the :term:`task` then - a flag is set so that it is not automatically re-queued when set to :term:`complete`. - The flag is applied up the :term:`node` hierarchy until we reach a node with a :term:`repeat` - or :term:`cron` attribute. This behaviour allow :term:`repeat` values to be incremented interactively. - A :term:`repeat` attribute is incremented when all the child nodes are :term:`complete` - in this case the child nodes are automatically re-queued - :: - - void run( - string absolute_node_path : Path name to node. If the path is suite/family will recursively - run all child tasks - [(bool)force=False] : If true, run even if there are nodes that are active or submitted. - ) - void run( - list paths : List of paths. If the path is suite/family will recursively run all child tasks - [(bool)force=False] : If true, run even if there are nodes that are active or submitted. - ) - - Usage: - - .. code-block:: python - - try: - ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) - ci.run('/s1') # run all tasks under suite /s1 - - ci.run(['/s1/f1/t1','/s2/f1/t2']) # run all tasks specified - except RuntimeError, e: - print(str(e)) - - Effect: - - Lets see the effect of run command on the following defs: - - .. code-block:: shell - - suite s1 - task t1; time 10:00 # will complete straight away - task t2; time 10:00 13:00 01:00 # will re-queue 3 times and complete on fourth run - - In the last case (task t2) after each run the next time slot is incremented. - This can be seen by calling the Why command. - -run( (Client)arg1, (list)arg2, (bool)arg3) -> None - - -.. py:method:: Client.server_version( (Client)arg1) -> str : + +Ignore :term:`trigger`\ s, :term:`limit`\ s, :term:`suspended`, :term:`time` or :term:`date` dependencies, +just run the :term:`task`. +When a job completes, it may be automatically re-queued if it has +multiple time :term:`dependencies`. In the specific case where a :term:`task` has a SINGLE +time dependency and we want to avoid re running the :term:`task` then +a flag is set so that it is not automatically re-queued when set to :term:`complete`. +The flag is applied up the :term:`node` hierarchy until we reach a node with a :term:`repeat` +or :term:`cron` attribute. This behaviour allow :term:`repeat` values to be incremented interactively. +A :term:`repeat` attribute is incremented when all the child nodes are :term:`complete` +in this case the child nodes are automatically re-queued +:: + + void run( + string absolute_node_path : Path name to node. If the path is suite/family will recursively + run all child tasks + [(bool)force=False] : If true, run even if there are nodes that are active or submitted. + ) + void run( + list paths : List of paths. If the path is suite/family will recursively run all child tasks + [(bool)force=False] : If true, run even if there are nodes that are active or submitted. + ) + +Usage: + +.. code-block:: python + + try: + ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) + ci.run('/s1') # run all tasks under suite /s1 + + ci.run(['/s1/f1/t1','/s2/f1/t2']) # run all tasks specified + except RuntimeError, e: + print(str(e)) + +Effect: + + Lets see the effect of run command on the following defs: + +.. code-block:: shell + + suite s1 + task t1; time 10:00 # will complete straight away + task t2; time 10:00 13:00 01:00 # will re-queue 3 times and complete on fourth run + +In the last case (task t2) after each run the next time slot is incremented. +This can be seen by calling the Why command. + +2. run(self: ecflow.Client, arg0: list, arg1: bool) -> None + + +.. py:method:: Client.server_version(self: ecflow.Client) -> str :module: ecflow Returns the server version, can throw for old servers, that did not implement this request. -.. py:method:: Client.set_auto_sync( (Client)arg1, (bool)arg2) -> None : +.. py:method:: Client.set_auto_sync(self: ecflow.Client, arg0: bool) -> None :module: ecflow If true automatically sync with local definition after each call. -.. py:method:: Client.set_child_complete_del_vars( (Client)arg1, (list)arg2) -> None : +.. py:method:: Client.set_child_complete_del_vars(self: ecflow.Client, arg0: list) -> None :module: ecflow Set the list of variables to be deleted when a task becomes complete Needs a list of strings, representing the variable names. -.. py:method:: Client.set_child_init_add_vars( (Client)arg1, (dict)arg2) -> None : +.. py:method:: Client.set_child_init_add_vars(*args, **kwargs) :module: ecflow +Overloaded function. + +1. set_child_init_add_vars(self: ecflow.Client, arg0: dict) -> None + Set the list of variables to be added when a task becomes active - Needs a dictionary of name/value pairs, or a list of ecflow Variables +Needs a dictionary of name/value pairs, or a list of ecflow Variables -set_child_init_add_vars( (Client)arg1, (list)arg2) -> None : - Set the list of variables to be added when a task becomes active - Needs a dictionary of name/value pairs, or a list of ecflow Variables +2. set_child_init_add_vars(self: ecflow.Client, arg0: list) -> None + +Set the list of variables to be added when a task becomes active +Needs a dictionary of name/value pairs, or a list of ecflow Variables -.. py:method:: Client.set_child_password( (Client)arg1, (str)arg2) -> None : +.. py:method:: Client.set_child_password(self: ecflow.Client, arg0: str) -> None :module: ecflow Set the password, needed for authentication, provided by the server using %ECF_PASS% @@ -2126,7 +2216,7 @@ By default the environment variable ECF_PASS is read for the jobs password This can be overridden for the python child api -.. py:method:: Client.set_child_path( (Client)arg1, (str)arg2) -> None : +.. py:method:: Client.set_child_path(self: ecflow.Client, arg0: str) -> None :module: ecflow Set the path to the task, obtained from server using %ECF_NAME% @@ -2135,22 +2225,27 @@ By default the environment variable ECF_NAME is read for the task path This can be overridden for the python child api -.. py:method:: Client.set_child_pid( (Client)arg1, (str)arg2) -> None : +.. py:method:: Client.set_child_pid(*args, **kwargs) :module: ecflow +Overloaded function. + +1. set_child_pid(self: ecflow.Client, arg0: str) -> None + +Set the process id of this job + +By default the environment variable ECF_RID is read for the jobs process or remote id +This can be overridden for the python child api + +2. set_child_pid(self: ecflow.Client, arg0: typing.SupportsInt | typing.SupportsIndex) -> None + Set the process id of this job - - By default the environment variable ECF_RID is read for the jobs process or remote id - This can be overridden for the python child api -set_child_pid( (Client)arg1, (int)arg2) -> None : - Set the process id of this job - - By default the environment variable ECF_RID is read for the jobs process or remote id - This can be overridden for the python child api +By default the environment variable ECF_RID is read for the jobs process or remote id +This can be overridden for the python child api -.. py:method:: Client.set_child_timeout( (Client)arg1, (int)arg2) -> None : +.. py:method:: Client.set_child_timeout(self: ecflow.Client, arg0: typing.SupportsInt | typing.SupportsIndex) -> None :module: ecflow Set timeout if child cannot connect to server, default is 24 hours. The input is required to be in seconds @@ -2159,7 +2254,7 @@ By default the environment variable ECF_TIMEOUT is read to control how long chi This can be overridden for the python child api -.. py:method:: Client.set_child_try_no( (Client)arg1, (int)arg2) -> None : +.. py:method:: Client.set_child_try_no(self: ecflow.Client, arg0: typing.SupportsInt | typing.SupportsIndex) -> None :module: ecflow Set the try no, i.e the number of times this job has run, obtained from the server, using %ECF_TRYNO% @@ -2168,7 +2263,7 @@ By default the environment variable ECF_TRYNO is read to record number of times This can be overridden for the python child api -.. py:method:: Client.set_connection_attempts( (Client)arg1, (int)arg2) -> None : +.. py:method:: Client.set_connection_attempts(self: ecflow.Client, arg0: typing.SupportsInt | typing.SupportsIndex) -> None :module: ecflow Set the number of times to connect to :term:`ecflow_server`, in case of connection failures @@ -2197,51 +2292,55 @@ Usage: ci.set_retry_connection_period(1) # wait 1 second between each attempt -.. py:method:: Client.set_host_port( (Client)arg1, (str)arg2, (str)arg3) -> None : +.. py:method:: Client.set_host_port(*args, **kwargs) :module: ecflow +Overloaded function. + +1. set_host_port(self: ecflow.Client, arg0: str, arg1: str) -> None + Explicitly set the host and port to be used by the client, overriding the default host name (localhost) and port (3141) and the environment variables: ECF_HOST and ECF_PORT. - - .. code-block:: shell - - set_host_port( - string host, # The server name. Cannot be empty. - string port # The port on the server, must be unique to the server - ) - - set_host_port( - string host, # The server name. Cannot be empty. - int port # The port on the server, must be unique to the server - ) - - set_host_port( - string host_port, # Expects : or @ - ) - - Exceptions: - - - Raise a RuntimeError if the host or port is empty - - Usage: - - .. code-block:: python - - try: - ci = Client() - ci.set_host_port('localhost','3150') - ci.set_host_port('avi',3150) - ci.set_host_port('avi:3150') - except RuntimeError, e: - print(str(e)) - - - -set_host_port( (Client)arg1, (str)arg2) -> None - -set_host_port( (Client)arg1, (str)arg2, (int)arg3) -> None - - -.. py:method:: Client.set_retry_connection_period( (Client)arg1, (int)arg2) -> None : + +.. code-block:: shell + + set_host_port( + string host, # The server name. Cannot be empty. + string port # The port on the server, must be unique to the server + ) + + set_host_port( + string host, # The server name. Cannot be empty. + int port # The port on the server, must be unique to the server + ) + + set_host_port( + string host_port, # Expects : or @ + ) + +Exceptions: + +- Raise a RuntimeError if the host or port is empty + +Usage: + +.. code-block:: python + + try: + ci = Client() + ci.set_host_port('localhost','3150') + ci.set_host_port('avi',3150) + ci.set_host_port('avi:3150') + except RuntimeError, e: + print(str(e)) + + + +2. set_host_port(self: ecflow.Client, arg0: str) -> None + +3. set_host_port(self: ecflow.Client, arg0: str, arg1: typing.SupportsInt | typing.SupportsIndex) -> None + + +.. py:method:: Client.set_retry_connection_period(self: ecflow.Client, arg0: typing.SupportsInt | typing.SupportsIndex) -> None :module: ecflow Set the sleep period between connection attempts @@ -2272,19 +2371,19 @@ Usage: ci.set_retry_connection_period(1) # wait 1 second between each attempt -.. py:method:: Client.set_user_name( (Client)arg1, (str)arg2) -> None : +.. py:method:: Client.set_user_name(self: ecflow.Client, arg0: str) -> None :module: ecflow -set user name. A password must be provided in the file ..ecf.custom_passwd +Set user name. A password must be provided in the file ..ecf.custom_passwd -.. py:method:: Client.set_zombie_child_timeout( (Client)arg1, (int)arg2) -> None : +.. py:method:: Client.set_zombie_child_timeout(self: ecflow.Client, arg0: typing.SupportsInt | typing.SupportsIndex) -> None :module: ecflow Set timeout for zombie child commands,that cannot connect to server, default is 24 hours. The input is required to be in seconds -.. py:method:: Client.shutdown_server( (Client)arg1) -> int : +.. py:method:: Client.shutdown_server(self: ecflow.Client) -> int :module: ecflow Shut down the :term:`ecflow_server` @@ -2303,13 +2402,17 @@ Usage: print(str(e)) -.. py:method:: Client.sort_attributes( (Client)arg1, (str)abs_node_path, (str)attribute_name [, (bool)recursive=True]) -> None +.. py:method:: Client.sort_attributes(*args, **kwargs) :module: ecflow -sort_attributes( (Client)arg1, (list)paths, (str)attribute_name [, (bool)recursive=True]) -> None +Overloaded function. +1. sort_attributes(self: ecflow.Client, abs_node_path: str, attribute_name: str, recursive: bool = True) -> None -.. py:method:: Client.stats( (Client)arg1 [, (bool)to_stdout]) -> str : +2. sort_attributes(self: ecflow.Client, paths: list, attribute_name: str, recursive: bool = True) -> None + + +.. py:method:: Client.stats(self: ecflow.Client, to_stdout: bool = True) -> str :module: ecflow Returns the :term:`ecflow_server` statistics as a string @@ -2333,7 +2436,7 @@ Usage: print(str(e)) -.. py:method:: Client.stats_reset( (Client)arg1) -> None : +.. py:method:: Client.stats_reset(self: ecflow.Client) -> None :module: ecflow Resets the statistical data in the server @@ -2352,50 +2455,54 @@ Usage: print(str(e)) -.. py:method:: Client.status( (Client)arg1, (str)arg2) -> None : +.. py:method:: Client.status(*args, **kwargs) :module: ecflow +Overloaded function. + +1. status(self: ecflow.Client, arg0: str) -> None + Shows the status of a job associated with a :term:`task` - :: - - void status( - list paths: List of paths. Paths must begin with a leading '/' character - ) - void status( - string absolute_node_path - ) - - If a :term:`family` or :term:`suite` is selected, will invoke status command hierarchically. - Status uses the ECF_STATUS_CMD variable. After :term:`variable substitution` it is invoked as a command. - The command should be written in such a way that the output is written to %ECF_JOB%.stat, i.e: - - .. code-block:: shell - - /home/ma/emos/bin/ecfstatus %USER% %HOST% %ECF_RID% %ECF_JOB% > %ECF_JOB%.stat 2>&1 - - Exceptions can be raised because: - - - The absolute_node_path does not exist in the server - - ECF_STATUS_CMD variable is not defined - - :term:`variable substitution` fails - - Usage: - - .. code-block:: python - - try: - ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) - ci.status('/s1/t1') - time.sleep(2) - print(ci.file('/s1/t1','stats')) # request status output - except RuntimeError, e: - print(str(e)) - - -status( (Client)arg1, (list)arg2) -> None - - -.. py:method:: Client.suites( (Client)arg1) -> list : +:: + + void status( + list paths: List of paths. Paths must begin with a leading '/' character + ) + void status( + string absolute_node_path + ) + +If a :term:`family` or :term:`suite` is selected, will invoke status command hierarchically. +Status uses the ECF_STATUS_CMD variable. After :term:`variable substitution` it is invoked as a command. +The command should be written in such a way that the output is written to %ECF_JOB%.stat, i.e: + +.. code-block:: shell + + /home/ma/emos/bin/ecfstatus %USER% %HOST% %ECF_RID% %ECF_JOB% > %ECF_JOB%.stat 2>&1 + +Exceptions can be raised because: + +- The absolute_node_path does not exist in the server +- ECF_STATUS_CMD variable is not defined +- :term:`variable substitution` fails + +Usage: + +.. code-block:: python + + try: + ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) + ci.status('/s1/t1') + time.sleep(2) + print(ci.file('/s1/t1','stats')) # request status output + except RuntimeError, e: + print(str(e)) + + +2. status(self: ecflow.Client, arg0: list) -> None + + +.. py:method:: Client.suites(self: ecflow.Client) -> list :module: ecflow Returns a list strings representing the :term:`suite` names @@ -2415,36 +2522,40 @@ Usage: print(str(e)) -.. py:method:: Client.suspend( (Client)arg1, (str)arg2) -> None : +.. py:method:: Client.suspend(*args, **kwargs) :module: ecflow +Overloaded function. + +1. suspend(self: ecflow.Client, arg0: str) -> None + Suspend `job creation` / generation for the given :term:`node` - :: - - void suspend( - list paths: List of paths. Paths must begin with a leading '/' character - ) - void suspend( - string absolute_node_path: Path name to node to suspend. - ) - - Usage: - - .. code-block:: python - - try: - ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) - ci.suspend('/s1/f1/task1') - paths = ['/s1/f1/t1','/s2/f1/t2'] - ci.suspend(paths) - except RuntimeError, e: - print(str(e)) - - -suspend( (Client)arg1, (list)arg2) -> None - - -.. py:method:: Client.sync_local( (Client)arg1 [, (bool)sync_suite_clock=False]) -> int : +:: + + void suspend( + list paths: List of paths. Paths must begin with a leading '/' character + ) + void suspend( + string absolute_node_path: Path name to node to suspend. + ) + +Usage: + +.. code-block:: python + + try: + ci = Client() # use default host(ECF_HOST) & port(ECF_PORT) + ci.suspend('/s1/f1/task1') + paths = ['/s1/f1/t1','/s2/f1/t2'] + ci.suspend(paths) + except RuntimeError, e: + print(str(e)) + + +2. suspend(self: ecflow.Client, arg0: list) -> None + + +.. py:method:: Client.sync_local(self: ecflow.Client, sync_suite_clock: bool = False) -> int :module: ecflow Requests that :term:`ecflow_server` returns the full definition or incremental change made and applies them to the client Defs @@ -2484,7 +2595,7 @@ Usage: Calling sync_local() is considerably faster than calling get_server_defs() for large Definitions -.. py:method:: Client.terminate_server( (Client)arg1) -> int : +.. py:method:: Client.terminate_server(self: ecflow.Client) -> int :module: ecflow Terminate the :term:`ecflow_server` @@ -2501,13 +2612,13 @@ Usage: print(str(e)) -.. py:method:: Client.version( (Client)arg1) -> str : +.. py:method:: Client.version(self: ecflow.Client) -> str :module: ecflow Returns the current client version -.. py:method:: Client.wait_for_server_reply( (Client)arg1 [, (int)time_out=60]) -> bool : +.. py:method:: Client.wait_for_server_reply(self: ecflow.Client, time_out: typing.SupportsInt | typing.SupportsIndex = 60) -> bool :module: ecflow Wait for a response from the :term:`ecflow_server`:: @@ -2530,42 +2641,66 @@ Usage: print('Timed out after 30 second wait for server response.?') -.. py:method:: Client.zombie_adopt( (Client)arg1, (str)arg2) -> int +.. py:method:: Client.zombie_adopt(*args, **kwargs) :module: ecflow -zombie_adopt( (Client)arg1, (list)arg2) -> None +Overloaded function. +1. zombie_adopt(self: ecflow.Client, arg0: str) -> int -.. py:method:: Client.zombie_block( (Client)arg1, (str)arg2) -> int +2. zombie_adopt(self: ecflow.Client, arg0: list) -> None + + +.. py:method:: Client.zombie_block(*args, **kwargs) :module: ecflow -zombie_block( (Client)arg1, (list)arg2) -> None +Overloaded function. + +1. zombie_block(self: ecflow.Client, arg0: str) -> int + +2. zombie_block(self: ecflow.Client, arg0: list) -> None -.. py:method:: Client.zombie_fail( (Client)arg1, (str)arg2) -> int +.. py:method:: Client.zombie_fail(*args, **kwargs) :module: ecflow -zombie_fail( (Client)arg1, (list)arg2) -> None +Overloaded function. +1. zombie_fail(self: ecflow.Client, arg0: str) -> int -.. py:method:: Client.zombie_fob( (Client)arg1, (str)arg2) -> int +2. zombie_fail(self: ecflow.Client, arg0: list) -> None + + +.. py:method:: Client.zombie_fob(*args, **kwargs) :module: ecflow -zombie_fob( (Client)arg1, (list)arg2) -> None +Overloaded function. + +1. zombie_fob(self: ecflow.Client, arg0: str) -> int + +2. zombie_fob(self: ecflow.Client, arg0: list) -> None -.. py:method:: Client.zombie_get( (Client)arg1, (int)arg2) -> ZombieVec +.. py:method:: Client.zombie_get(self: ecflow.Client, arg0: typing.SupportsInt | typing.SupportsIndex) -> list[ecflow.Zombie] :module: ecflow -.. py:method:: Client.zombie_kill( (Client)arg1, (str)arg2) -> int +.. py:method:: Client.zombie_kill(*args, **kwargs) :module: ecflow -zombie_kill( (Client)arg1, (list)arg2) -> None +Overloaded function. +1. zombie_kill(self: ecflow.Client, arg0: str) -> int -.. py:method:: Client.zombie_remove( (Client)arg1, (str)arg2) -> int +2. zombie_kill(self: ecflow.Client, arg0: list) -> None + + +.. py:method:: Client.zombie_remove(*args, **kwargs) :module: ecflow -zombie_remove( (Client)arg1, (list)arg2) -> None +Overloaded function. + +1. zombie_remove(self: ecflow.Client, arg0: str) -> int + +2. zombie_remove(self: ecflow.Client, arg0: list) -> None diff --git a/docs/python_api/Clock.rst b/docs/python_api/Clock.rst index c2b459232..86c7fee9b 100644 --- a/docs/python_api/Clock.rst +++ b/docs/python_api/Clock.rst @@ -5,7 +5,7 @@ ecflow.Clock .. py:class:: Clock :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Specifies the :term:`clock` type used by the :term:`suite`. @@ -43,43 +43,43 @@ Usage: suite.add_clock(clock) -.. py:method:: Clock.day( (Clock)arg1) -> int : +.. py:method:: Clock.day(self: ecflow.Clock) -> int :module: ecflow Returns the day as an integer, range 1-31 -.. py:method:: Clock.gain( (Clock)arg1) -> int : +.. py:method:: Clock.gain(self: ecflow.Clock) -> int :module: ecflow Returns the gain as an long. This represents seconds -.. py:method:: Clock.month( (Clock)arg1) -> int : +.. py:method:: Clock.month(self: ecflow.Clock) -> int :module: ecflow Returns the month as an integer, range 1-12 -.. py:method:: Clock.positive_gain( (Clock)arg1) -> bool : +.. py:method:: Clock.positive_gain(self: ecflow.Clock) -> bool :module: ecflow Returns a boolean, where true means that the gain is positive -.. py:method:: Clock.set_gain( (Clock)arg1, (int)arg2, (int)arg3, (bool)arg4) -> None : +.. py:method:: Clock.set_gain(self: ecflow.Clock, arg0: typing.SupportsInt | typing.SupportsIndex, arg1: typing.SupportsInt | typing.SupportsIndex, arg2: bool) -> None :module: ecflow Set the gain in hours and minutes -.. py:method:: Clock.set_gain_in_seconds( (Clock)arg1, (int)arg2, (bool)arg3) -> None : +.. py:method:: Clock.set_gain_in_seconds(self: ecflow.Clock, arg0: typing.SupportsInt | typing.SupportsIndex, arg1: bool) -> None :module: ecflow Set the gain in seconds -.. py:method:: Clock.year( (Clock)arg1) -> int : +.. py:method:: Clock.year(self: ecflow.Clock) -> int :module: ecflow Returns the year as an integer, > 1400 diff --git a/docs/python_api/Complete.rst b/docs/python_api/Complete.rst index 10f17a7ed..3854b33c0 100644 --- a/docs/python_api/Complete.rst +++ b/docs/python_api/Complete.rst @@ -5,7 +5,7 @@ ecflow.Complete .. py:class:: Complete :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Add a :term:`trigger` or :term:`complete expression`. @@ -64,7 +64,7 @@ If however node taskx has not yet been added to its parent, we use a relative na t2 ==complete and taskx == complete -.. py:method:: Complete.get_expression( (Complete)arg1) -> str : +.. py:method:: Complete.get_expression(self: ecflow.Complete) -> str :module: ecflow returns the complete expression as a string diff --git a/docs/python_api/Cron.rst b/docs/python_api/Cron.rst index fb3425095..ed26915c2 100644 --- a/docs/python_api/Cron.rst +++ b/docs/python_api/Cron.rst @@ -5,7 +5,7 @@ ecflow.Cron .. py:class:: Cron :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` A :term:`cron` defines a repeating time dependency for a node. @@ -77,7 +77,7 @@ Usage (see the :ref:`cron definition` for more examples): returns a integer list of days of the month -.. py:method:: Cron.last_day_of_the_month( (Cron)arg1) -> bool : +.. py:method:: Cron.last_day_of_the_month(self: ecflow.Cron) -> bool :module: ecflow Return true if last day of month is enabled @@ -95,52 +95,59 @@ returns a integer list of last week days of the month returns a integer list of months of the year -.. py:method:: Cron.set_days_of_month( (Cron)arg1, (list)arg2) -> None : +.. py:method:: Cron.set_days_of_month(self: ecflow.Cron, arg0: list) -> None :module: ecflow Specifies days of the month. Expects a list of integers with integer range 1-31 -.. py:method:: Cron.set_last_day_of_the_month( (Cron)arg1) -> None : +.. py:method:: Cron.set_last_day_of_the_month(self: ecflow.Cron) -> None :module: ecflow Set cron for the last day of the month -.. py:method:: Cron.set_last_week_days_of_the_month( (Cron)arg1, (list)arg2) -> None : +.. py:method:: Cron.set_last_week_days_of_the_month(self: ecflow.Cron, arg0: list) -> None :module: ecflow Specifies last week days of the month. Expects a list of integers, with integer range 0==Sun to 6==Sat -.. py:method:: Cron.set_months( (Cron)arg1, (list)arg2) -> None : +.. py:method:: Cron.set_months(self: ecflow.Cron, arg0: list) -> None :module: ecflow Specifies months. Expects a list of integers, with integer range 1-12 -.. py:method:: Cron.set_time_series( (Cron)arg1, (int)hour, (int)minute [, (bool)relative=False]) -> None : +.. py:method:: Cron.set_time_series(*args, **kwargs) :module: ecflow +Overloaded function. + +1. set_time_series(self: ecflow.Cron, hour: typing.SupportsInt | typing.SupportsIndex, minute: typing.SupportsInt | typing.SupportsIndex, relative: bool = False) -> None + time_series(hour(int),minute(int),relative to suite start(bool=false)), Add a time slot -set_time_series( (Cron)arg1, (TimeSeries)arg2) -> None : - Add a time series. This will never complete +2. set_time_series(self: ecflow.Cron, arg0: ecflow.TimeSeries) -> None + +Add a time series. This will never complete + +3. set_time_series(self: ecflow.Cron, arg0: ecflow.TimeSlot, arg1: ecflow.TimeSlot, arg2: ecflow.TimeSlot) -> None + +Add a time series. This will never complete -set_time_series( (Cron)arg1, (TimeSlot)arg2, (TimeSlot)arg3, (TimeSlot)arg4) -> None : - Add a time series. This will never complete +4. set_time_series(self: ecflow.Cron, arg0: str) -> None -set_time_series( (Cron)arg1, (str)arg2) -> None : - Add a time series. This will never complete +Add a time series. This will never complete -.. py:method:: Cron.set_week_days( (Cron)arg1, (list)arg2) -> None : +.. py:method:: Cron.set_week_days(self: ecflow.Cron, arg0: list) -> None :module: ecflow Specifies days of week. Expects a list of integers, with integer range 0==Sun to 6==Sat -.. py:method:: Cron.time( (Cron)arg1) -> TimeSeries : +.. py:method:: Cron.time(self: ecflow.Cron) -> ecflow.TimeSeries :module: ecflow return cron time as a TimeSeries diff --git a/docs/python_api/DState.rst b/docs/python_api/DState.rst index daf585948..e115a074c 100644 --- a/docs/python_api/DState.rst +++ b/docs/python_api/DState.rst @@ -5,7 +5,7 @@ ecflow.DState .. py:class:: DState :module: ecflow - Bases: :py:class:`~Boost.Python.enum` + Bases: :py:class:`~pybind11_builtins.pybind11_object` A DState is like a ecflow.State, except for the addition of SUSPENDED @@ -24,47 +24,62 @@ Usage:: Defstatus('complete')) # create in place +Members: + + unknown + + complete + + queued + + aborted + + submitted + + suspended + + active + + .. py:attribute:: DState.aborted :module: ecflow - :value: ecflow.DState.aborted + :value: .. py:attribute:: DState.active :module: ecflow - :value: ecflow.DState.active + :value: .. py:attribute:: DState.complete :module: ecflow - :value: ecflow.DState.complete + :value: -.. py:attribute:: DState.names +.. py:property:: DState.name :module: ecflow - :value: {'aborted': ecflow.DState.aborted, 'active': ecflow.DState.active, 'complete': ecflow.DState.complete, 'queued': ecflow.DState.queued, 'submitted': ecflow.DState.submitted, 'suspended': ecflow.DState.suspended, 'unknown': ecflow.DState.unknown} .. py:attribute:: DState.queued :module: ecflow - :value: ecflow.DState.queued + :value: .. py:attribute:: DState.submitted :module: ecflow - :value: ecflow.DState.submitted + :value: .. py:attribute:: DState.suspended :module: ecflow - :value: ecflow.DState.suspended + :value: .. py:attribute:: DState.unknown :module: ecflow - :value: ecflow.DState.unknown + :value: -.. py:attribute:: DState.values +.. py:property:: DState.value :module: ecflow - :value: {0: ecflow.DState.unknown, 1: ecflow.DState.complete, 2: ecflow.DState.queued, 3: ecflow.DState.aborted, 4: ecflow.DState.submitted, 5: ecflow.DState.active, 6: ecflow.DState.suspended} diff --git a/docs/python_api/Date.rst b/docs/python_api/Date.rst index 79fb9040c..5a057aa2b 100644 --- a/docs/python_api/Date.rst +++ b/docs/python_api/Date.rst @@ -5,7 +5,7 @@ ecflow.Date .. py:class:: Date :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Used to define a :term:`date` dependency. @@ -38,19 +38,19 @@ Usage: Date('1.*.*')); # Create Date in place. -.. py:method:: Date.day( (Date)arg1) -> int : +.. py:method:: Date.day(self: ecflow.Date) -> int :module: ecflow Return the day. The range is 0-31, 0 means its wild-carded -.. py:method:: Date.month( (Date)arg1) -> int : +.. py:method:: Date.month(self: ecflow.Date) -> int :module: ecflow Return the month. The range is 0-12, 0 means its wild-carded -.. py:method:: Date.year( (Date)arg1) -> int : +.. py:method:: Date.year(self: ecflow.Date) -> int :module: ecflow Return the year, 0 means its wild-carded diff --git a/docs/python_api/Day.rst b/docs/python_api/Day.rst index a3961706e..b65baf26a 100644 --- a/docs/python_api/Day.rst +++ b/docs/python_api/Day.rst @@ -5,7 +5,7 @@ ecflow.Day .. py:class:: Day :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Defines a :term:`day` dependency. @@ -30,7 +30,7 @@ Usage: Day('tuesday')) -.. py:method:: Day.day( (Day)arg1) -> Days : +.. py:method:: Day.day(self: ecflow.Day) -> ecflow.Days :module: ecflow Return the day as enumerator diff --git a/docs/python_api/Days.rst b/docs/python_api/Days.rst index 1b99db587..f9df84e2f 100644 --- a/docs/python_api/Days.rst +++ b/docs/python_api/Days.rst @@ -5,7 +5,7 @@ ecflow.Days .. py:class:: Days :module: ecflow - Bases: :py:class:`~Boost.Python.enum` + Bases: :py:class:`~pybind11_builtins.pybind11_object` This enum is used as argument to a :py:class:`ecflow.Day` class. @@ -23,6 +23,23 @@ Usage: Day(Days.tuesday)) +Members: + + sunday + + monday + + tuesday + + wednesday + + thursday + + friday + + saturday + + .. py:attribute:: Days.friday :module: ecflow :value: ecflow.Days.friday @@ -33,6 +50,10 @@ Usage: :value: ecflow.Days.monday +.. py:property:: Days.name + :module: ecflow + + .. py:attribute:: Days.names :module: ecflow :value: {'friday': ecflow.Days.friday, 'monday': ecflow.Days.monday, 'saturday': ecflow.Days.saturday, 'sunday': ecflow.Days.sunday, 'thursday': ecflow.Days.thursday, 'tuesday': ecflow.Days.tuesday, 'wednesday': ecflow.Days.wednesday} @@ -58,6 +79,10 @@ Usage: :value: ecflow.Days.tuesday +.. py:property:: Days.value + :module: ecflow + + .. py:attribute:: Days.values :module: ecflow :value: {0: ecflow.Days.sunday, 1: ecflow.Days.monday, 2: ecflow.Days.tuesday, 3: ecflow.Days.wednesday, 4: ecflow.Days.thursday, 5: ecflow.Days.friday, 6: ecflow.Days.saturday} diff --git a/docs/python_api/Defs.rst b/docs/python_api/Defs.rst index 750349722..3c55eb03b 100644 --- a/docs/python_api/Defs.rst +++ b/docs/python_api/Defs.rst @@ -5,7 +5,7 @@ ecflow.Defs .. py:class:: Defs :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` The Defs class holds the :term:`suite definition` structure. @@ -70,81 +70,80 @@ Create a Defs from an existing file on disk: print(defs) -.. py:method:: Defs.add +.. py:method:: Defs.add(self: ecflow.Defs, *args, **kwargs) -> object :module: ecflow -object add(tuple args, dict kwds) : - add(..) provides a way to append Nodes and attributes - - This is best illustrated with an example: - - .. code-block:: python - - defs = Defs().add( - Suite('s1').add( - Clock(1, 1, 2010, False), - Autocancel(1, 10, True), - Task('t1').add( - Edit({'a':'12', 'b':'bb'}, c='v',d='b'), - Edit(g='d'), - Edit(h=1), - Event(1), - Event(11,'event'), - Meter('meter',0,10,10), - Label('label','c'), - Trigger('1==1'), - Complete('1==1'), - Limit('limit',10),Limit('limit2',10), - InLimit('limitName','/limit',2), - Defstatus(DState.complete), - Today(0,30),Today('00:59'),Today('00:00 11:30 00:01'), - Time(0,30),Time('00:59'),Time('00:00 11:30 00:01'), - Day('sunday'),Day(Days.monday), - Date(1,1,0),Date(28,2,1960), - Autocancel(3) - ), - [ Family('f{}'.format(i)) for i in range(1,6)])) - - We can also use '+=' with a list here are a few examples: - - .. code-block:: python - - defs = Defs(); - defs += [ Suite('s2'),Edit({ 'x1':'y', 'aa1':'bb'}, a='v',b='b') ] - - .. code-block:: python - - defs += [ Suite('s{}'.format(i)) for i in range(1,6) ] - - .. code-block:: python - - defs = Defs() - defs += [ Suite('suite').add( - Task('x'), - Family('f').add( [ Task('t{}'.format(i)) for i in range(1,6)] ), - Task('y'), - [ Family('f{}'.format(i)) for i in range(1,6) ], - Edit(a='b'), - [ Task('t{}'.format(i)) for i in range(1,6) ], - )] - - It is also possible to use '+' - - .. code-block:: python - - defs = Defs() + Suite('s1') - defs.s1 += Autocancel(1, 10, True) - defs.s1 += Task('t1') + Edit({ 'e':1, 'f':'bb'}) +\ - Event(1) + Event(11,'event') + Meter('meter',0,10,10) + Label('label','c') + Trigger('1==1') +\ - Complete('1==1') + Limit('limit',10) + Limit('limit2',10) + InLimit('limitName','/limit',2) +\ - Defstatus(DState.complete) + Today(0,30) + Today('00:59') + Today('00:00 11:30 00:01') +\ - Time(0,30) + Time('00:59') + Time('00:00 11:30 00:01') + Day('sunday') + Day(Days.monday) +\ - Date(1,1,0) + Date(28,2,1960) + Autocancel(3) - - .. warning:: We can only use '+' when the left most object is a node, i.e Task('t1') in this case - - -.. py:method:: Defs.add_extern( (Defs)arg1, (str)arg2) -> None : +add(..) provides a way to append Nodes and attributes + +This is best illustrated with an example: + +.. code-block:: python + + defs = Defs().add( + Suite('s1').add( + Clock(1, 1, 2010, False), + Autocancel(1, 10, True), + Task('t1').add( + Edit({'a':'12', 'b':'bb'}, c='v',d='b'), + Edit(g='d'), + Edit(h=1), + Event(1), + Event(11,'event'), + Meter('meter',0,10,10), + Label('label','c'), + Trigger('1==1'), + Complete('1==1'), + Limit('limit',10),Limit('limit2',10), + InLimit('limitName','/limit',2), + Defstatus(DState.complete), + Today(0,30),Today('00:59'),Today('00:00 11:30 00:01'), + Time(0,30),Time('00:59'),Time('00:00 11:30 00:01'), + Day('sunday'),Day(Days.monday), + Date(1,1,0),Date(28,2,1960), + Autocancel(3) + ), + [ Family('f{}'.format(i)) for i in range(1,6)])) + +We can also use '+=' with a list here are a few examples: + +.. code-block:: python + + defs = Defs(); + defs += [ Suite('s2'),Edit({ 'x1':'y', 'aa1':'bb'}, a='v',b='b') ] + +.. code-block:: python + + defs += [ Suite('s{}'.format(i)) for i in range(1,6) ] + +.. code-block:: python + + defs = Defs() + defs += [ Suite('suite').add( + Task('x'), + Family('f').add( [ Task('t{}'.format(i)) for i in range(1,6)] ), + Task('y'), + [ Family('f{}'.format(i)) for i in range(1,6) ], + Edit(a='b'), + [ Task('t{}'.format(i)) for i in range(1,6) ], + )] + +It is also possible to use '+' + +.. code-block:: python + + defs = Defs() + Suite('s1') + defs.s1 += Autocancel(1, 10, True) + defs.s1 += Task('t1') + Edit({ 'e':1, 'f':'bb'}) +\ + Event(1) + Event(11,'event') + Meter('meter',0,10,10) + Label('label','c') + Trigger('1==1') +\ + Complete('1==1') + Limit('limit',10) + Limit('limit2',10) + InLimit('limitName','/limit',2) +\ + Defstatus(DState.complete) + Today(0,30) + Today('00:59') + Today('00:00 11:30 00:01') +\ + Time(0,30) + Time('00:59') + Time('00:00 11:30 00:01') + Day('sunday') + Day(Days.monday) +\ + Date(1,1,0) + Date(28,2,1960) + Autocancel(3) + +.. warning:: We can only use '+' when the left most object is a node, i.e Task('t1') in this case + + +.. py:method:: Defs.add_extern(self: ecflow.Defs, arg0: str) -> None :module: ecflow :term:`extern` refer to nodes that have not yet been defined typically due to cross suite :term:`dependencies` @@ -190,80 +189,87 @@ Usage: defs.auto_add_externs(True) # remove existing extern first. -.. py:method:: Defs.add_suite( (Defs)arg1, (Suite)arg2) -> Suite : +.. py:method:: Defs.add_suite(*args, **kwargs) :module: ecflow +Overloaded function. + +1. add_suite(self: ecflow.Defs, arg0: ecflow.Suite) -> ecflow.Suite + Add a :term:`suite` :term:`node`. See :py:class:`ecflow.Suite` - - If a new suite is added which matches the name of an existing suite, then an exception is thrown. - - Exception: - - - Throws RuntimeError is the suite name is not valid - - Throws RuntimeError if duplicate suite is added - - Usage: - - .. code-block:: python - - defs = Defs() # create a empty defs - suite = Suite('suite') # create a stand alone Suite - defs.add_suite(suite) # add suite to defs - s2 = defs.add_suite('s2') # create a suite and add to defs - - # Alternatively we can create Suite in place - defs = Defs( - Suite('s1', - Family('f1', - Task('t1'))), - Suite('s2', - Family('f1', - Task('t1')))) - - -add_suite( (Defs)arg1, (str)arg2) -> Suite : - Create a empty Defs - - - - -.. py:method:: Defs.add_variable( (Defs)arg1, (str)arg2, (str)arg3) -> Defs : + +If a new suite is added which matches the name of an existing suite, then an exception is thrown. + +Exception: + +- Throws RuntimeError is the suite name is not valid +- Throws RuntimeError if duplicate suite is added + +Usage: + +.. code-block:: python + + defs = Defs() # create a empty defs + suite = Suite('suite') # create a stand alone Suite + defs.add_suite(suite) # add suite to defs + s2 = defs.add_suite('s2') # create a suite and add to defs + + # Alternatively we can create Suite in place + defs = Defs( + Suite('s1', + Family('f1', + Task('t1'))), + Suite('s2', + Family('f1', + Task('t1')))) + + +2. add_suite(self: ecflow.Defs, arg0: str) -> ecflow.Suite + +Create a empty Defs + + +.. py:method:: Defs.add_variable(*args, **kwargs) :module: ecflow +Overloaded function. + +1. add_variable(self: ecflow.Defs, arg0: str, arg1: str) -> ecflow.Defs + Adds a name value :term:`variable`. Also see :py:class:`ecflow.Edit` - - This defines a variable for use in :term:`variable substitution` in a :term:`ecf script` file. - There can be any number of variables. The variables are names inside a pair of - '%' characters in an :term:`ecf script`. The name are case sensitive. - Special character in the value, must be placed inside single quotes if misinterpretation - is to be avoided. - The value of the variable replaces the variable name in the :term:`ecf script` at `job creation` time. - The variable names for any given node must be unique. If duplicates are added then the - the last value added is kept. - - Exception: - - - Writes warning to standard output, if a duplicate variable name is added - - Usage: - - .. code-block:: python - - task.add_variable( Variable('ECF_HOME','/tmp/')) - task.add_variable( 'TMPDIR','/tmp/') - task.add_variable( 'COUNT',2) - a_dict = { 'name':'value', 'name2':'value2', 'name3':'value3' } - task.add_variable(a_dict) - - -add_variable( (Defs)arg1, (str)arg2, (int)arg3) -> Defs - -add_variable( (Defs)arg1, (Variable)arg2) -> Defs - -add_variable( (Defs)arg1, (dict)arg2) -> Defs - - -.. py:method:: Defs.auto_add_externs( (Defs)arg1, (bool)arg2) -> None : + +This defines a variable for use in :term:`variable substitution` in a :term:`ecf script` file. +There can be any number of variables. The variables are names inside a pair of +'%' characters in an :term:`ecf script`. The name are case sensitive. +Special character in the value, must be placed inside single quotes if misinterpretation +is to be avoided. +The value of the variable replaces the variable name in the :term:`ecf script` at `job creation` time. +The variable names for any given node must be unique. If duplicates are added then the +the last value added is kept. + +Exception: + +- Writes warning to standard output, if a duplicate variable name is added + +Usage: + +.. code-block:: python + + task.add_variable( Variable('ECF_HOME','/tmp/')) + task.add_variable( 'TMPDIR','/tmp/') + task.add_variable( 'COUNT',2) + a_dict = { 'name':'value', 'name2':'value2', 'name3':'value3' } + task.add_variable(a_dict) + + +2. add_variable(self: ecflow.Defs, arg0: str, arg1: typing.SupportsInt | typing.SupportsIndex) -> ecflow.Defs + +3. add_variable(self: ecflow.Defs, arg0: ecflow.Variable) -> ecflow.Defs + +4. add_variable(self: ecflow.Defs, arg0: dict) -> ecflow.Defs + + +.. py:method:: Defs.auto_add_externs(self: ecflow.Defs, arg0: bool) -> None :module: ecflow :term:`extern` refer to nodes that have not yet been defined typically due to cross suite :term:`dependencies` @@ -309,7 +315,7 @@ Usage: defs.auto_add_externs(True) # remove existing extern first. -.. py:method:: Defs.check( (Defs)arg1) -> str : +.. py:method:: Defs.check(self: ecflow.Defs) -> str :module: ecflow Check :term:`trigger` and :term:`complete expression`\ s and :term:`limit`\ s @@ -339,61 +345,65 @@ Usage: print(str(e)) -.. py:method:: Defs.check_job_creation( (Defs)arg1 [, (bool)throw_on_error=False [, (bool)verbose=False]]) -> str : +.. py:method:: Defs.check_job_creation(*args, **kwargs) :module: ecflow +Overloaded function. + +1. check_job_creation(self: ecflow.Defs, throw_on_error: bool = False, verbose: bool = False) -> str + Check `job creation` . - - Will check the following: - - - :term:`ecf script` files and includes files can be located - - recursive includes - - manual and comments :term:`pre-processing` - - :term:`variable substitution` - - Some :term:`task`\ s are dummy tasks have no associated :term:`ecf script` file. - To disable error message for these tasks please add a variable called ECF_DUMMY_TASK to them. - Checking is done in conjunction with the class :py:class:`ecflow.JobCreationCtrl`. - If no node path is set on class JobCreationCtrl then all tasks are checked. - In the case where we want to check all tasks, use the convenience function that take no arguments. - - Usage: - - .. code-block:: python - - defs = Defs('my.def') # specify the defs we want to check, load into memory - ... - print(defs.check_job_creation()) # Check job generation for all tasks - ... - - # throw on error and Output the tasks as they are being checked - defs.check_job_creation(throw_on_error=TrueTrue,verbose=True) - - job_ctrl = JobCreationCtrl() - job_ctrl.set_verbose(True) # Output the tasks as they are being checked - defs.check_job_creation(job_ctrl) # Check job generation for all tasks, same as above - print(job_ctrl.get_error_msg()) - ... - job_ctrl = JobCreationCtrl() - job_ctrl.set_node_path('/suite/to_check') # will hierarchically check job creation under this node - defs.check_job_creation(job_ctrl) # job files generated to ECF_JOB - print(job_ctrl.get_error_msg()) - ... - job_ctrl = JobCreationCtrl() # no set_node_path() hence check job creation for all tasks - job_ctrl.set_dir_for_job_creation(tmp) # generate jobs file under this directory - defs.check_job_creation(job_ctrl) - print(job_ctrl.get_error_msg()) - ... - job_ctrl = JobCreationCtrl() # no set_node_path() hence check job creation for all tasks - job_ctrl.generate_temp_dir() # automatically generate directory for job file - defs.check_job_creation(job_ctrl) - print(job_ctrl.get_error_msg()) - - -check_job_creation( (Defs)arg1, (JobCreationCtrl)arg2) -> None - - -.. py:method:: Defs.delete_variable( (Defs)arg1, (str)arg2) -> None : + +Will check the following: + +- :term:`ecf script` files and includes files can be located +- recursive includes +- manual and comments :term:`pre-processing` +- :term:`variable substitution` + +Some :term:`task`\ s are dummy tasks have no associated :term:`ecf script` file. +To disable error message for these tasks please add a variable called ECF_DUMMY_TASK to them. +Checking is done in conjunction with the class :py:class:`ecflow.JobCreationCtrl`. +If no node path is set on class JobCreationCtrl then all tasks are checked. +In the case where we want to check all tasks, use the convenience function that take no arguments. + +Usage: + +.. code-block:: python + + defs = Defs('my.def') # specify the defs we want to check, load into memory + ... + print(defs.check_job_creation()) # Check job generation for all tasks + ... + + # throw on error and Output the tasks as they are being checked + defs.check_job_creation(throw_on_error=TrueTrue,verbose=True) + + job_ctrl = JobCreationCtrl() + job_ctrl.set_verbose(True) # Output the tasks as they are being checked + defs.check_job_creation(job_ctrl) # Check job generation for all tasks, same as above + print(job_ctrl.get_error_msg()) + ... + job_ctrl = JobCreationCtrl() + job_ctrl.set_node_path('/suite/to_check') # will hierarchically check job creation under this node + defs.check_job_creation(job_ctrl) # job files generated to ECF_JOB + print(job_ctrl.get_error_msg()) + ... + job_ctrl = JobCreationCtrl() # no set_node_path() hence check job creation for all tasks + job_ctrl.set_dir_for_job_creation(tmp) # generate jobs file under this directory + defs.check_job_creation(job_ctrl) + print(job_ctrl.get_error_msg()) + ... + job_ctrl = JobCreationCtrl() # no set_node_path() hence check job creation for all tasks + job_ctrl.generate_temp_dir() # automatically generate directory for job file + defs.check_job_creation(job_ctrl) + print(job_ctrl.get_error_msg()) + + +2. check_job_creation(self: ecflow.Defs, arg0: ecflow.JobCreationCtrl) -> None + + +.. py:method:: Defs.delete_variable(self: ecflow.Defs, arg0: str) -> None :module: ecflow An empty string will delete all user variables @@ -405,31 +415,31 @@ An empty string will delete all user variables Returns a list of :term:`extern`\ s -.. py:method:: Defs.find_abs_node( (Defs)arg1, (str)arg2) -> Node : +.. py:method:: Defs.find_abs_node(self: ecflow.Defs, arg0: str) -> ecflow.Node :module: ecflow Given a path, find the the :term:`node` -.. py:method:: Defs.find_node( (Defs)arg1, (str)arg2, (str)arg3) -> Node : +.. py:method:: Defs.find_node(self: ecflow.Defs, arg0: str, arg1: str) -> ecflow.Node :module: ecflow Given a type(suite,family,task) and a path to a node, return the node. -.. py:method:: Defs.find_node_path( (Defs)arg1, (str)arg2, (str)arg3) -> str : +.. py:method:: Defs.find_node_path(self: ecflow.Defs, arg0: str, arg1: str) -> str :module: ecflow Given a type(suite,family,task) and a name, return path of the first match, otherwise return an empty string -.. py:method:: Defs.find_suite( (Defs)arg1, (str)arg2) -> Suite : +.. py:method:: Defs.find_suite(self: ecflow.Defs, arg0: str) -> ecflow.Suite :module: ecflow Given a name, find the corresponding :term:`suite` -.. py:method:: Defs.generate_scripts( (Defs)arg1) -> None : +.. py:method:: Defs.generate_scripts(self: ecflow.Defs) -> None :module: ecflow Automatically generate template :term:`ecf script`\ s for this definition @@ -473,19 +483,19 @@ Usage: defs.generate_scripts() # generate '.ecf' and head.h/tail.h if required -.. py:method:: Defs.get_all_nodes( (Defs)arg1) -> NodeVec : +.. py:method:: Defs.get_all_nodes(self: ecflow.Defs) -> ecflow.NodeVec :module: ecflow Returns all the :term:`node`\ s in the definition -.. py:method:: Defs.get_all_tasks( (Defs)arg1) -> TaskVec : +.. py:method:: Defs.get_all_tasks(self: ecflow.Defs) -> ecflow.TaskVec :module: ecflow Returns all the :term:`task` nodes -.. py:method:: Defs.get_server_state( (Defs)arg1) -> SState : +.. py:method:: Defs.get_server_state(self: ecflow.Defs) -> ecflow.SState :module: ecflow Returns the :term:`ecflow_server` state: See :term:`server states` @@ -504,34 +514,42 @@ Usage: print(str(e)) -.. py:method:: Defs.get_state( (Defs)arg1) -> State +.. py:method:: Defs.get_state(self: ecflow.Defs) -> ecflow.State :module: ecflow -.. py:method:: Defs.has_time_dependencies( (Defs)arg1) -> bool : +.. py:method:: Defs.has_time_dependencies(self: ecflow.Defs) -> bool :module: ecflow returns True if the :term:`suite definition` has any time :term:`dependencies` -.. py:method:: Defs.restore_from_checkpt( (Defs)arg1, (str)arg2) -> None : +.. py:method:: Defs.restore_from_checkpt(self: ecflow.Defs, arg0: str) -> None :module: ecflow Restore the :term:`suite definition` from a :term:`check point` file stored on disk -.. py:method:: Defs.save_as_checkpt( (Defs)arg1, (str)arg2) -> None : +.. py:method:: Defs.save_as_checkpt(self: ecflow.Defs, arg0: str) -> None :module: ecflow Save the in memory :term:`suite definition` as a :term:`check point` file. This includes all node state. -.. py:method:: Defs.save_as_defs( (Defs)arg1, (str)arg2 [, (Style)arg3]) -> None : +.. py:method:: Defs.save_as_defs(*args, **kwargs) :module: ecflow +Overloaded function. + +1. save_as_defs(self: ecflow.Defs, arg0: str, arg1: ecflow.Style) -> None + +Save the in memory :term:`suite definition` into a file. The file name must be passed as an argument + + + +2. save_as_defs(self: ecflow.Defs, arg0: str) -> None + Save the in memory :term:`suite definition` into a file. The file name must be passed as an argument - - .. py:property:: Defs.server_variables @@ -540,7 +558,7 @@ Save the in memory :term:`suite definition` into a file. The file name must be p Returns a list of server :term:`variable`\ s -.. py:method:: Defs.simulate( (Defs)arg1) -> str : +.. py:method:: Defs.simulate(self: ecflow.Defs) -> str :module: ecflow Simulates a suite definition, allowing you predict/verify the behaviour of your suite in few seconds @@ -587,16 +605,14 @@ Usage: print(theResults) -.. py:method:: Defs.sort_attributes( (Defs)arg1, (AttrType)arg2) -> None +.. py:method:: Defs.sort_attributes(*args, **kwargs) :module: ecflow -sort_attributes( (Defs)arg1, (AttrType)arg2, (bool)arg3) -> None - -sort_attributes( (Defs)arg1, (AttrType)arg2, (bool)arg3, (list)arg4) -> None +Overloaded function. -sort_attributes( (Defs)arg1, (str)attribute_type [, (bool)recursive=True [, (list)no_sort=[]]]) -> None +1. sort_attributes(self: ecflow.Defs, attribute_type: str, recursive: bool = True, no_sort: list = []) -> None -sort_attributes( (Defs)arg1, (AttrType)arg2, (bool)attribute_type [, (object)recursive=True]) -> None +2. sort_attributes(self: ecflow.Defs, attribute_type: ecflow.AttrType, recursive: bool = True, no_sort: collections.abc.Sequence[str] = []) -> None .. py:property:: Defs.suites diff --git a/docs/python_api/Defstatus.rst b/docs/python_api/Defstatus.rst index f62e0dd1d..278fe26ea 100644 --- a/docs/python_api/Defstatus.rst +++ b/docs/python_api/Defstatus.rst @@ -5,7 +5,7 @@ ecflow.Defstatus .. py:class:: Defstatus :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` A :term:`node` can be set with a default status other the :term:`queued` @@ -14,6 +14,6 @@ This defines the state to take at 'begin' or 're-queue' time See :py:class:`ecflow.Node.add_defstatus` and :py:class:`ecflow.DState` -.. py:method:: Defstatus.state( (Defstatus)arg1) -> DState +.. py:method:: Defstatus.state(self: ecflow.Defstatus) -> ecflow.DState :module: ecflow diff --git a/docs/python_api/Ecf.rst b/docs/python_api/Ecf.rst index 29f927a32..9f5115b41 100644 --- a/docs/python_api/Ecf.rst +++ b/docs/python_api/Ecf.rst @@ -5,33 +5,33 @@ ecflow.Ecf .. py:class:: Ecf :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Singleton used to control ecf debugging -.. py:method:: Ecf.debug_equality() -> bool : +.. py:method:: Ecf.debug_equality() -> bool :module: ecflow :staticmethod: Returns true if debugging of equality is enabled -.. py:method:: Ecf.debug_level() -> int : +.. py:method:: Ecf.debug_level() -> int :module: ecflow :staticmethod: Returns integer showing debug level. debug_level > 0 will disable some warning messages -.. py:method:: Ecf.set_debug_equality( (bool)arg1) -> None : +.. py:method:: Ecf.set_debug_equality(arg0: bool) -> None :module: ecflow :staticmethod: Set debugging for equality -.. py:method:: Ecf.set_debug_level( (int)arg1) -> None : +.. py:method:: Ecf.set_debug_level(arg0: typing.SupportsInt | typing.SupportsIndex) -> None :module: ecflow :staticmethod: diff --git a/docs/python_api/Edit.rst b/docs/python_api/Edit.rst index 41abe6d9b..5d9ac57b9 100644 --- a/docs/python_api/Edit.rst +++ b/docs/python_api/Edit.rst @@ -5,7 +5,7 @@ ecflow.Edit .. py:class:: Edit :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Defines a :term:`variable` on a :term:`node` for use in :term:`ecf script`. diff --git a/docs/python_api/Event.rst b/docs/python_api/Event.rst index 62291d63d..432553324 100644 --- a/docs/python_api/Event.rst +++ b/docs/python_api/Event.rst @@ -5,7 +5,7 @@ ecflow.Event .. py:class:: Event :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` :term:`event`\ s are used as signal mechanism. @@ -48,37 +48,37 @@ Usage: Event(2,'event_name')) -.. py:method:: Event.empty( (Event)arg1) -> bool : +.. py:method:: Event.empty(self: ecflow.Event) -> bool :module: ecflow Return true if the Event is empty. Used when returning a NULL Event, from a find -.. py:method:: Event.initial_value( (Event)arg1) -> bool : +.. py:method:: Event.initial_value(self: ecflow.Event) -> bool :module: ecflow Return events initial value, This is value taken for begin/re-queue -.. py:method:: Event.name( (Event)arg1) -> str : +.. py:method:: Event.name(self: ecflow.Event) -> str :module: ecflow Return the Events name as string. If number supplied name may be empty. -.. py:method:: Event.name_or_number( (Event)arg1) -> str : +.. py:method:: Event.name_or_number(self: ecflow.Event) -> str :module: ecflow Returns name or number as string -.. py:method:: Event.number( (Event)arg1) -> int : +.. py:method:: Event.number(self: ecflow.Event) -> int :module: ecflow Return events number as a integer. If not specified return max integer value -.. py:method:: Event.value( (Event)arg1) -> bool : +.. py:method:: Event.value(self: ecflow.Event) -> bool :module: ecflow Return events current value diff --git a/docs/python_api/Expression.rst b/docs/python_api/Expression.rst index cafb1fd94..98876f754 100644 --- a/docs/python_api/Expression.rst +++ b/docs/python_api/Expression.rst @@ -5,7 +5,7 @@ ecflow.Expression .. py:class:: Expression :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Expression holds :term:`trigger` or :term:`complete expression`. Also see :py:class:`ecflow.Trigger` @@ -57,13 +57,13 @@ Here the trigger for task2 is equivalent to 't0 == complete and t1 == complete or t4 == complete or t5 == active' -.. py:method:: Expression.add( (Expression)arg1, (PartExpression)arg2) -> None : +.. py:method:: Expression.add(self: ecflow.Expression, arg0: ecflow.PartExpression) -> None :module: ecflow Add a part expression, the second and subsequent part expressions must have 'and/or' set -.. py:method:: Expression.get_expression( (Expression)arg1) -> str : +.. py:method:: Expression.get_expression(self: ecflow.Expression) -> str :module: ecflow returns the complete expression as a string diff --git a/docs/python_api/FamilyVec.rst b/docs/python_api/FamilyVec.rst index 2646765a7..59e2ea23e 100644 --- a/docs/python_api/FamilyVec.rst +++ b/docs/python_api/FamilyVec.rst @@ -5,15 +5,65 @@ ecflow.FamilyVec .. py:class:: FamilyVec :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Hold a list of :term:`family` nodes -.. py:method:: FamilyVec.append( (FamilyVec)arg1, (object)arg2) -> None +.. py:method:: FamilyVec.append(self: ecflow.FamilyVec, x: Family) -> None :module: ecflow +Add an item to the end of the list -.. py:method:: FamilyVec.extend( (FamilyVec)arg1, (object)arg2) -> None + +.. py:method:: FamilyVec.clear(self: ecflow.FamilyVec) -> None + :module: ecflow + +Clear the contents + + +.. py:method:: FamilyVec.count(self: ecflow.FamilyVec, x: Family) -> int + :module: ecflow + +Return the number of times ``x`` appears in the list + + +.. py:method:: FamilyVec.extend(*args, **kwargs) + :module: ecflow + +Overloaded function. + +1. extend(self: ecflow.FamilyVec, L: ecflow.FamilyVec) -> None + +Extend the list by appending all the items in the given list + +2. extend(self: ecflow.FamilyVec, L: collections.abc.Iterable) -> None + +Extend the list by appending all the items in the given list + + +.. py:method:: FamilyVec.insert(self: ecflow.FamilyVec, i: typing.SupportsInt | typing.SupportsIndex, x: Family) -> None + :module: ecflow + +Insert an item at a given position. + + +.. py:method:: FamilyVec.pop(*args, **kwargs) :module: ecflow +Overloaded function. + +1. pop(self: ecflow.FamilyVec) -> Family + +Remove and return the last item + +2. pop(self: ecflow.FamilyVec, i: typing.SupportsInt | typing.SupportsIndex) -> Family + +Remove and return the item at index ``i`` + + +.. py:method:: FamilyVec.remove(self: ecflow.FamilyVec, x: Family) -> None + :module: ecflow + +Remove the first item from the list whose value is x. It is an error if there is no such item. + diff --git a/docs/python_api/File.rst b/docs/python_api/File.rst index 487fe6fd8..7ea57c61b 100644 --- a/docs/python_api/File.rst +++ b/docs/python_api/File.rst @@ -5,33 +5,33 @@ ecflow.File .. py:class:: File :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Utility class, Used in test only. -.. py:method:: File.build_dir() -> str : +.. py:method:: File.build_dir() -> str :module: ecflow :staticmethod: Path name to ecflow build directory -.. py:method:: File.find_client() -> str : +.. py:method:: File.find_client() -> str :module: ecflow :staticmethod: Provides pathname to the client -.. py:method:: File.find_server() -> str : +.. py:method:: File.find_server() -> str :module: ecflow :staticmethod: Provides pathname to the server -.. py:method:: File.source_dir() -> str : +.. py:method:: File.source_dir() -> str :module: ecflow :staticmethod: diff --git a/docs/python_api/Flag.rst b/docs/python_api/Flag.rst index a32a9960b..6097b7290 100644 --- a/docs/python_api/Flag.rst +++ b/docs/python_api/Flag.rst @@ -5,45 +5,45 @@ ecflow.Flag .. py:class:: Flag :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Represents additional state associated with a Node. -.. py:method:: Flag.clear( (Flag)arg1, (FlagType)arg2) -> None : +.. py:method:: Flag.clear(self: ecflow.Flag, arg0: ecflow.FlagType) -> None :module: ecflow Clear the given flag. Used in test only -.. py:method:: Flag.is_set( (Flag)arg1, (FlagType)arg2) -> bool : +.. py:method:: Flag.is_set(self: ecflow.Flag, arg0: ecflow.FlagType) -> bool :module: ecflow Queries if a given flag is set -.. py:method:: Flag.list() -> FlagTypeVec : +.. py:method:: Flag.list() -> std::__1::vector> :module: ecflow :staticmethod: -Returns the list of all flag types. returns FlagTypeVec. Used in test only +Returns the list of all flag types. returns FlagTypeVec. Tests only -.. py:method:: Flag.reset( (Flag)arg1) -> None : +.. py:method:: Flag.reset(self: ecflow.Flag) -> None :module: ecflow Clears all flags. Used in test only -.. py:method:: Flag.set( (Flag)arg1, (FlagType)arg2) -> None : +.. py:method:: Flag.set(self: ecflow.Flag, arg0: ecflow.FlagType) -> None :module: ecflow Sets the given flag. Used in test only -.. py:method:: Flag.type_to_string( (FlagType)arg1) -> str : +.. py:method:: Flag.type_to_string(arg0: ecflow.FlagType) -> str :module: ecflow :staticmethod: -Convert type to a string. Used in test only +Convert type to a string. Tests only diff --git a/docs/python_api/FlagType.rst b/docs/python_api/FlagType.rst index 0ce429689..f3dde79a3 100644 --- a/docs/python_api/FlagType.rst +++ b/docs/python_api/FlagType.rst @@ -5,7 +5,7 @@ ecflow.FlagType .. py:class:: FlagType :module: ecflow - Bases: :py:class:`~Boost.Python.enum` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Flags store state associated with a node @@ -36,6 +36,61 @@ Flags store state associated with a node - NOT_SET +Members: + + force_abort + + user_edit + + task_aborted + + edit_failed + + jobcmd_failed + + killcmd_failed + + statuscmd_failed + + no_script + + killed + + status + + late + + message + + byrule + + queuelimit + + wait + + locked + + zombie + + no_reque + + archived + + restored + + threshold + + sigterm + + not_set + + log_error + + checkpt_error + + remote_error + + .. py:attribute:: FlagType.archived :module: ecflow :value: ecflow.FlagType.archived @@ -96,6 +151,10 @@ Flags store state associated with a node :value: ecflow.FlagType.message +.. py:property:: FlagType.name + :module: ecflow + + .. py:attribute:: FlagType.names :module: ecflow :value: {'archived': ecflow.FlagType.archived, 'byrule': ecflow.FlagType.byrule, 'checkpt_error': ecflow.FlagType.checkpt_error, 'edit_failed': ecflow.FlagType.edit_failed, 'force_abort': ecflow.FlagType.force_abort, 'jobcmd_failed': ecflow.FlagType.jobcmd_failed, 'killcmd_failed': ecflow.FlagType.killcmd_failed, 'killed': ecflow.FlagType.killed, 'late': ecflow.FlagType.late, 'locked': ecflow.FlagType.locked, 'log_error': ecflow.FlagType.log_error, 'message': ecflow.FlagType.message, 'no_reque': ecflow.FlagType.no_reque, 'no_script': ecflow.FlagType.no_script, 'not_set': ecflow.FlagType.not_set, 'queuelimit': ecflow.FlagType.queuelimit, 'remote_error': ecflow.FlagType.remote_error, 'restored': ecflow.FlagType.restored, 'sigterm': ecflow.FlagType.sigterm, 'status': ecflow.FlagType.status, 'statuscmd_failed': ecflow.FlagType.statuscmd_failed, 'task_aborted': ecflow.FlagType.task_aborted, 'threshold': ecflow.FlagType.threshold, 'user_edit': ecflow.FlagType.user_edit, 'wait': ecflow.FlagType.wait, 'zombie': ecflow.FlagType.zombie} @@ -161,6 +220,10 @@ Flags store state associated with a node :value: ecflow.FlagType.user_edit +.. py:property:: FlagType.value + :module: ecflow + + .. py:attribute:: FlagType.values :module: ecflow :value: {0: ecflow.FlagType.force_abort, 1: ecflow.FlagType.user_edit, 2: ecflow.FlagType.task_aborted, 3: ecflow.FlagType.edit_failed, 4: ecflow.FlagType.jobcmd_failed, 5: ecflow.FlagType.no_script, 6: ecflow.FlagType.killed, 7: ecflow.FlagType.late, 8: ecflow.FlagType.message, 9: ecflow.FlagType.byrule, 10: ecflow.FlagType.queuelimit, 11: ecflow.FlagType.wait, 12: ecflow.FlagType.locked, 13: ecflow.FlagType.zombie, 14: ecflow.FlagType.no_reque, 15: ecflow.FlagType.archived, 16: ecflow.FlagType.restored, 17: ecflow.FlagType.threshold, 18: ecflow.FlagType.sigterm, 19: ecflow.FlagType.not_set, 20: ecflow.FlagType.log_error, 21: ecflow.FlagType.checkpt_error, 22: ecflow.FlagType.killcmd_failed, 23: ecflow.FlagType.statuscmd_failed, 24: ecflow.FlagType.status, 25: ecflow.FlagType.remote_error} diff --git a/docs/python_api/FlagTypeVec.rst b/docs/python_api/FlagTypeVec.rst index 79c0b2d94..5c1392744 100644 --- a/docs/python_api/FlagTypeVec.rst +++ b/docs/python_api/FlagTypeVec.rst @@ -5,15 +5,65 @@ ecflow.FlagTypeVec .. py:class:: FlagTypeVec :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Hold a list of flag types -.. py:method:: FlagTypeVec.append( (FlagTypeVec)arg1, (object)arg2) -> None +.. py:method:: FlagTypeVec.append(self: ecflow.FlagTypeVec, x: ecflow.FlagType) -> None :module: ecflow +Add an item to the end of the list -.. py:method:: FlagTypeVec.extend( (FlagTypeVec)arg1, (object)arg2) -> None + +.. py:method:: FlagTypeVec.clear(self: ecflow.FlagTypeVec) -> None + :module: ecflow + +Clear the contents + + +.. py:method:: FlagTypeVec.count(self: ecflow.FlagTypeVec, x: ecflow.FlagType) -> int + :module: ecflow + +Return the number of times ``x`` appears in the list + + +.. py:method:: FlagTypeVec.extend(*args, **kwargs) + :module: ecflow + +Overloaded function. + +1. extend(self: ecflow.FlagTypeVec, L: ecflow.FlagTypeVec) -> None + +Extend the list by appending all the items in the given list + +2. extend(self: ecflow.FlagTypeVec, L: collections.abc.Iterable) -> None + +Extend the list by appending all the items in the given list + + +.. py:method:: FlagTypeVec.insert(self: ecflow.FlagTypeVec, i: typing.SupportsInt | typing.SupportsIndex, x: ecflow.FlagType) -> None + :module: ecflow + +Insert an item at a given position. + + +.. py:method:: FlagTypeVec.pop(*args, **kwargs) :module: ecflow +Overloaded function. + +1. pop(self: ecflow.FlagTypeVec) -> ecflow.FlagType + +Remove and return the last item + +2. pop(self: ecflow.FlagTypeVec, i: typing.SupportsInt | typing.SupportsIndex) -> ecflow.FlagType + +Remove and return the item at index ``i`` + + +.. py:method:: FlagTypeVec.remove(self: ecflow.FlagTypeVec, x: ecflow.FlagType) -> None + :module: ecflow + +Remove the first item from the list whose value is x. It is an error if there is no such item. + diff --git a/docs/python_api/Generic.rst b/docs/python_api/Generic.rst index 262efde08..7dc3a8d5a 100644 --- a/docs/python_api/Generic.rst +++ b/docs/python_api/Generic.rst @@ -5,18 +5,18 @@ ecflow.Generic .. py:class:: Generic :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` A generic attribute, used to add new attributes for the future, without requiring a API change -.. py:method:: Generic.empty( (Generic)arg1) -> bool : +.. py:method:: Generic.empty(self: ecflow.Generic) -> bool :module: ecflow Return true if the Generic is empty. Used when returning a NULL Generic, from a find -.. py:method:: Generic.name( (Generic)arg1) -> str : +.. py:method:: Generic.name(self: ecflow.Generic) -> str :module: ecflow Return the generic name as string diff --git a/docs/python_api/InLimit.rst b/docs/python_api/InLimit.rst index 2395da974..6152568be 100644 --- a/docs/python_api/InLimit.rst +++ b/docs/python_api/InLimit.rst @@ -5,7 +5,7 @@ ecflow.InLimit .. py:class:: InLimit :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` :term:`inlimit` is used in conjunction with :term:`limit` to provide simple load management: @@ -45,31 +45,31 @@ Usage: family.add_inlimit(inlimit) # add existing inlimit using function -.. py:method:: InLimit.limit_submission( (InLimit)arg1) -> bool : +.. py:method:: InLimit.limit_submission(self: ecflow.InLimit) -> bool :module: ecflow Limit submission only -.. py:method:: InLimit.limit_this_node_only( (InLimit)arg1) -> bool : +.. py:method:: InLimit.limit_this_node_only(self: ecflow.InLimit) -> bool :module: ecflow Only this node is limited. i.e. typically Family or Suite -.. py:method:: InLimit.name( (InLimit)arg1) -> str : +.. py:method:: InLimit.name(self: ecflow.InLimit) -> str :module: ecflow Return the :term:`inlimit` name as string -.. py:method:: InLimit.path_to_node( (InLimit)arg1) -> str : +.. py:method:: InLimit.path_to_node(self: ecflow.InLimit) -> str :module: ecflow Path to the node that holds the limit, can be empty -.. py:method:: InLimit.tokens( (InLimit)arg1) -> int : +.. py:method:: InLimit.tokens(self: ecflow.InLimit) -> int :module: ecflow The number of token to consume from the Limit diff --git a/docs/python_api/JobCreationCtrl.rst b/docs/python_api/JobCreationCtrl.rst index ff38020de..753c1664d 100644 --- a/docs/python_api/JobCreationCtrl.rst +++ b/docs/python_api/JobCreationCtrl.rst @@ -5,7 +5,7 @@ ecflow.JobCreationCtrl .. py:class:: JobCreationCtrl :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` The class JobCreationCtrl is used in `job creation` checking @@ -35,37 +35,43 @@ Usage: print(job_ctrl.get_error_msg()) -.. py:method:: JobCreationCtrl.generate_temp_dir( (JobCreationCtrl)arg1) -> None : +.. py:method:: JobCreationCtrl.generate_temp_dir(self: ecflow.JobCreationCtrl) -> None :module: ecflow Automatically generated temporary directory for job creation. Directory written to stdout for information -.. py:method:: JobCreationCtrl.get_dir_for_job_creation( (JobCreationCtrl)arg1) -> str : +.. py:method:: JobCreationCtrl.get_dir_for_job_creation(self: ecflow.JobCreationCtrl) -> str :module: ecflow Returns the directory set for job creation -.. py:method:: JobCreationCtrl.get_error_msg( (JobCreationCtrl)arg1) -> str : +.. py:method:: JobCreationCtrl.get_error_msg(self: ecflow.JobCreationCtrl) -> str :module: ecflow Returns an error message generated during checking of job creation -.. py:method:: JobCreationCtrl.set_dir_for_job_creation( (JobCreationCtrl)arg1, (str)arg2) -> None : +.. py:method:: JobCreationCtrl.is_verbose(self: ecflow.JobCreationCtrl) -> bool + :module: ecflow + +Returns true if verbose mode is on, false otherwise + + +.. py:method:: JobCreationCtrl.set_dir_for_job_creation(self: ecflow.JobCreationCtrl, arg0: str) -> None :module: ecflow Specify directory, for job creation -.. py:method:: JobCreationCtrl.set_node_path( (JobCreationCtrl)arg1, (str)arg2) -> None : +.. py:method:: JobCreationCtrl.set_node_path(self: ecflow.JobCreationCtrl, arg0: str) -> None :module: ecflow The node we want to check job creation for. If no node specified check all tasks -.. py:method:: JobCreationCtrl.set_verbose( (JobCreationCtrl)arg1, (bool)arg2) -> None : +.. py:method:: JobCreationCtrl.set_verbose(self: ecflow.JobCreationCtrl, arg0: bool) -> None :module: ecflow Output each task as its being checked. diff --git a/docs/python_api/Label.rst b/docs/python_api/Label.rst index bbb28ec53..c705d21e6 100644 --- a/docs/python_api/Label.rst +++ b/docs/python_api/Label.rst @@ -5,7 +5,7 @@ ecflow.Label .. py:class:: Label :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` A :term:`label` has a name and value and provides a way of displaying information in a GUI. @@ -39,25 +39,25 @@ Usage: print(label) -.. py:method:: Label.empty( (Label)arg1) -> bool : +.. py:method:: Label.empty(self: ecflow.Label) -> bool :module: ecflow Return true if the Label is empty. Used when returning a NULL Label, from a find -.. py:method:: Label.name( (Label)arg1) -> str : +.. py:method:: Label.name(self: ecflow.Label) -> str :module: ecflow Return the :term:`label` name as string -.. py:method:: Label.new_value( (Label)arg1) -> str : +.. py:method:: Label.new_value(self: ecflow.Label) -> str :module: ecflow Return the new label value as string -.. py:method:: Label.value( (Label)arg1) -> str : +.. py:method:: Label.value(self: ecflow.Label) -> str :module: ecflow Return the original :term:`label` value as string diff --git a/docs/python_api/Late.rst b/docs/python_api/Late.rst index 2ab9067b8..30f4544a2 100644 --- a/docs/python_api/Late.rst +++ b/docs/python_api/Late.rst @@ -5,7 +5,7 @@ ecflow.Late .. py:class:: Late :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Sets the :term:`late` flag. @@ -34,58 +34,76 @@ Usage: Late(submitted='00:15',active='20:00')) -.. py:method:: Late.active( (Late)arg1, (int)arg2, (int)arg3) -> None : +.. py:method:: Late.active(*args, **kwargs) :module: ecflow +Overloaded function. + +1. active(self: ecflow.Late, arg0: typing.SupportsInt | typing.SupportsIndex, arg1: typing.SupportsInt | typing.SupportsIndex) -> None + active(hour,minute): The time the node must become :term:`active`. If the node is still :term:`queued` or :term:`submitted` - by the time specified, the late flag is set +by the time specified, the late flag is set + +2. active(self: ecflow.Late, arg0: ecflow.TimeSlot) -> None + +active(TimeSlot):The time the node must become :term:`active`. If the node is still :term:`queued` or :term:`submitted` +by the time specified, the late flag is set -active( (Late)arg1, (TimeSlot)arg2) -> None : - active(TimeSlot):The time the node must become :term:`active`. If the node is still :term:`queued` or :term:`submitted` - by the time specified, the late flag is set +3. active(self: ecflow.Late) -> ecflow.TimeSlot -active( (Late)arg1) -> TimeSlot : - Return the active time as a TimeSlot +Return the active time as a TimeSlot -.. py:method:: Late.complete( (Late)arg1, (int)arg2, (int)arg3, (bool)arg4) -> None : +.. py:method:: Late.complete(*args, **kwargs) :module: ecflow +Overloaded function. + +1. complete(self: ecflow.Late, arg0: typing.SupportsInt | typing.SupportsIndex, arg1: typing.SupportsInt | typing.SupportsIndex, arg2: bool) -> None + complete(hour,minute):The time the node must become :term:`complete`. If relative, time is taken from the time - the node became :term:`active`, otherwise node must be :term:`complete` by the time given +the node became :term:`active`, otherwise node must be :term:`complete` by the time given + +2. complete(self: ecflow.Late, arg0: ecflow.TimeSlot, arg1: bool) -> None -complete( (Late)arg1, (TimeSlot)arg2, (bool)arg3) -> None : - complete(TimeSlot): The time the node must become :term:`complete`. If relative, time is taken from the time - the node became :term:`active`, otherwise node must be :term:`complete` by the time given +complete(TimeSlot): The time the node must become :term:`complete`. If relative, time is taken from the time +the node became :term:`active`, otherwise node must be :term:`complete` by the time given -complete( (Late)arg1) -> TimeSlot : - Return the complete time as a TimeSlot +3. complete(self: ecflow.Late) -> ecflow.TimeSlot +Return the complete time as a TimeSlot -.. py:method:: Late.complete_is_relative( (Late)arg1) -> bool : + +.. py:method:: Late.complete_is_relative(self: ecflow.Late) -> bool :module: ecflow Returns a boolean where true means that complete is relative -.. py:method:: Late.is_late( (Late)arg1) -> bool : +.. py:method:: Late.is_late(self: ecflow.Late) -> bool :module: ecflow Return True if late -.. py:method:: Late.submitted( (Late)arg1, (TimeSlot)arg2) -> None : +.. py:method:: Late.submitted(*args, **kwargs) :module: ecflow +Overloaded function. + +1. submitted(self: ecflow.Late, arg0: ecflow.TimeSlot) -> None + submitted(TimeSlot):The time node can stay :term:`submitted`. Submitted is always relative. If the node stays - submitted longer than the time specified, the :term:`late` flag is set - +submitted longer than the time specified, the :term:`late` flag is set + + +2. submitted(self: ecflow.Late, arg0: typing.SupportsInt | typing.SupportsIndex, arg1: typing.SupportsInt | typing.SupportsIndex) -> None + +submitted(hour,minute) The time node can stay submitted. Submitted is always relative. If the node stays +submitted longer than the time specified, the late flag is set + -submitted( (Late)arg1, (int)arg2, (int)arg3) -> None : - submitted(hour,minute) The time node can stay submitted. Submitted is always relative. If the node stays - submitted longer than the time specified, the late flag is set - +3. submitted(self: ecflow.Late) -> ecflow.TimeSlot -submitted( (Late)arg1) -> TimeSlot : - Return the submitted time as a TimeSlot +Return the submitted time as a TimeSlot diff --git a/docs/python_api/Limit.rst b/docs/python_api/Limit.rst index 102789fe3..2a74bafe6 100644 --- a/docs/python_api/Limit.rst +++ b/docs/python_api/Limit.rst @@ -5,7 +5,7 @@ ecflow.Limit .. py:class:: Limit :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` :term:`limit` provides a simple load management @@ -32,37 +32,37 @@ Usage: suite.add_limit(limit) # add existing limit using function -.. py:method:: Limit.decrement( (Limit)arg1, (int)arg2, (str)arg3) -> None : +.. py:method:: Limit.decrement(self: ecflow.Limit, arg0: typing.SupportsInt | typing.SupportsIndex, arg1: str) -> None :module: ecflow used for test only -.. py:method:: Limit.increment( (Limit)arg1, (int)arg2, (str)arg3) -> None : +.. py:method:: Limit.increment(self: ecflow.Limit, arg0: typing.SupportsInt | typing.SupportsIndex, arg1: str) -> None :module: ecflow used for test only -.. py:method:: Limit.limit( (Limit)arg1) -> int : +.. py:method:: Limit.limit(self: ecflow.Limit) -> int :module: ecflow The max value of the :term:`limit` as an integer -.. py:method:: Limit.name( (Limit)arg1) -> str : +.. py:method:: Limit.name(self: ecflow.Limit) -> str :module: ecflow Return the :term:`limit` name as string -.. py:method:: Limit.node_paths( (Limit)arg1) -> list : +.. py:method:: Limit.node_paths(self: ecflow.Limit) -> list :module: ecflow List of nodes(paths) that have consumed a limit -.. py:method:: Limit.value( (Limit)arg1) -> int : +.. py:method:: Limit.value(self: ecflow.Limit) -> int :module: ecflow The :term:`limit` token value as an integer diff --git a/docs/python_api/Meter.rst b/docs/python_api/Meter.rst index 01a065e68..4d6b7f297 100644 --- a/docs/python_api/Meter.rst +++ b/docs/python_api/Meter.rst @@ -5,7 +5,7 @@ ecflow.Meter .. py:class:: Meter :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` :term:`meter`\ s can be used to indicate proportional completion of :term:`task` @@ -64,37 +64,37 @@ Using a meter requires: as a result triggers's which use meter equality may never evaluate -.. py:method:: Meter.color_change( (Meter)arg1) -> int : +.. py:method:: Meter.color_change(self: ecflow.Meter) -> int :module: ecflow returns the color change -.. py:method:: Meter.empty( (Meter)arg1) -> bool : +.. py:method:: Meter.empty(self: ecflow.Meter) -> bool :module: ecflow Return true if the Meter is empty. Used when returning a NULL Meter, from a find -.. py:method:: Meter.max( (Meter)arg1) -> int : +.. py:method:: Meter.max(self: ecflow.Meter) -> int :module: ecflow Return the Meters maximum value -.. py:method:: Meter.min( (Meter)arg1) -> int : +.. py:method:: Meter.min(self: ecflow.Meter) -> int :module: ecflow Return the Meters minimum value -.. py:method:: Meter.name( (Meter)arg1) -> str : +.. py:method:: Meter.name(self: ecflow.Meter) -> str :module: ecflow Return the Meters name as string -.. py:method:: Meter.value( (Meter)arg1) -> int : +.. py:method:: Meter.value(self: ecflow.Meter) -> int :module: ecflow Return meters current value diff --git a/docs/python_api/MirrorAttr.rst b/docs/python_api/MirrorAttr.rst index a69c0d434..3a511cd30 100644 --- a/docs/python_api/MirrorAttr.rst +++ b/docs/python_api/MirrorAttr.rst @@ -5,7 +5,7 @@ ecflow.MirrorAttr .. py:class:: MirrorAttr :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` A :term:`mirror` attribute, assigned to a :term:`node`, enables establishing an external link and locally replicate the state of a node executing on a remote ecFlow server. @@ -37,43 +37,43 @@ Usage: The parameters `remote_host`, `remote_port`, `polling`, `ssl`, and `auth` are optional -.. py:method:: MirrorAttr.auth( (MirrorAttr)arg1) -> str : +.. py:method:: MirrorAttr.auth(self: ecflow.MirrorAttr) -> str :module: ecflow Returns the path to Authentication credentials used to contact the remote ecFlow server -.. py:method:: MirrorAttr.name( (MirrorAttr)arg1) -> str : +.. py:method:: MirrorAttr.name(self: ecflow.MirrorAttr) -> str :module: ecflow Returns the name of the Mirror attribute -.. py:method:: MirrorAttr.polling( (MirrorAttr)arg1) -> str : +.. py:method:: MirrorAttr.polling(self: ecflow.MirrorAttr) -> str :module: ecflow Returns the polling interval used to contact the remove ecFlow server -.. py:method:: MirrorAttr.remote_host( (MirrorAttr)arg1) -> str : +.. py:method:: MirrorAttr.remote_host(self: ecflow.MirrorAttr) -> str :module: ecflow Returns the host of the remote ecFlow server -.. py:method:: MirrorAttr.remote_path( (MirrorAttr)arg1) -> str : +.. py:method:: MirrorAttr.remote_path(self: ecflow.MirrorAttr) -> str :module: ecflow Returns the path on the remote ecFlow server -.. py:method:: MirrorAttr.remote_port( (MirrorAttr)arg1) -> str : +.. py:method:: MirrorAttr.remote_port(self: ecflow.MirrorAttr) -> str :module: ecflow Returns the port of the remote ecFlow server -.. py:method:: MirrorAttr.ssl( (MirrorAttr)arg1) -> bool : +.. py:method:: MirrorAttr.ssl(self: ecflow.MirrorAttr) -> bool :module: ecflow Returns a boolean, where true means that SSL is enabled diff --git a/docs/python_api/Node.rst b/docs/python_api/Node.rst index 679c59d8d..df0db80a4 100644 --- a/docs/python_api/Node.rst +++ b/docs/python_api/Node.rst @@ -5,250 +5,264 @@ ecflow.Node .. py:class:: Node :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` A Node class is the abstract base class for Suite, Family and Task Every Node instance has a name, and a path relative to a suite -.. py:method:: Node.add - :module: ecflow - -object add(tuple args, dict kwds) : - add(..) provides a way to append Nodes and attributes - - This is best illustrated with an example: - - .. code-block:: python - - defs = Defs().add( - Suite('s1').add( - Clock(1, 1, 2010, False), - Autocancel(1, 10, True), - Task('t1').add( - Edit({'a':'12', 'b':'bb'}, c='v',d='b'), - Edit(g='d'), - Edit(h=1), - Event(1), - Event(11,'event'), - Meter('meter',0,10,10), - Label('label','c'), - Trigger('1==1'), - Complete('1==1'), - Limit('limit',10),Limit('limit2',10), - InLimit('limitName','/limit',2), - Defstatus(DState.complete), - Today(0,30),Today('00:59'),Today('00:00 11:30 00:01'), - Time(0,30),Time('00:59'),Time('00:00 11:30 00:01'), - Day('sunday'),Day(Days.monday), - Date(1,1,0),Date(28,2,1960), - Autocancel(3) - ), - [ Family('f{}'.format(i)) for i in range(1,6)])) - - We can also use '+=' with a list here are a few examples: - - .. code-block:: python - - defs = Defs(); - defs += [ Suite('s2'),Edit({ 'x1':'y', 'aa1':'bb'}, a='v',b='b') ] - - .. code-block:: python - - defs += [ Suite('s{}'.format(i)) for i in range(1,6) ] - - .. code-block:: python - - defs = Defs() - defs += [ Suite('suite').add( - Task('x'), - Family('f').add( [ Task('t{}'.format(i)) for i in range(1,6)] ), - Task('y'), - [ Family('f{}'.format(i)) for i in range(1,6) ], - Edit(a='b'), - [ Task('t{}'.format(i)) for i in range(1,6) ], - )] - - It is also possible to use '+' - - .. code-block:: python - - defs = Defs() + Suite('s1') - defs.s1 += Autocancel(1, 10, True) - defs.s1 += Task('t1') + Edit({ 'e':1, 'f':'bb'}) +\ - Event(1) + Event(11,'event') + Meter('meter',0,10,10) + Label('label','c') + Trigger('1==1') +\ - Complete('1==1') + Limit('limit',10) + Limit('limit2',10) + InLimit('limitName','/limit',2) +\ - Defstatus(DState.complete) + Today(0,30) + Today('00:59') + Today('00:00 11:30 00:01') +\ - Time(0,30) + Time('00:59') + Time('00:00 11:30 00:01') + Day('sunday') + Day(Days.monday) +\ - Date(1,1,0) + Date(28,2,1960) + Autocancel(3) - - .. warning:: We can only use '+' when the left most object is a node, i.e Task('t1') in this case - - -.. py:method:: Node.add_autoarchive( (Node)arg1, (int)days [, (bool)idle=False]) -> Node : +.. py:method:: Node.add(self: ecflow.Node, *args, **kwargs) -> object :module: ecflow +add(..) provides a way to append Nodes and attributes + +This is best illustrated with an example: + +.. code-block:: python + + defs = Defs().add( + Suite('s1').add( + Clock(1, 1, 2010, False), + Autocancel(1, 10, True), + Task('t1').add( + Edit({'a':'12', 'b':'bb'}, c='v',d='b'), + Edit(g='d'), + Edit(h=1), + Event(1), + Event(11,'event'), + Meter('meter',0,10,10), + Label('label','c'), + Trigger('1==1'), + Complete('1==1'), + Limit('limit',10),Limit('limit2',10), + InLimit('limitName','/limit',2), + Defstatus(DState.complete), + Today(0,30),Today('00:59'),Today('00:00 11:30 00:01'), + Time(0,30),Time('00:59'),Time('00:00 11:30 00:01'), + Day('sunday'),Day(Days.monday), + Date(1,1,0),Date(28,2,1960), + Autocancel(3) + ), + [ Family('f{}'.format(i)) for i in range(1,6)])) + +We can also use '+=' with a list here are a few examples: + +.. code-block:: python + + defs = Defs(); + defs += [ Suite('s2'),Edit({ 'x1':'y', 'aa1':'bb'}, a='v',b='b') ] + +.. code-block:: python + + defs += [ Suite('s{}'.format(i)) for i in range(1,6) ] + +.. code-block:: python + + defs = Defs() + defs += [ Suite('suite').add( + Task('x'), + Family('f').add( [ Task('t{}'.format(i)) for i in range(1,6)] ), + Task('y'), + [ Family('f{}'.format(i)) for i in range(1,6) ], + Edit(a='b'), + [ Task('t{}'.format(i)) for i in range(1,6) ], + )] + +It is also possible to use '+' + +.. code-block:: python + + defs = Defs() + Suite('s1') + defs.s1 += Autocancel(1, 10, True) + defs.s1 += Task('t1') + Edit({ 'e':1, 'f':'bb'}) +\ + Event(1) + Event(11,'event') + Meter('meter',0,10,10) + Label('label','c') + Trigger('1==1') +\ + Complete('1==1') + Limit('limit',10) + Limit('limit2',10) + InLimit('limitName','/limit',2) +\ + Defstatus(DState.complete) + Today(0,30) + Today('00:59') + Today('00:00 11:30 00:01') +\ + Time(0,30) + Time('00:59') + Time('00:00 11:30 00:01') + Day('sunday') + Day(Days.monday) +\ + Date(1,1,0) + Date(28,2,1960) + Autocancel(3) + +.. warning:: We can only use '+' when the left most object is a node, i.e Task('t1') in this case + + +.. py:method:: Node.add_autoarchive(*args, **kwargs) + :module: ecflow + +Overloaded function. + +1. add_autoarchive(self: ecflow.Node, days: typing.SupportsInt | typing.SupportsIndex, idle: bool = False) -> ecflow.Node + Add a `autoarchive` attribute. See :py:class:`ecflow.Autoarchive` - - Provides a way to automatically archive a suite/family which has completed.(i.e remove children) - This is required when dealing with super large suite/families, they can be archived off, and then restored later. - The node can be recovered using 'autorestore',begin,re-queue and manually via ecflow_client --restore. - The archived node is written to disk, as ECF_HOME/..ECF_NAME.check, - where '/' is replaced with ':' in ECF_NAME. - The removal may be delayed by an amount of time in hours and minutes or expressed as days - Node removal is not immediate. The nodes are checked once a minute - A Node may only have one autoarchive attribute - - Exception: - - - Throws a RuntimeError if more than one auto archive is added - - Usage: - - .. code-block:: python - - t1 = Task('t1') - t1.add_autoarchive( Autoarchive(20,10,False) ) # hour,min, relative - t2 = Task('t2') - t2.add_autoarchive( 3 ) # 3 days - t3 = Task('t3') - t3.add_autoarchive( 20,10,True ) # hour,minutes,relative - t4 = Task('t4') - t4.add_autoarchive( TimeSlot(20,10),True ) # hour,minutes,relative - - # we can also create a Autoarchive in the Task constructor like any other attribute - t2 = Task('t2', - Autoarchive(20,10,False)) - - -add_autoarchive( (Node)arg1, (int)hour, (int)min, (bool)relative [, (bool)idle=False]) -> Node - -add_autoarchive( (Node)arg1, (TimeSlot)TimeSlot, (bool)relative [, (bool)idle=False]) -> Node - -add_autoarchive( (Node)arg1, (Autoarchive)arg2) -> Node - - -.. py:method:: Node.add_autocancel( (Node)arg1, (int)arg2) -> Node : + +Provides a way to automatically archive a suite/family which has completed.(i.e remove children) +This is required when dealing with super large suite/families, they can be archived off, and then restored later. +The node can be recovered using 'autorestore',begin,re-queue and manually via ecflow_client --restore. +The archived node is written to disk, as ECF_HOME/..ECF_NAME.check, +where '/' is replaced with ':' in ECF_NAME. +The removal may be delayed by an amount of time in hours and minutes or expressed as days +Node removal is not immediate. The nodes are checked once a minute +A Node may only have one autoarchive attribute + +Exception: + +- Throws a RuntimeError if more than one auto archive is added + +Usage: + +.. code-block:: python + + t1 = Task('t1') + t1.add_autoarchive( Autoarchive(20,10,False) ) # hour,min, relative + t2 = Task('t2') + t2.add_autoarchive( 3 ) # 3 days + t3 = Task('t3') + t3.add_autoarchive( 20,10,True ) # hour,minutes,relative + t4 = Task('t4') + t4.add_autoarchive( TimeSlot(20,10),True ) # hour,minutes,relative + + # we can also create a Autoarchive in the Task constructor like any other attribute + t2 = Task('t2', + Autoarchive(20,10,False)) + + +2. add_autoarchive(self: ecflow.Node, hour: typing.SupportsInt | typing.SupportsIndex, min: typing.SupportsInt | typing.SupportsIndex, relative: bool, idle: bool = False) -> ecflow.Node + +3. add_autoarchive(self: ecflow.Node, TimeSlot: ecflow.TimeSlot, relative: bool, idle: bool = False) -> ecflow.Node + +4. add_autoarchive(self: ecflow.Node, arg0: ecflow.Autoarchive) -> ecflow.Node + + +.. py:method:: Node.add_autocancel(*args, **kwargs) :module: ecflow +Overloaded function. + +1. add_autocancel(self: ecflow.Node, arg0: typing.SupportsInt | typing.SupportsIndex) -> ecflow.Node + Add a `autocancel` attribute. See :py:class:`ecflow.Autocancel` - - This will delete the node on completion. The deletion may be delayed by - an amount of time in hours and minutes or expressed as days - Node deletion is not immediate. The nodes are checked once a minute - and expired auto cancel nodes are deleted - A node may only have one auto cancel attribute - - Exception: - - - Throws a RuntimeError if more than one auto cancel is added - - Usage: - - .. code-block:: python - - t1 = Task('t1') - t1.add_autocancel( Autocancel(20,10,False) ) # hour,min, relative - t2 = Task('t2') - t2.add_autocancel( 3 ) # 3 days - t3 = Task('t3') - t3.add_autocancel( 20,10,True ) # hour,minutes,relative - t4 = Task('t4') - t4.add_autocancel( TimeSlot(20,10),True ) # hour,minutes,relative - - # we can also create a Autocancel in the Task constructor like any other attribute - t2 = Task('t2', - Autocancel(20,10,False)) - - -add_autocancel( (Node)arg1, (int)arg2, (int)arg3, (bool)arg4) -> Node - -add_autocancel( (Node)arg1, (TimeSlot)arg2, (bool)arg3) -> Node - -add_autocancel( (Node)arg1, (Autocancel)arg2) -> Node - - -.. py:method:: Node.add_autorestore( (Node)arg1, (Autorestore)arg2) -> Node : + +This will delete the node on completion. The deletion may be delayed by +an amount of time in hours and minutes or expressed as days +Node deletion is not immediate. The nodes are checked once a minute +and expired auto cancel nodes are deleted +A node may only have one auto cancel attribute + +Exception: + +- Throws a RuntimeError if more than one auto cancel is added + +Usage: + +.. code-block:: python + + t1 = Task('t1') + t1.add_autocancel( Autocancel(20,10,False) ) # hour,min, relative + t2 = Task('t2') + t2.add_autocancel( 3 ) # 3 days + t3 = Task('t3') + t3.add_autocancel( 20,10,True ) # hour,minutes,relative + t4 = Task('t4') + t4.add_autocancel( TimeSlot(20,10),True ) # hour,minutes,relative + + # we can also create a Autocancel in the Task constructor like any other attribute + t2 = Task('t2', + Autocancel(20,10,False)) + + +2. add_autocancel(self: ecflow.Node, arg0: typing.SupportsInt | typing.SupportsIndex, arg1: typing.SupportsInt | typing.SupportsIndex, arg2: bool) -> ecflow.Node + +3. add_autocancel(self: ecflow.Node, arg0: ecflow.TimeSlot, arg1: bool) -> ecflow.Node + +4. add_autocancel(self: ecflow.Node, arg0: ecflow.Autocancel) -> ecflow.Node + + +.. py:method:: Node.add_autorestore(*args, **kwargs) :module: ecflow +Overloaded function. + +1. add_autorestore(self: ecflow.Node, arg0: ecflow.Autorestore) -> ecflow.Node + Add a `autorestore` attribute. See :py:class:`ecflow.Autorestore` - - Auto-restore is used to automatically restore a previously auto-archived node. - The restore will fail if: - - - The node has not been archived - - The node has children. - - The file ECF_HOME/..ECF_NAME.check does not exist - - Exception: - - - Throws a RuntimeError if more than one autorestore is added - - Usage: - - .. code-block:: python - - t1 = Task('t1') - t1.add_autorestore( ['/s1/f1'] ) - t2 = Task('t2') - t2.add_autorestore( Autorestore(['/s2/f1','/s1/f2']) ) - # we can also create a Autorestore in the Task constructor like any other attribute - t2 = Task('t2', Autorestore(['/s2/f1','/s1/f2'] )) - - -add_autorestore( (Node)arg1, (list)arg2) -> Node - - -.. py:method:: Node.add_aviso( (Node)arg1, (AvisoAttr)arg2) -> Node : + +Auto-restore is used to automatically restore a previously auto-archived node. +The restore will fail if: + + - The node has not been archived + - The node has children. + - The file ECF_HOME/..ECF_NAME.check does not exist + +Exception: + +- Throws a RuntimeError if more than one autorestore is added + +Usage: + +.. code-block:: python + + t1 = Task('t1') + t1.add_autorestore( ['/s1/f1'] ) + t2 = Task('t2') + t2.add_autorestore( Autorestore(['/s2/f1','/s1/f2']) ) + # we can also create a Autorestore in the Task constructor like any other attribute + t2 = Task('t2', Autorestore(['/s2/f1','/s1/f2'] )) + + +2. add_autorestore(self: ecflow.Node, arg0: list) -> ecflow.Node + + +.. py:method:: Node.add_aviso(self: ecflow.Node, arg0: ecflow.AvisoAttr) -> ecflow.Node :module: ecflow Adds an :term:`aviso` to a :term:`node`. See :py:class:`ecflow.Aviso` - -.. py:method:: Node.add_complete( (Node)arg1, (str)arg2) -> Node : +.. py:method:: Node.add_complete(*args, **kwargs) :module: ecflow +Overloaded function. + +1. add_complete(self: ecflow.Node, arg0: str) -> ecflow.Node + Add a :term:`trigger` or :term:`complete expression`.Also see :py:class:`ecflow.Trigger` - - This defines a dependency for a :term:`node`. - There can only be one :term:`trigger` or :term:`complete expression` dependency per node. - A :term:`node` with a trigger can only be activated when the trigger has expired. - A trigger holds a node as long as the expression returns false. - - Exception: - - - Will throw RuntimeError if multiple trigger or complete expression are added - - Will throw RuntimeError if first expression is added as 'AND' or 'OR' expression - Like wise second and subsequent expression must have 'AND' or 'OR' booleans set - - Usage: - - Note we cannot make multiple add_trigger(..) calls on the same :term:`task`! - to add a simple trigger: - - .. code-block:: python - - task1.add_trigger( 't2 == active' ) - task2.add_trigger( 't1 == complete or t4 == complete' ) - task3.add_trigger( 't5 == active' ) - - Long expression can be broken up using add_part_trigger: - - .. code-block:: python - - task2.add_part_trigger( 't1 == complete or t4 == complete') - task2.add_part_trigger( 't5 == active',True) # True means AND - task2.add_part_trigger( 't7 == active',False) # False means OR - - The trigger for task2 is equivalent to: - 't1 == complete or t4 == complete and t5 == active or t7 == active' - -add_complete( (Node)arg1, (Expression)arg2) -> Node - - -.. py:method:: Node.add_cron( (Node)arg1, (Cron)arg2) -> Node : + +This defines a dependency for a :term:`node`. +There can only be one :term:`trigger` or :term:`complete expression` dependency per node. +A :term:`node` with a trigger can only be activated when the trigger has expired. +A trigger holds a node as long as the expression returns false. + +Exception: + +- Will throw RuntimeError if multiple trigger or complete expression are added +- Will throw RuntimeError if first expression is added as 'AND' or 'OR' expression + Like wise second and subsequent expression must have 'AND' or 'OR' booleans set + +Usage: + +Note we cannot make multiple add_trigger(..) calls on the same :term:`task`! +to add a simple trigger: + +.. code-block:: python + + task1.add_trigger( 't2 == active' ) + task2.add_trigger( 't1 == complete or t4 == complete' ) + task3.add_trigger( 't5 == active' ) + +Long expression can be broken up using add_part_trigger: + +.. code-block:: python + + task2.add_part_trigger( 't1 == complete or t4 == complete') + task2.add_part_trigger( 't5 == active',True) # True means AND + task2.add_part_trigger( 't7 == active',False) # False means OR + +The trigger for task2 is equivalent to: +'t1 == complete or t4 == complete and t5 == active or t7 == active' + +2. add_complete(self: ecflow.Node, arg0: ecflow.Expression) -> ecflow.Node + + +.. py:method:: Node.add_cron(self: ecflow.Node, arg0: ecflow.Cron) -> ecflow.Node :module: ecflow Add a :term:`cron` time dependency. See :py:class:`ecflow.Cron` @@ -275,192 +289,220 @@ Usage: Cron('+00:00 23:00 00:30',days_of_week=[0,1,2,3,4,5,6],days_of_month=[1,2,3,4,5,6],months=[1,2,3,4,5,6])) -.. py:method:: Node.add_date( (Node)arg1, (int)arg2, (int)arg3, (int)arg4) -> Node : +.. py:method:: Node.add_date(*args, **kwargs) :module: ecflow +Overloaded function. + +1. add_date(self: ecflow.Node, arg0: typing.SupportsInt | typing.SupportsIndex, arg1: typing.SupportsInt | typing.SupportsIndex, arg2: typing.SupportsInt | typing.SupportsIndex) -> ecflow.Node + Add a :term:`date` time dependency. See :py:class:`ecflow.Date` - - A value of zero for day,month,year means every day, every month, every year - - Exception: - - - Throws RuntimeError if an invalid date is added - - Usage: - - .. code-block:: python - - t1 = Task('t1', - Date('1.*.*'), - Date(1,1,2010))) # Create Date in place - - t1.add_date( Date(1,1,2010) ) # day,month,year - t1.add_date( 2,1,2010) # day,month,year - t1.add_date( 1,0,0) # day,month,year, the first of each month for every year - - -add_date( (Node)arg1, (Date)arg2) -> Node - - -.. py:method:: Node.add_day( (Node)arg1, (Days)arg2) -> Node : + +A value of zero for day,month,year means every day, every month, every year + +Exception: + +- Throws RuntimeError if an invalid date is added + +Usage: + +.. code-block:: python + + t1 = Task('t1', + Date('1.*.*'), + Date(1,1,2010))) # Create Date in place + + t1.add_date( Date(1,1,2010) ) # day,month,year + t1.add_date( 2,1,2010) # day,month,year + t1.add_date( 1,0,0) # day,month,year, the first of each month for every year + + +2. add_date(self: ecflow.Node, arg0: ecflow.Date) -> ecflow.Node + + +.. py:method:: Node.add_day(*args, **kwargs) :module: ecflow +Overloaded function. + +1. add_day(self: ecflow.Node, arg0: ecflow.Days) -> ecflow.Node + Add a :term:`day` time dependency. See :py:class:`ecflow.Day` - - - Usage: - - .. code-block:: python - - t1 = Task('t1', - Day('sunday')) # Create Day on Task creation - - t1.add_day( Day(Days.sunday) ) - t1.add_day( Days.monday) - t1.add_day( 'tuesday' ) - -add_day( (Node)arg1, (str)arg2) -> Node -add_day( (Node)arg1, (Day)arg2) -> Node +Usage: +.. code-block:: python -.. py:method:: Node.add_defstatus( (Node)arg1, (DState)arg2) -> Node : + t1 = Task('t1', + Day('sunday')) # Create Day on Task creation + + t1.add_day( Day(Days.sunday) ) + t1.add_day( Days.monday) + t1.add_day( 'tuesday' ) + + +2. add_day(self: ecflow.Node, arg0: str) -> ecflow.Node + +3. add_day(self: ecflow.Node, arg0: ecflow.Day) -> ecflow.Node + + +.. py:method:: Node.add_defstatus(*args, **kwargs) :module: ecflow +Overloaded function. + +1. add_defstatus(self: ecflow.Node, arg0: ecflow.DState) -> ecflow.Node + +Set the default status( :term:`defstatus` ) of node at begin or re queue. See :py:class:`ecflow.Defstatus` + +A :term:`defstatus` is useful in preventing suites from running automatically +once begun, or in setting Task's complete so they can be run selectively + +Usage: + +.. code-block:: python + + t1 = Task('t1') + Defstatus('complete') + t2 = Task('t2').add_defstatus( DState.suspended ) + + # we can also create a Defstatus in the Task constructor like any other attribute + t2 = Task('t3', + Defstatus('complete')) + + +2. add_defstatus(self: ecflow.Node, arg0: ecflow.Defstatus) -> ecflow.Node + Set the default status( :term:`defstatus` ) of node at begin or re queue. See :py:class:`ecflow.Defstatus` - - A :term:`defstatus` is useful in preventing suites from running automatically - once begun, or in setting Task's complete so they can be run selectively - - Usage: - - .. code-block:: python - - t1 = Task('t1') + Defstatus('complete') - t2 = Task('t2').add_defstatus( DState.suspended ) - - # we can also create a Defstatus in the Task constructor like any other attribute - t2 = Task('t3', - Defstatus('complete')) - - -add_defstatus( (Node)arg1, (Defstatus)arg2) -> Node : - Set the default status( :term:`defstatus` ) of node at begin or re queue. See :py:class:`ecflow.Defstatus` - - A :term:`defstatus` is useful in preventing suites from running automatically - once begun, or in setting Task's complete so they can be run selectively - - Usage: - - .. code-block:: python - - t1 = Task('t1') + Defstatus('complete') - t2 = Task('t2').add_defstatus( DState.suspended ) - - # we can also create a Defstatus in the Task constructor like any other attribute - t2 = Task('t3', - Defstatus('complete')) - - - -.. py:method:: Node.add_event( (Node)arg1, (Event)arg2) -> Node : + +A :term:`defstatus` is useful in preventing suites from running automatically +once begun, or in setting Task's complete so they can be run selectively + +Usage: + +.. code-block:: python + + t1 = Task('t1') + Defstatus('complete') + t2 = Task('t2').add_defstatus( DState.suspended ) + + # we can also create a Defstatus in the Task constructor like any other attribute + t2 = Task('t3', + Defstatus('complete')) + + +.. py:method:: Node.add_event(*args, **kwargs) :module: ecflow +Overloaded function. + +1. add_event(self: ecflow.Node, arg0: ecflow.Event) -> ecflow.Node + Add a :term:`event`. See :py:class:`ecflow.Event` - Events can be referenced in :term:`trigger` and :term:`complete expression`\ s - - - Exception: - - - Throws RuntimeError if a duplicate is added - - Usage: - - .. code-block:: python - - t1 = Task('t1', - Event(12), - Event(11,'eventx')) # Create events on Task creation - - t1.add_event( Event(10) ) # Create with function on Task - t1.add_event( Event(11,'Eventname') ) - t1.add_event( 12 ) - t1.add_event( 13, 'name') - - To reference event 'flag' in a trigger: - - .. code-block:: python - - t1.add_event('flag') - t2 = Task('t2', - Trigger('t1:flag == set')) +Events can be referenced in :term:`trigger` and :term:`complete expression`\ s + + +Exception: + +- Throws RuntimeError if a duplicate is added + +Usage: + +.. code-block:: python -add_event( (Node)arg1, (int)arg2) -> Node + t1 = Task('t1', + Event(12), + Event(11,'eventx')) # Create events on Task creation -add_event( (Node)arg1, (int)arg2, (str)arg3) -> Node + t1.add_event( Event(10) ) # Create with function on Task + t1.add_event( Event(11,'Eventname') ) + t1.add_event( 12 ) + t1.add_event( 13, 'name') -add_event( (Node)arg1, (str)arg2) -> Node +To reference event 'flag' in a trigger: +.. code-block:: python + + t1.add_event('flag') + t2 = Task('t2', + Trigger('t1:flag == set')) + +2. add_event(self: ecflow.Node, arg0: typing.SupportsInt | typing.SupportsIndex) -> ecflow.Node -.. py:method:: Node.add_generic( (Node)arg1, (Generic)arg2) -> Node +3. add_event(self: ecflow.Node, arg0: str) -> ecflow.Node + +4. add_event(self: ecflow.Node, arg0: typing.SupportsInt | typing.SupportsIndex, arg1: str) -> ecflow.Node + + +.. py:method:: Node.add_generic(*args, **kwargs) :module: ecflow -add_generic( (Node)arg1, (str)arg2, (list)arg3) -> Node +Overloaded function. + +1. add_generic(self: ecflow.Node, arg0: ecflow.Generic) -> ecflow.Node +2. add_generic(self: ecflow.Node, arg0: str, arg1: list) -> ecflow.Node -.. py:method:: Node.add_inlimit( (Node)arg1, (str)limit_name [, (str)path_to_node_containing_limit='' [, (int)tokens=1 [, (bool)limit_this_node_only=False]]]) -> Node : + +.. py:method:: Node.add_inlimit(*args, **kwargs) :module: ecflow +Overloaded function. + +1. add_inlimit(self: ecflow.Node, limit_name: str, path_to_node_containing_limit: str = '', tokens: typing.SupportsInt | typing.SupportsIndex = 1, limit_this_node_only: bool = False) -> ecflow.Node + Adds a :term:`inlimit` to a :term:`node`. See :py:class:`ecflow.InLimit` - - InLimit reference a :term:`limit`/:py:class:`ecflow.Limit`. Duplicate InLimits are not allowed - - Exception: - - - Throws RuntimeError if a duplicate is added - - Usage: - - .. code-block:: python - - task2.add_inlimit( InLimit('limitName','/s1/f1',2) ) - task2.add_inlimit( 'limitName','/s1/f1',2 ) - -add_inlimit( (Node)arg1, (InLimit)arg2) -> Node +InLimit reference a :term:`limit`/:py:class:`ecflow.Limit`. Duplicate InLimits are not allowed + +Exception: + +- Throws RuntimeError if a duplicate is added +Usage: -.. py:method:: Node.add_label( (Node)arg1, (str)arg2, (str)arg3) -> Node : +.. code-block:: python + + task2.add_inlimit( InLimit('limitName','/s1/f1',2) ) + task2.add_inlimit( 'limitName','/s1/f1',2 ) + + +2. add_inlimit(self: ecflow.Node, arg0: ecflow.InLimit) -> ecflow.Node + + +.. py:method:: Node.add_label(*args, **kwargs) :module: ecflow +Overloaded function. + +1. add_label(self: ecflow.Node, arg0: str, arg1: str) -> ecflow.Node + Adds a :term:`label` to a :term:`node`. See :py:class:`ecflow.Label` - - Labels can be updated from the jobs files, via :term:`child command` - - Exception: - - - Throws RuntimeError if a duplicate label name is added - - Usage: - - .. code-block:: python - - task.add_label( Label('TEA','/me/')) - task.add_label( 'Joe','/me/') - - The corresponding child command in the .ecf script file might be: - - .. code-block:: shell - - ecflow_client --label=TEA time - ecflow_client --label=Joe ninety - - -add_label( (Node)arg1, (Label)arg2) -> Node - - -.. py:method:: Node.add_late( (Node)arg1, (Late)arg2) -> Node : + +Labels can be updated from the jobs files, via :term:`child command` + +Exception: + +- Throws RuntimeError if a duplicate label name is added + +Usage: + +.. code-block:: python + + task.add_label( Label('TEA','/me/')) + task.add_label( 'Joe','/me/') + +The corresponding child command in the .ecf script file might be: + +.. code-block:: shell + + ecflow_client --label=TEA time + ecflow_client --label=Joe ninety + + +2. add_label(self: ecflow.Node, arg0: ecflow.Label) -> ecflow.Node + + +.. py:method:: Node.add_late(self: ecflow.Node, arg0: ecflow.Late) -> ecflow.Node :module: ecflow Add a :term:`late` attribute. See :py:class:`ecflow.Late` @@ -486,487 +528,536 @@ Usage: Late(submitted='20:10',active='20:10',complete='+20:10')) -.. py:method:: Node.add_limit( (Node)arg1, (str)arg2, (int)arg3) -> Node : +.. py:method:: Node.add_limit(*args, **kwargs) :module: ecflow +Overloaded function. + +1. add_limit(self: ecflow.Node, arg0: str, arg1: typing.SupportsInt | typing.SupportsIndex) -> ecflow.Node + Adds a :term:`limit` to a :term:`node` for simple load management. See :py:class:`ecflow.Limit` - - Multiple limits can be added, however the limit name must be unique. - For a node to be in a limit, a :term:`inlimit` must be used. - - Exception: - - - Throws RuntimeError if a duplicate limit name is added - - Usage: - - .. code-block:: python - - family.add_limit( Limit('load',12) ) - family.add_limit( 'load',12 ) - -add_limit( (Node)arg1, (Limit)arg2) -> Node +Multiple limits can be added, however the limit name must be unique. +For a node to be in a limit, a :term:`inlimit` must be used. + +Exception: + +- Throws RuntimeError if a duplicate limit name is added + +Usage: +.. code-block:: python -.. py:method:: Node.add_meter( (Node)arg1, (Meter)arg2) -> Node : + family.add_limit( Limit('load',12) ) + family.add_limit( 'load',12 ) + + +2. add_limit(self: ecflow.Node, arg0: ecflow.Limit) -> ecflow.Node + + +.. py:method:: Node.add_meter(*args, **kwargs) :module: ecflow +Overloaded function. + +1. add_meter(self: ecflow.Node, arg0: ecflow.Meter) -> ecflow.Node + Add a :term:`meter`. See :py:class:`ecflow.Meter` - Meters can be referenced in :term:`trigger` and :term:`complete expression`\ s - - - Exception: - - - Throws RuntimeError if a duplicate is added - - Usage: - - .. code-block:: python - - t1 = Task('t1', - Meter('met',0,50)) # create Meter on Task creation - t1.add_meter( Meter('metername',0,100,50) ) # create Meter using function - t1.add_meter( 'meter',0,200) - - To reference in a trigger: - - .. code-block:: python - - t2 = Task('t2') - t2.add_trigger('t1:meter >= 10') - - -add_meter( (Node)arg1, (str)arg2, (int)arg3, (int)arg4 [, (int)arg5]) -> Node - - -.. py:method:: Node.add_mirror( (Node)arg1, (MirrorAttr)arg2) -> Node : +Meters can be referenced in :term:`trigger` and :term:`complete expression`\ s + + +Exception: + +- Throws RuntimeError if a duplicate is added + +Usage: + +.. code-block:: python + + t1 = Task('t1', + Meter('met',0,50)) # create Meter on Task creation + t1.add_meter( Meter('metername',0,100,50) ) # create Meter using function + t1.add_meter( 'meter',0,200) + +To reference in a trigger: + +.. code-block:: python + + t2 = Task('t2') + t2.add_trigger('t1:meter >= 10') + + +2. add_meter(self: ecflow.Node, arg0: str, arg1: typing.SupportsInt | typing.SupportsIndex, arg2: typing.SupportsInt | typing.SupportsIndex, arg3: typing.SupportsInt | typing.SupportsIndex) -> ecflow.Node + +3. add_meter(self: ecflow.Node, arg0: str, arg1: typing.SupportsInt | typing.SupportsIndex, arg2: typing.SupportsInt | typing.SupportsIndex) -> ecflow.Node + + +.. py:method:: Node.add_mirror(self: ecflow.Node, arg0: ecflow.MirrorAttr) -> ecflow.Node :module: ecflow Adds a :term:`mirror` to a :term:`node`. See :py:class:`ecflow.Mirror` - -.. py:method:: Node.add_part_complete( (Node)arg1, (PartExpression)arg2) -> Node : +.. py:method:: Node.add_part_complete(*args, **kwargs) :module: ecflow +Overloaded function. + +1. add_part_complete(self: ecflow.Node, arg0: ecflow.PartExpression) -> ecflow.Node + Add a :term:`trigger` or :term:`complete expression`.Also see :py:class:`ecflow.Trigger` - - This defines a dependency for a :term:`node`. - There can only be one :term:`trigger` or :term:`complete expression` dependency per node. - A :term:`node` with a trigger can only be activated when the trigger has expired. - A trigger holds a node as long as the expression returns false. - - Exception: - - - Will throw RuntimeError if multiple trigger or complete expression are added - - Will throw RuntimeError if first expression is added as 'AND' or 'OR' expression - Like wise second and subsequent expression must have 'AND' or 'OR' booleans set - - Usage: - - Note we cannot make multiple add_trigger(..) calls on the same :term:`task`! - to add a simple trigger: - - .. code-block:: python - - task1.add_trigger( 't2 == active' ) - task2.add_trigger( 't1 == complete or t4 == complete' ) - task3.add_trigger( 't5 == active' ) - - Long expression can be broken up using add_part_trigger: - - .. code-block:: python - - task2.add_part_trigger( 't1 == complete or t4 == complete') - task2.add_part_trigger( 't5 == active',True) # True means AND - task2.add_part_trigger( 't7 == active',False) # False means OR - - The trigger for task2 is equivalent to: - 't1 == complete or t4 == complete and t5 == active or t7 == active' - -add_part_complete( (Node)arg1, (str)arg2) -> Node - -add_part_complete( (Node)arg1, (str)arg2, (bool)arg3) -> Node - - -.. py:method:: Node.add_part_trigger( (Node)arg1, (PartExpression)arg2) -> Node : + +This defines a dependency for a :term:`node`. +There can only be one :term:`trigger` or :term:`complete expression` dependency per node. +A :term:`node` with a trigger can only be activated when the trigger has expired. +A trigger holds a node as long as the expression returns false. + +Exception: + +- Will throw RuntimeError if multiple trigger or complete expression are added +- Will throw RuntimeError if first expression is added as 'AND' or 'OR' expression + Like wise second and subsequent expression must have 'AND' or 'OR' booleans set + +Usage: + +Note we cannot make multiple add_trigger(..) calls on the same :term:`task`! +to add a simple trigger: + +.. code-block:: python + + task1.add_trigger( 't2 == active' ) + task2.add_trigger( 't1 == complete or t4 == complete' ) + task3.add_trigger( 't5 == active' ) + +Long expression can be broken up using add_part_trigger: + +.. code-block:: python + + task2.add_part_trigger( 't1 == complete or t4 == complete') + task2.add_part_trigger( 't5 == active',True) # True means AND + task2.add_part_trigger( 't7 == active',False) # False means OR + +The trigger for task2 is equivalent to: +'t1 == complete or t4 == complete and t5 == active or t7 == active' + +2. add_part_complete(self: ecflow.Node, arg0: str) -> ecflow.Node + +3. add_part_complete(self: ecflow.Node, arg0: str, arg1: bool) -> ecflow.Node + + +.. py:method:: Node.add_part_trigger(*args, **kwargs) :module: ecflow +Overloaded function. + +1. add_part_trigger(self: ecflow.Node, arg0: ecflow.PartExpression) -> ecflow.Node + Add a :term:`trigger` or :term:`complete expression`.Also see :py:class:`ecflow.Trigger` - - This defines a dependency for a :term:`node`. - There can only be one :term:`trigger` or :term:`complete expression` dependency per node. - A :term:`node` with a trigger can only be activated when the trigger has expired. - A trigger holds a node as long as the expression returns false. - - Exception: - - - Will throw RuntimeError if multiple trigger or complete expression are added - - Will throw RuntimeError if first expression is added as 'AND' or 'OR' expression - Like wise second and subsequent expression must have 'AND' or 'OR' booleans set - - Usage: - - Note we cannot make multiple add_trigger(..) calls on the same :term:`task`! - to add a simple trigger: - - .. code-block:: python - - task1.add_trigger( 't2 == active' ) - task2.add_trigger( 't1 == complete or t4 == complete' ) - task3.add_trigger( 't5 == active' ) - - Long expression can be broken up using add_part_trigger: - - .. code-block:: python - - task2.add_part_trigger( 't1 == complete or t4 == complete') - task2.add_part_trigger( 't5 == active',True) # True means AND - task2.add_part_trigger( 't7 == active',False) # False means OR - - The trigger for task2 is equivalent to: - 't1 == complete or t4 == complete and t5 == active or t7 == active' - -add_part_trigger( (Node)arg1, (str)arg2) -> Node - -add_part_trigger( (Node)arg1, (str)arg2, (bool)arg3) -> Node - - -.. py:method:: Node.add_queue( (Node)arg1, (Queue)arg2) -> Node - :module: ecflow - -add_queue( (Node)arg1, (str)arg2, (list)arg3) -> Node - - -.. py:method:: Node.add_repeat( (Node)arg1, (RepeatDate)arg2) -> Node : + +This defines a dependency for a :term:`node`. +There can only be one :term:`trigger` or :term:`complete expression` dependency per node. +A :term:`node` with a trigger can only be activated when the trigger has expired. +A trigger holds a node as long as the expression returns false. + +Exception: + +- Will throw RuntimeError if multiple trigger or complete expression are added +- Will throw RuntimeError if first expression is added as 'AND' or 'OR' expression + Like wise second and subsequent expression must have 'AND' or 'OR' booleans set + +Usage: + +Note we cannot make multiple add_trigger(..) calls on the same :term:`task`! +to add a simple trigger: + +.. code-block:: python + + task1.add_trigger( 't2 == active' ) + task2.add_trigger( 't1 == complete or t4 == complete' ) + task3.add_trigger( 't5 == active' ) + +Long expression can be broken up using add_part_trigger: + +.. code-block:: python + + task2.add_part_trigger( 't1 == complete or t4 == complete') + task2.add_part_trigger( 't5 == active',True) # True means AND + task2.add_part_trigger( 't7 == active',False) # False means OR + +The trigger for task2 is equivalent to: +'t1 == complete or t4 == complete and t5 == active or t7 == active' + +2. add_part_trigger(self: ecflow.Node, arg0: str) -> ecflow.Node + +3. add_part_trigger(self: ecflow.Node, arg0: str, arg1: bool) -> ecflow.Node + + +.. py:method:: Node.add_queue(*args, **kwargs) :module: ecflow +Overloaded function. + +1. add_queue(self: ecflow.Node, arg0: ecflow.Queue) -> ecflow.Node + +2. add_queue(self: ecflow.Node, arg0: str, arg1: list) -> ecflow.Node + + +.. py:method:: Node.add_repeat(*args, **kwargs) + :module: ecflow + +Overloaded function. + +1. add_repeat(self: ecflow.Node, arg0: ecflow.RepeatDate) -> ecflow.Node + Add a RepeatDate attribute. See :py:class:`ecflow.RepeatDate` - - A node can only have one repeat - Reference to a RepeatDate in a trigger will use date arithmetic in a sub expression. i.e. - Here (/suite/family:YMD + 1) uses date arithmetic only, the result is still an integer - - trigger /suite/family:YMD + 1 > 20190101 - - Exception: - - - Throws a RuntimeError if more than one repeat is added - - Usage: - - .. code-block:: python - - t1 = Task('t1') - t1.add_repeat( RepeatDate('YMD',20100111,20100115) ) - - # we can also create a repeat in Task constructor like any other attribute - t2 = Task('t2', - RepeatDate('YMD',20100111,20100115)) - - -add_repeat( (Node)arg1, (RepeatDateTime)arg2) -> Node : - Add a RepeatDateTime attribute. See :py:class:`ecflow.RepeatDateTime` - - A node can only have one repeat. - When a RepeatDateTime is used in a trigger expression, the arithmetic value of the Repeat decays to second. - For example, the expression `/suite/family:DATETIME + 1` is evaluated as the number of seconds represented by `/suite/family:DT` (since the reference epoch, i.e. 19700101T000000) plus 1.The result is an integer. - - trigger /suite/family:DT + 1 > 123456 - - Exception: - - - Throws a RuntimeError if more than one repeat is added - - Usage: - - .. code-block:: python - - t1 = Task('t1') - t1.add_repeat(RepeatDateTime('DT', '20100111T120000', '20100115T000000', '12:00:00')) - - # we can also create a repeat in Task constructor like any other attribute - t2 = Task('t2', - RepeatDateTime('DT', '20100101T000000', '20100115T000000', '1:00:00')) - - -add_repeat( (Node)arg1, (RepeatDateList)arg2) -> Node : - Add a RepeatDateList attribute. See :py:class:`ecflow.RepeatDateList` - - A node can only have one repeat - Reference to a RepeatDateList in a trigger will use date arithmetic. i.e. - Here (/suite/family:YMD + 1) uses date arithmetic only, the result is still an integer: - - .. code-block:: python - - trigger /suite/family:YMD + 1 > 20190101 - - - Exception: - - - Throws a RuntimeError if more than one repeat is added - - Usage: - - .. code-block:: python - - t1 = Task('t1') - t1.add_repeat( RepeatDateList('YMD',[20100111,20100115]) ) - - # we can also create a repeat in Task constructor like any other attribute - t2 = Task('t2', - RepeatDateList('YMD',[20100111,20100115])) - - -add_repeat( (Node)arg1, (RepeatDateTimeList)arg2) -> Node : - Add a RepeatDateTimeList attribute. See :py:class:`ecflow.RepeatDateTimeList` - - A node can only have one repeat - - Exception: - - - Throws a RuntimeError if more than one repeat is added - - Usage: - - .. code-block:: python - - t1 = Task('t1') - t1.add_repeat( RepeatDateTimeList('DT', ['20240101T000000', '20240102T120000']) ) - - # we can also create a repeat in Task constructor like any other attribute - t2 = Task('t2', - RepeatDateTimeList('DT', ['20240101T000000', '20240102T120000'])) - - -add_repeat( (Node)arg1, (RepeatInteger)arg2) -> Node : - Add a RepeatInteger attribute. See :py:class:`ecflow.RepeatInteger` - - A node can only have one :term:`repeat` - - Exception: - - - Throws a RuntimeError if more than one repeat is added - - Usage: - - .. code-block:: python - - t1 = Task('t1') - t1.add_repeat( RepeatInteger('testInteger',0,100,2) ) - - # we can also create a repeat in Task constructor like any other attribute - t2 = Task('t2', - RepeatInteger('testInteger',0,100,2)) - - -add_repeat( (Node)arg1, (RepeatString)arg2) -> Node : - Add a RepeatString attribute. See :py:class:`ecflow.RepeatString` - - A node can only have one :term:`repeat` - - Exception: - - - Throws a RuntimeError if more than one repeat is added - - Usage: - - .. code-block:: python - - t1 = Task('t1') - t1.add_repeat( RepeatString('test_string',['a', 'b', 'c' ] ) ) - - # we can also create a repeat in Task constructor like any other attribute - t2 = Task('t2', - RepeatString('test_string',['a', 'b', 'c' ] ) ) - - -add_repeat( (Node)arg1, (RepeatEnumerated)arg2) -> Node : - Add a RepeatEnumerated attribute. See :py:class:`ecflow.RepeatEnumerated` - - A node can only have one :term:`repeat` - - Exception: - - - Throws a RuntimeError if more than one repeat is added - - Usage: - - .. code-block:: python - - t1 = Task('t1') - t1.add_repeat( RepeatEnumerated('test_string', ['red', 'green', 'blue' ] ) ) - - # we can also create a repeat in Task constructor like any other attribute - t2 = Task('t2', - RepeatEnumerated('test_string', ['red', 'green', 'blue' ] ) ) - - -add_repeat( (Node)arg1, (RepeatDay)arg2) -> Node : - Add a RepeatDay attribute. See :py:class:`ecflow.RepeatDay` - - A node can only have one :term:`repeat` - - Exception: - - - Throws a RuntimeError if more than one repeat is added - - Usage: - - .. code-block:: python - - t2 = Task('t2', - RepeatDay(1)) - - - -.. py:method:: Node.add_time( (Node)arg1, (int)arg2, (int)arg3) -> Node : + +A node can only have one repeat +Reference to a RepeatDate in a trigger will use date arithmetic in a sub expression. i.e. +Here (/suite/family:YMD + 1) uses date arithmetic only, the result is still an integer + + trigger /suite/family:YMD + 1 > 20190101 + +Exception: + +- Throws a RuntimeError if more than one repeat is added + +Usage: + +.. code-block:: python + + t1 = Task('t1') + t1.add_repeat( RepeatDate('YMD',20100111,20100115) ) + + # we can also create a repeat in Task constructor like any other attribute + t2 = Task('t2', + RepeatDate('YMD',20100111,20100115)) + + +2. add_repeat(self: ecflow.Node, arg0: ecflow.RepeatDateTime) -> ecflow.Node + +Add a RepeatDateTime attribute. See :py:class:`ecflow.RepeatDateTime` + +A node can only have one repeat. +When a RepeatDateTime is used in a trigger expression, the arithmetic value of the Repeat decays to second. +For example, the expression `/suite/family:DATETIME + 1` is evaluated as the number of seconds represented by `/suite/family:DT` (since the reference epoch, i.e. 19700101T000000) plus 1.The result is an integer. + + trigger /suite/family:DT + 1 > 123456 + +Exception: + +- Throws a RuntimeError if more than one repeat is added + +Usage: + +.. code-block:: python + + t1 = Task('t1') + t1.add_repeat(RepeatDateTime('DT', '20100111T120000', '20100115T000000', '12:00:00')) + + # we can also create a repeat in Task constructor like any other attribute + t2 = Task('t2', + RepeatDateTime('DT', '20100101T000000', '20100115T000000', '1:00:00')) + + +3. add_repeat(self: ecflow.Node, arg0: ecflow.RepeatDateList) -> ecflow.Node + +Add a RepeatDateList attribute. See :py:class:`ecflow.RepeatDateList` + +A node can only have one repeat +Reference to a RepeatDateList in a trigger will use date arithmetic. i.e. +Here (/suite/family:YMD + 1) uses date arithmetic only, the result is still an integer: + +.. code-block:: python + + trigger /suite/family:YMD + 1 > 20190101 + + +Exception: + +- Throws a RuntimeError if more than one repeat is added + +Usage: + +.. code-block:: python + + t1 = Task('t1') + t1.add_repeat( RepeatDateList('YMD',[20100111,20100115]) ) + + # we can also create a repeat in Task constructor like any other attribute + t2 = Task('t2', + RepeatDateList('YMD',[20100111,20100115])) + + +4. add_repeat(self: ecflow.Node, arg0: ecflow.RepeatDateTimeList) -> ecflow.Node + +Add a RepeatDateTimeList attribute. See :py:class:`ecflow.RepeatDateTimeList` + +A node can only have one repeat + +Exception: + +- Throws a RuntimeError if more than one repeat is added + +Usage: + +.. code-block:: python + + t1 = Task('t1') + t1.add_repeat( RepeatDateTimeList('DT', ['20240101T000000', '20240102T120000']) ) + + # we can also create a repeat in Task constructor like any other attribute + t2 = Task('t2', + RepeatDateTimeList('DT', ['20240101T000000', '20240102T120000'])) + + +5. add_repeat(self: ecflow.Node, arg0: ecflow.RepeatInteger) -> ecflow.Node + +Add a RepeatInteger attribute. See :py:class:`ecflow.RepeatInteger` + +A node can only have one :term:`repeat` + +Exception: + +- Throws a RuntimeError if more than one repeat is added + +Usage: + +.. code-block:: python + + t1 = Task('t1') + t1.add_repeat( RepeatInteger('testInteger',0,100,2) ) + + # we can also create a repeat in Task constructor like any other attribute + t2 = Task('t2', + RepeatInteger('testInteger',0,100,2)) + + +6. add_repeat(self: ecflow.Node, arg0: ecflow.RepeatString) -> ecflow.Node + +Add a RepeatString attribute. See :py:class:`ecflow.RepeatString` + +A node can only have one :term:`repeat` + +Exception: + +- Throws a RuntimeError if more than one repeat is added + +Usage: + +.. code-block:: python + + t1 = Task('t1') + t1.add_repeat( RepeatString('test_string',['a', 'b', 'c' ] ) ) + + # we can also create a repeat in Task constructor like any other attribute + t2 = Task('t2', + RepeatString('test_string',['a', 'b', 'c' ] ) ) + + +7. add_repeat(self: ecflow.Node, arg0: ecflow.RepeatEnumerated) -> ecflow.Node + +Add a RepeatEnumerated attribute. See :py:class:`ecflow.RepeatEnumerated` + +A node can only have one :term:`repeat` + +Exception: + +- Throws a RuntimeError if more than one repeat is added + +Usage: + +.. code-block:: python + + t1 = Task('t1') + t1.add_repeat( RepeatEnumerated('test_string', ['red', 'green', 'blue' ] ) ) + + # we can also create a repeat in Task constructor like any other attribute + t2 = Task('t2', + RepeatEnumerated('test_string', ['red', 'green', 'blue' ] ) ) + + +8. add_repeat(self: ecflow.Node, arg0: ecflow.RepeatDay) -> ecflow.Node + +Add a RepeatDay attribute. See :py:class:`ecflow.RepeatDay` + +A node can only have one :term:`repeat` + +Exception: + +- Throws a RuntimeError if more than one repeat is added + +Usage: + +.. code-block:: python + + t2 = Task('t2', + RepeatDay(1)) + + +.. py:method:: Node.add_time(*args, **kwargs) :module: ecflow +Overloaded function. + +1. add_time(self: ecflow.Node, arg0: typing.SupportsInt | typing.SupportsIndex, arg1: typing.SupportsInt | typing.SupportsIndex) -> ecflow.Node + Add a :term:`time` dependency. See :py:class:`ecflow.Time` - - - Usage: - - .. code-block:: python - - t1 = Task('t1', Time('+00:30 20:00 01:00')) # Create Time in Task constructor - t1.add_time( '00:30' ) - t1.add_time( '+00:30' ) - t1.add_time( '+00:30 20:00 01:00' ) - t1.add_time( Time( 0,10 )) # hour,min,relative =false - t1.add_time( Time( 0,12,True )) # hour,min,relative - t1.add_time( Time(TimeSlot(20,20),False)) - t1.add_time( 0,1 )) # hour,min,relative=false - t1.add_time( 0,3,False )) # hour,min,relative=false - start = TimeSlot(0,0) - finish = TimeSlot(23,0) - incr = TimeSlot(0,30) - ts = TimeSeries( start, finish, incr, True) - task2.add_time( Time(ts) ) - - -add_time( (Node)arg1, (int)arg2, (int)arg3, (bool)arg4) -> Node - -add_time( (Node)arg1, (str)arg2) -> Node - -add_time( (Node)arg1, (Time)arg2) -> Node - - -.. py:method:: Node.add_today( (Node)arg1, (int)arg2, (int)arg3) -> Node : + + +Usage: + +.. code-block:: python + + t1 = Task('t1', Time('+00:30 20:00 01:00')) # Create Time in Task constructor + t1.add_time( '00:30' ) + t1.add_time( '+00:30' ) + t1.add_time( '+00:30 20:00 01:00' ) + t1.add_time( Time( 0,10 )) # hour,min,relative =false + t1.add_time( Time( 0,12,True )) # hour,min,relative + t1.add_time( Time(TimeSlot(20,20),False)) + t1.add_time( 0,1 )) # hour,min,relative=false + t1.add_time( 0,3,False )) # hour,min,relative=false + start = TimeSlot(0,0) + finish = TimeSlot(23,0) + incr = TimeSlot(0,30) + ts = TimeSeries( start, finish, incr, True) + task2.add_time( Time(ts) ) + + +2. add_time(self: ecflow.Node, arg0: typing.SupportsInt | typing.SupportsIndex, arg1: typing.SupportsInt | typing.SupportsIndex, arg2: bool) -> ecflow.Node + +3. add_time(self: ecflow.Node, arg0: str) -> ecflow.Node + +4. add_time(self: ecflow.Node, arg0: ecflow.Time) -> ecflow.Node + + +.. py:method:: Node.add_today(*args, **kwargs) :module: ecflow +Overloaded function. + +1. add_today(self: ecflow.Node, arg0: typing.SupportsInt | typing.SupportsIndex, arg1: typing.SupportsInt | typing.SupportsIndex) -> ecflow.Node + Add a :term:`today` time dependency. See :py:class:`ecflow.Today` - - - Usage: - - .. code-block:: python - - t1 = Task('t1', - Today('+00:30 20:00 01:00')) # Create Today in Task constructor - - t1.add_today( '00:30' ) - t1.add_today( '+00:30' ) - t1.add_today( '+00:30 20:00 01:00' ) - t1.add_today( Today( 0,10 )) # hour,min,relative =false - t1.add_today( Today( 0,12,True )) # hour,min,relative - t1.add_today( Today(TimeSlot(20,20),False)) - t1.add_today( 0,1 )) # hour,min,relative=false - t1.add_today( 0,3,False )) # hour,min,relative=false - start = TimeSlot(0,0) - finish = TimeSlot(23,0) - incr = TimeSlot(0,30) - ts = TimeSeries( start, finish, incr, True) - task2.add_today( Today(ts) ) - - -add_today( (Node)arg1, (int)arg2, (int)arg3, (bool)arg4) -> Node - -add_today( (Node)arg1, (str)arg2) -> Node - -add_today( (Node)arg1, (Today)arg2) -> Node - - -.. py:method:: Node.add_trigger( (Node)arg1, (str)arg2) -> Node : + + +Usage: + +.. code-block:: python + + t1 = Task('t1', + Today('+00:30 20:00 01:00')) # Create Today in Task constructor + + t1.add_today( '00:30' ) + t1.add_today( '+00:30' ) + t1.add_today( '+00:30 20:00 01:00' ) + t1.add_today( Today( 0,10 )) # hour,min,relative =false + t1.add_today( Today( 0,12,True )) # hour,min,relative + t1.add_today( Today(TimeSlot(20,20),False)) + t1.add_today( 0,1 )) # hour,min,relative=false + t1.add_today( 0,3,False )) # hour,min,relative=false + start = TimeSlot(0,0) + finish = TimeSlot(23,0) + incr = TimeSlot(0,30) + ts = TimeSeries( start, finish, incr, True) + task2.add_today( Today(ts) ) + + +2. add_today(self: ecflow.Node, arg0: typing.SupportsInt | typing.SupportsIndex, arg1: typing.SupportsInt | typing.SupportsIndex, arg2: bool) -> ecflow.Node + +3. add_today(self: ecflow.Node, arg0: str) -> ecflow.Node + +4. add_today(self: ecflow.Node, arg0: ecflow.Today) -> ecflow.Node + + +.. py:method:: Node.add_trigger(*args, **kwargs) :module: ecflow +Overloaded function. + +1. add_trigger(self: ecflow.Node, arg0: str) -> ecflow.Node + Add a :term:`trigger` or :term:`complete expression`.Also see :py:class:`ecflow.Trigger` - - This defines a dependency for a :term:`node`. - There can only be one :term:`trigger` or :term:`complete expression` dependency per node. - A :term:`node` with a trigger can only be activated when the trigger has expired. - A trigger holds a node as long as the expression returns false. - - Exception: - - - Will throw RuntimeError if multiple trigger or complete expression are added - - Will throw RuntimeError if first expression is added as 'AND' or 'OR' expression - Like wise second and subsequent expression must have 'AND' or 'OR' booleans set - - Usage: - - Note we cannot make multiple add_trigger(..) calls on the same :term:`task`! - to add a simple trigger: - - .. code-block:: python - - task1.add_trigger( 't2 == active' ) - task2.add_trigger( 't1 == complete or t4 == complete' ) - task3.add_trigger( 't5 == active' ) - - Long expression can be broken up using add_part_trigger: - - .. code-block:: python - - task2.add_part_trigger( 't1 == complete or t4 == complete') - task2.add_part_trigger( 't5 == active',True) # True means AND - task2.add_part_trigger( 't7 == active',False) # False means OR - - The trigger for task2 is equivalent to: - 't1 == complete or t4 == complete and t5 == active or t7 == active' - -add_trigger( (Node)arg1, (Expression)arg2) -> Node - - -.. py:method:: Node.add_variable( (Node)arg1, (str)arg2, (str)arg3) -> Node : + +This defines a dependency for a :term:`node`. +There can only be one :term:`trigger` or :term:`complete expression` dependency per node. +A :term:`node` with a trigger can only be activated when the trigger has expired. +A trigger holds a node as long as the expression returns false. + +Exception: + +- Will throw RuntimeError if multiple trigger or complete expression are added +- Will throw RuntimeError if first expression is added as 'AND' or 'OR' expression + Like wise second and subsequent expression must have 'AND' or 'OR' booleans set + +Usage: + +Note we cannot make multiple add_trigger(..) calls on the same :term:`task`! +to add a simple trigger: + +.. code-block:: python + + task1.add_trigger( 't2 == active' ) + task2.add_trigger( 't1 == complete or t4 == complete' ) + task3.add_trigger( 't5 == active' ) + +Long expression can be broken up using add_part_trigger: + +.. code-block:: python + + task2.add_part_trigger( 't1 == complete or t4 == complete') + task2.add_part_trigger( 't5 == active',True) # True means AND + task2.add_part_trigger( 't7 == active',False) # False means OR + +The trigger for task2 is equivalent to: +'t1 == complete or t4 == complete and t5 == active or t7 == active' + +2. add_trigger(self: ecflow.Node, arg0: ecflow.Expression) -> ecflow.Node + + +.. py:method:: Node.add_variable(*args, **kwargs) :module: ecflow +Overloaded function. + +1. add_variable(self: ecflow.Node, arg0: str, arg1: str) -> ecflow.Node + Adds a name value :term:`variable`. Also see :py:class:`ecflow.Edit` - - This defines a variable for use in :term:`variable substitution` in a :term:`ecf script` file. - There can be any number of variables. The variables are names inside a pair of - '%' characters in an :term:`ecf script`. The name are case sensitive. - Special character in the value, must be placed inside single quotes if misinterpretation - is to be avoided. - The value of the variable replaces the variable name in the :term:`ecf script` at `job creation` time. - The variable names for any given node must be unique. If duplicates are added then the - the last value added is kept. - - Exception: - - - Writes warning to standard output, if a duplicate variable name is added - - Usage: - - .. code-block:: python - - task.add_variable( Variable('ECF_HOME','/tmp/')) - task.add_variable( 'TMPDIR','/tmp/') - task.add_variable( 'COUNT',2) - a_dict = { 'name':'value', 'name2':'value2', 'name3':'value3' } - task.add_variable(a_dict) - - -add_variable( (Node)arg1, (str)arg2, (int)arg3) -> Node - -add_variable( (Node)arg1, (Variable)arg2) -> Node - -add_variable( (Node)arg1, (dict)arg2) -> Node - - -.. py:method:: Node.add_verify( (Node)arg1, (Verify)arg2) -> None : + +This defines a variable for use in :term:`variable substitution` in a :term:`ecf script` file. +There can be any number of variables. The variables are names inside a pair of +'%' characters in an :term:`ecf script`. The name are case sensitive. +Special character in the value, must be placed inside single quotes if misinterpretation +is to be avoided. +The value of the variable replaces the variable name in the :term:`ecf script` at `job creation` time. +The variable names for any given node must be unique. If duplicates are added then the +the last value added is kept. + +Exception: + +- Writes warning to standard output, if a duplicate variable name is added + +Usage: + +.. code-block:: python + + task.add_variable( Variable('ECF_HOME','/tmp/')) + task.add_variable( 'TMPDIR','/tmp/') + task.add_variable( 'COUNT',2) + a_dict = { 'name':'value', 'name2':'value2', 'name3':'value3' } + task.add_variable(a_dict) + + +2. add_variable(self: ecflow.Node, arg0: str, arg1: typing.SupportsInt | typing.SupportsIndex) -> ecflow.Node + +3. add_variable(self: ecflow.Node, arg0: ecflow.Variable) -> ecflow.Node + +4. add_variable(self: ecflow.Node, arg0: ecflow.Edit) -> ecflow.Node + +5. add_variable(self: ecflow.Node, arg0: object) -> ecflow.Node + + +.. py:method:: Node.add_verify(self: ecflow.Node, arg0: ecflow.Verify) -> None :module: ecflow Add a Verify attribute. @@ -975,7 +1066,7 @@ Used in python simulation used to assert that a particular state was reached. t Verify(State.complete, 6)) # verify task completes 6 times during simulation -.. py:method:: Node.add_zombie( (Node)arg1, (ZombieAttr)arg2) -> Node : +.. py:method:: Node.add_zombie(self: ecflow.Node, arg0: ecflow.ZombieAttr) -> ecflow.Node :module: ecflow The :term:`zombie` attribute defines how a :term:`zombie` should be handled in an automated fashion @@ -1019,11 +1110,11 @@ Usage: Returns a list of :term:`aviso`\ s -.. py:method:: Node.change_complete( (Node)arg1, (str)arg2) -> None +.. py:method:: Node.change_complete(self: ecflow.Node, arg0: str) -> None :module: ecflow -.. py:method:: Node.change_trigger( (Node)arg1, (str)arg2) -> None +.. py:method:: Node.change_trigger(self: ecflow.Node, arg0: str) -> None :module: ecflow @@ -1045,93 +1136,117 @@ Returns a list of :term:`date`\ s Returns a list of :term:`day`\ s -.. py:method:: Node.delete_complete( (Node)arg1) -> None +.. py:method:: Node.delete_complete(self: ecflow.Node) -> None :module: ecflow -.. py:method:: Node.delete_cron( (Node)arg1, (str)arg2) -> None +.. py:method:: Node.delete_cron(*args, **kwargs) :module: ecflow -delete_cron( (Node)arg1, (Cron)arg2) -> None +Overloaded function. + +1. delete_cron(self: ecflow.Node, arg0: str) -> None + +2. delete_cron(self: ecflow.Node, arg0: ecflow.Cron) -> None -.. py:method:: Node.delete_date( (Node)arg1, (str)arg2) -> None +.. py:method:: Node.delete_date(*args, **kwargs) :module: ecflow -delete_date( (Node)arg1, (Date)arg2) -> None +Overloaded function. +1. delete_date(self: ecflow.Node, arg0: str) -> None -.. py:method:: Node.delete_day( (Node)arg1, (str)arg2) -> None +2. delete_date(self: ecflow.Node, arg0: ecflow.Date) -> None + + +.. py:method:: Node.delete_day(*args, **kwargs) :module: ecflow -delete_day( (Node)arg1, (Day)arg2) -> None +Overloaded function. + +1. delete_day(self: ecflow.Node, arg0: str) -> None + +2. delete_day(self: ecflow.Node, arg0: ecflow.Day) -> None -.. py:method:: Node.delete_event( (Node)arg1, (str)arg2) -> None +.. py:method:: Node.delete_event(self: ecflow.Node, arg0: str) -> None :module: ecflow -.. py:method:: Node.delete_generic( (Node)arg1, (str)arg2) -> None +.. py:method:: Node.delete_generic(self: ecflow.Node, arg0: str) -> None :module: ecflow -.. py:method:: Node.delete_inlimit( (Node)arg1, (str)arg2) -> None +.. py:method:: Node.delete_inlimit(self: ecflow.Node, arg0: str) -> None :module: ecflow -.. py:method:: Node.delete_label( (Node)arg1, (str)arg2) -> None +.. py:method:: Node.delete_label(self: ecflow.Node, arg0: str) -> None :module: ecflow -.. py:method:: Node.delete_limit( (Node)arg1, (str)arg2) -> None +.. py:method:: Node.delete_limit(self: ecflow.Node, arg0: str) -> None :module: ecflow -.. py:method:: Node.delete_meter( (Node)arg1, (str)arg2) -> None +.. py:method:: Node.delete_meter(self: ecflow.Node, arg0: str) -> None :module: ecflow -.. py:method:: Node.delete_queue( (Node)arg1, (str)arg2) -> None +.. py:method:: Node.delete_queue(self: ecflow.Node, arg0: str) -> None :module: ecflow -.. py:method:: Node.delete_repeat( (Node)arg1) -> None +.. py:method:: Node.delete_repeat(self: ecflow.Node) -> None :module: ecflow -.. py:method:: Node.delete_time( (Node)arg1, (str)arg2) -> None +.. py:method:: Node.delete_time(*args, **kwargs) :module: ecflow -delete_time( (Node)arg1, (Time)arg2) -> None +Overloaded function. +1. delete_time(self: ecflow.Node, arg0: str) -> None -.. py:method:: Node.delete_today( (Node)arg1, (str)arg2) -> None +2. delete_time(self: ecflow.Node, arg0: ecflow.Time) -> None + + +.. py:method:: Node.delete_today(*args, **kwargs) :module: ecflow -delete_today( (Node)arg1, (Today)arg2) -> None +Overloaded function. + +1. delete_today(self: ecflow.Node, arg0: str) -> None + +2. delete_today(self: ecflow.Node, arg0: ecflow.Today) -> None -.. py:method:: Node.delete_trigger( (Node)arg1) -> None +.. py:method:: Node.delete_trigger(self: ecflow.Node) -> None :module: ecflow -.. py:method:: Node.delete_variable( (Node)arg1, (str)arg2) -> None +.. py:method:: Node.delete_variable(self: ecflow.Node, arg0: str) -> None :module: ecflow -.. py:method:: Node.delete_zombie( (Node)arg1, (str)arg2) -> None +.. py:method:: Node.delete_zombie(*args, **kwargs) :module: ecflow -delete_zombie( (Node)arg1, (ZombieType)arg2) -> None +Overloaded function. +1. delete_zombie(self: ecflow.Node, arg0: str) -> None -.. py:method:: Node.evaluate_complete( (Node)arg1) -> bool : +2. delete_zombie(self: ecflow.Node, arg0: ecflow.ZombieType) -> None + + +.. py:method:: Node.evaluate_complete(self: ecflow.Node) -> bool :module: ecflow evaluate complete expression -.. py:method:: Node.evaluate_trigger( (Node)arg1) -> bool : +.. py:method:: Node.evaluate_trigger(self: ecflow.Node) -> bool :module: ecflow evaluate trigger expression @@ -1143,67 +1258,67 @@ evaluate trigger expression Returns a list of :term:`event`\ s -.. py:method:: Node.find_event( (Node)arg1, (str)arg2) -> Event : +.. py:method:: Node.find_event(self: ecflow.Node, arg0: str) -> ecflow.Event :module: ecflow Find the :term:`event` on the node only. Returns a object -.. py:method:: Node.find_gen_variable( (Node)arg1, (str)arg2) -> Variable : +.. py:method:: Node.find_gen_variable(self: ecflow.Node, arg0: str) -> ecflow.Variable :module: ecflow Find generated variable on the node only. Returns an object -.. py:method:: Node.find_generic( (Node)arg1, (str)arg2) -> Generic : +.. py:method:: Node.find_generic(self: ecflow.Node, arg0: str) -> ecflow.Generic :module: ecflow Find the :term:`generic` on the node only. Returns a Generic object -.. py:method:: Node.find_label( (Node)arg1, (str)arg2) -> Label : +.. py:method:: Node.find_label(self: ecflow.Node, arg0: str) -> ecflow.Label :module: ecflow Find the :term:`label` on the node only. Returns a object -.. py:method:: Node.find_limit( (Node)arg1, (str)arg2) -> Limit : +.. py:method:: Node.find_limit(self: ecflow.Node, arg0: str) -> ecflow.Limit :module: ecflow Find the :term:`limit` on the node only. returns a limit ptr -.. py:method:: Node.find_meter( (Node)arg1, (str)arg2) -> Meter : +.. py:method:: Node.find_meter(self: ecflow.Node, arg0: str) -> ecflow.Meter :module: ecflow Find the :term:`meter` on the node only. Returns an object -.. py:method:: Node.find_node_up_the_tree( (Node)arg1, (str)arg2) -> Node : +.. py:method:: Node.find_node_up_the_tree(self: ecflow.Node, arg0: str) -> ecflow.Node :module: ecflow Search immediate node, then up the node hierarchy -.. py:method:: Node.find_parent_variable( (Node)arg1, (str)arg2) -> Variable : +.. py:method:: Node.find_parent_variable(self: ecflow.Node, arg0: str) -> ecflow.Variable :module: ecflow Find user variable variable up the parent hierarchy. Returns an object -.. py:method:: Node.find_parent_variable_sub_value( (Node)arg1, (str)arg2) -> str : +.. py:method:: Node.find_parent_variable_sub_value(self: ecflow.Node, arg0: str) -> str :module: ecflow Find user variable *up* node tree, then variable substitute the value, otherwise return empty string -.. py:method:: Node.find_queue( (Node)arg1, (str)arg2) -> Queue : +.. py:method:: Node.find_queue(self: ecflow.Node, arg0: str) -> ecflow.Queue :module: ecflow Find the queue on the node only. Returns a queue object -.. py:method:: Node.find_variable( (Node)arg1, (str)arg2) -> Variable : +.. py:method:: Node.find_variable(self: ecflow.Node, arg0: str) -> ecflow.Variable :module: ecflow Find user variable on the node only. Returns an object @@ -1215,94 +1330,97 @@ Find user variable on the node only. Returns an object Returns a list of :term:`generic`\ s -.. py:method:: Node.get_abs_node_path( (Node)arg1) -> str : +.. py:method:: Node.get_abs_node_path(self: ecflow.Node) -> str :module: ecflow returns a string which holds the path to the node - - -.. py:method:: Node.get_all_nodes( (Node)arg1) -> NodeVec : +.. py:method:: Node.get_all_nodes(self: ecflow.Node) -> ecflow.NodeVec :module: ecflow Returns all the child nodes -.. py:method:: Node.get_autoarchive( (Node)arg1) -> Autoarchive +.. py:method:: Node.get_autoarchive(self: ecflow.Node) -> ecflow.Autoarchive :module: ecflow -.. py:method:: Node.get_autocancel( (Node)arg1) -> Autocancel +.. py:method:: Node.get_autocancel(self: ecflow.Node) -> ecflow.Autocancel :module: ecflow -.. py:method:: Node.get_autorestore( (Node)arg1) -> Autorestore +.. py:method:: Node.get_autorestore(self: ecflow.Node) -> ecflow.Autorestore :module: ecflow -.. py:method:: Node.get_complete( (Node)arg1) -> Expression +.. py:method:: Node.get_complete(self: ecflow.Node) -> ecflow.Expression :module: ecflow -.. py:method:: Node.get_defs( (Node)arg1) -> Defs +.. py:method:: Node.get_defs(self: ecflow.Node) -> Defs :module: ecflow -.. py:method:: Node.get_defstatus( (Node)arg1) -> DState +.. py:method:: Node.get_defstatus(self: ecflow.Node) -> ecflow.DState :module: ecflow -.. py:method:: Node.get_dstate( (Node)arg1) -> DState : +.. py:method:: Node.get_dstate(self: ecflow.Node) -> ecflow.DState :module: ecflow Returns the state of node. This will include suspended state -.. py:method:: Node.get_flag( (Node)arg1) -> Flag : +.. py:method:: Node.get_flag(self: ecflow.Node) -> ecflow.Flag :module: ecflow Return additional state associated with a node. -.. py:method:: Node.get_generated_variables( (Node)arg1) -> list : +.. py:method:: Node.get_generated_variables(*args, **kwargs) :module: ecflow +Overloaded function. + +1. get_generated_variables(self: ecflow.Node) -> list + Returns the list of generated variables. -get_generated_variables( (Node)arg1, (VariableList)arg2) -> None : - Retrieves the list of generated variables. Pass in ecflow.VariableList as argument to hold variables. +2. get_generated_variables(self: ecflow.Node, arg0: ecflow.VariableList) -> None +Retrieves the list of generated variables. Pass in ecflow.VariableList as argument to hold variables. -.. py:method:: Node.get_late( (Node)arg1) -> Late + +.. py:method:: Node.get_late(self: ecflow.Node) -> ecflow.Late :module: ecflow -.. py:method:: Node.get_parent( (Node)arg1) -> Node +.. py:method:: Node.get_parent(self: ecflow.Node) -> ecflow.Node :module: ecflow -.. py:method:: Node.get_repeat( (Node)arg1) -> Repeat +.. py:method:: Node.get_repeat(self: ecflow.Node) -> ecflow.Repeat :module: ecflow -.. py:method:: Node.get_state( (Node)arg1) -> State : +.. py:method:: Node.get_state(self: ecflow.Node) -> ecflow.State :module: ecflow Returns the state of the node. This excludes the suspended state -.. py:method:: Node.get_state_change_time( (Node)arg1 [, (str)format='iso_extended']) -> str : +.. py:method:: Node.get_state_change_time(self: ecflow.Node, format: str = 'iso_extended') -> str :module: ecflow Returns the time of the last state change as a string. Default format is iso_extended, (iso_extended, iso, simple) -.. py:method:: Node.get_trigger( (Node)arg1) -> Expression +.. py:method:: Node.get_trigger(self: ecflow.Node) -> ecflow.Expression :module: ecflow -.. py:method:: Node.has_time_dependencies( (Node)arg1) -> bool +.. py:method:: Node.has_time_dependencies(self: ecflow.Node) -> bool :module: ecflow @@ -1312,7 +1430,7 @@ Returns the time of the last state change as a string. Default format is iso_ext Returns a list of :term:`inlimit`\ s -.. py:method:: Node.is_suspended( (Node)arg1) -> bool : +.. py:method:: Node.is_suspended(self: ecflow.Node) -> bool :module: ecflow Returns true if the :term:`node` is in a :term:`suspended` state @@ -1342,7 +1460,7 @@ Returns a list of :term:`meter`\ s Returns a list of :term:`mirror`\ s -.. py:method:: Node.name( (Node)arg1) -> str +.. py:method:: Node.name(self: ecflow.Node) -> str :module: ecflow @@ -1352,37 +1470,48 @@ Returns a list of :term:`mirror`\ s Returns a list of :term:`queue`\ s -.. py:method:: Node.remove( (Node)arg1) -> Node : +.. py:method:: Node.remove(self: ecflow.Node) -> ecflow.Node :module: ecflow Remove the node from its parent. and returns it -.. py:method:: Node.replace_on_server( (Node)arg1 [, (bool)suspend_node_first=True [, (bool)force=True]]) -> None : +.. py:method:: Node.replace_on_server(*args, **kwargs) :module: ecflow +Overloaded function. + +1. replace_on_server(self: ecflow.Node, suspend_node_first: bool = True, force: bool = True) -> None + replace node on the server. -replace_on_server( (Node)arg1, (str)arg2, (str)arg3 [, (bool)suspend_node_first=True [, (bool)force=True]]) -> None : - replace node on the server. +2. replace_on_server(self: ecflow.Node, host: str, port: str, suspend_node_first: bool = True, force: bool = True) -> None -replace_on_server( (Node)arg1, (str)arg2 [, (bool)suspend_node_first=True [, (bool)force=True]]) -> None : - replace node on the server. +replace node on the server. -replace_on_server( (Node)arg1, (Client)arg2 [, (bool)suspend_node_first=True [, (bool)force=True]]) -> None : - replace node on the server. +3. replace_on_server(self: ecflow.Node, host_port: str, suspend_node_first: bool = True, force: bool = True) -> None +replace node on the server. + +4. replace_on_server(self: ecflow.Node, client: ClientInvoker, suspend_node_first: bool = True, force: bool = True) -> None + +replace node on the server. -.. py:method:: Node.sort_attributes( (Node)arg1, (AttrType)arg2) -> None + +.. py:method:: Node.sort_attributes(*args, **kwargs) :module: ecflow -sort_attributes( (Node)arg1, (AttrType)arg2, (bool)arg3) -> None +Overloaded function. + +1. sort_attributes(self: ecflow.Node, arg0: ecflow.AttrType) -> None + +2. sort_attributes(self: ecflow.Node, arg0: ecflow.AttrType, arg1: bool) -> None -sort_attributes( (Node)arg1, (AttrType)arg2, (bool)arg3, (list)arg4) -> None +3. sort_attributes(self: ecflow.Node, arg0: ecflow.AttrType, arg1: bool, arg2: list) -> None -sort_attributes( (Node)arg1, (str)attribute_type [, (bool)recursive=True [, (list)no_sort=[]]]) -> None +4. sort_attributes(self: ecflow.Node, attribute_type: str, recursive: bool = True, no_sort: list = []) -> None -sort_attributes( (Node)arg1, (AttrType)arg2, (bool)attribute_type [, (object)recursive=True]) -> None +5. sort_attributes(self: ecflow.Node, attribute_type: ecflow.AttrType, recursive: bool = True, no_sort: collections.abc.Sequence[str] = []) -> None .. py:property:: Node.times @@ -1397,7 +1526,7 @@ Returns a list of :term:`time`\ s Returns a list of :term:`today`\ s -.. py:method:: Node.update_generated_variables( (Node)arg1) -> None +.. py:method:: Node.update_generated_variables(self: ecflow.Node) -> None :module: ecflow diff --git a/docs/python_api/NodeContainer.rst b/docs/python_api/NodeContainer.rst index c1cbcf090..40d012aa2 100644 --- a/docs/python_api/NodeContainer.rst +++ b/docs/python_api/NodeContainer.rst @@ -12,68 +12,76 @@ NodeContainer is the abstract base class for a Suite and Family A NodeContainer can have Families and Tasks as children -.. py:method:: NodeContainer.add_family( (NodeContainer)arg1, (str)arg2) -> Family : +.. py:method:: NodeContainer.add_family(*args, **kwargs) :module: ecflow +Overloaded function. + +1. add_family(self: ecflow.NodeContainer, arg0: str) -> ecflow.Node + Add a :term:`family`. See :py:class:`ecflow.Family`. - - Multiple families can be added. However family names must be unique. - for a given parent. Families can be hierarchical. - - Exception: - - - Throws RuntimeError if a duplicate is added - - Usage: - - .. code-block:: python - - suite = Suite('suite') # create a suite - f1 = Family('f1') # create a family - suite.add_family(f1) # add family to suite - f2 = suite.add_family('f2') # create a family and add to suite - - -add_family( (NodeContainer)arg1, (Family)arg2) -> Family - - -.. py:method:: NodeContainer.add_task( (NodeContainer)arg1, (str)arg2) -> Task : + +Multiple families can be added. However family names must be unique. +for a given parent. Families can be hierarchical. + +Exception: + +- Throws RuntimeError if a duplicate is added + +Usage: + +.. code-block:: python + + suite = Suite('suite') # create a suite + f1 = Family('f1') # create a family + suite.add_family(f1) # add family to suite + f2 = suite.add_family('f2') # create a family and add to suite + + +2. add_family(self: ecflow.NodeContainer, arg0: Family) -> ecflow.Node + + +.. py:method:: NodeContainer.add_task(*args, **kwargs) :module: ecflow +Overloaded function. + +1. add_task(self: ecflow.NodeContainer, arg0: str) -> ecflow.Node + Add a :term:`task`. See :py:class:`ecflow.Task` - - Multiple Tasks can be added. However Task names must be unique, - for a given parent. Task can be added to Familiy's or Suites. - - Exception: - - - Throws RuntimeError if a duplicate is added - - Usage: - - .. code-block:: python - - f1 = Family('f1') # create a family - t1 = Task('t1') # create a task - f1.add_task(t1) # add task to family - t2 = f1.add_task('t2') # create task 't2' and add to family - -add_task( (NodeContainer)arg1, (Task)arg2) -> Task - - -.. py:method:: NodeContainer.find_family( (NodeContainer)arg1, (str)arg2) -> Family : + +Multiple Tasks can be added. However Task names must be unique, +for a given parent. Task can be added to Familiy's or Suites. + +Exception: + +- Throws RuntimeError if a duplicate is added + +Usage: + +.. code-block:: python + + f1 = Family('f1') # create a family + t1 = Task('t1') # create a task + f1.add_task(t1) # add task to family + t2 = f1.add_task('t2') # create task 't2' and add to family + +2. add_task(self: ecflow.NodeContainer, arg0: ecflow.Task) -> ecflow.Node + + +.. py:method:: NodeContainer.find_family(self: ecflow.NodeContainer, arg0: str) -> Family :module: ecflow Find a family given a name -.. py:method:: NodeContainer.find_node( (NodeContainer)arg1, (str)arg2) -> Node : +.. py:method:: NodeContainer.find_node(self: ecflow.NodeContainer, arg0: str) -> ecflow.Node :module: ecflow Find immediate child node given a name -.. py:method:: NodeContainer.find_task( (NodeContainer)arg1, (str)arg2) -> Task : +.. py:method:: NodeContainer.find_task(self: ecflow.NodeContainer, arg0: str) -> ecflow.Task :module: ecflow Find a task given a name diff --git a/docs/python_api/NodeVec.rst b/docs/python_api/NodeVec.rst index 4bb15fbe5..ef203c3eb 100644 --- a/docs/python_api/NodeVec.rst +++ b/docs/python_api/NodeVec.rst @@ -5,15 +5,65 @@ ecflow.NodeVec .. py:class:: NodeVec :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Hold a list of Nodes (i.e :term:`suite`, :term:`family` or :term:`task`\ s) -.. py:method:: NodeVec.append( (NodeVec)arg1, (object)arg2) -> None +.. py:method:: NodeVec.append(self: ecflow.NodeVec, x: Node) -> None :module: ecflow +Add an item to the end of the list -.. py:method:: NodeVec.extend( (NodeVec)arg1, (object)arg2) -> None + +.. py:method:: NodeVec.clear(self: ecflow.NodeVec) -> None + :module: ecflow + +Clear the contents + + +.. py:method:: NodeVec.count(self: ecflow.NodeVec, x: Node) -> int + :module: ecflow + +Return the number of times ``x`` appears in the list + + +.. py:method:: NodeVec.extend(*args, **kwargs) + :module: ecflow + +Overloaded function. + +1. extend(self: ecflow.NodeVec, L: ecflow.NodeVec) -> None + +Extend the list by appending all the items in the given list + +2. extend(self: ecflow.NodeVec, L: collections.abc.Iterable) -> None + +Extend the list by appending all the items in the given list + + +.. py:method:: NodeVec.insert(self: ecflow.NodeVec, i: typing.SupportsInt | typing.SupportsIndex, x: Node) -> None + :module: ecflow + +Insert an item at a given position. + + +.. py:method:: NodeVec.pop(*args, **kwargs) :module: ecflow +Overloaded function. + +1. pop(self: ecflow.NodeVec) -> Node + +Remove and return the last item + +2. pop(self: ecflow.NodeVec, i: typing.SupportsInt | typing.SupportsIndex) -> Node + +Remove and return the item at index ``i`` + + +.. py:method:: NodeVec.remove(self: ecflow.NodeVec, x: Node) -> None + :module: ecflow + +Remove the first item from the list whose value is x. It is an error if there is no such item. + diff --git a/docs/python_api/PartExpression.rst b/docs/python_api/PartExpression.rst index 9a4e49704..1b753a9a8 100644 --- a/docs/python_api/PartExpression.rst +++ b/docs/python_api/PartExpression.rst @@ -5,7 +5,7 @@ ecflow.PartExpression .. py:class:: PartExpression :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` PartExpression holds part of a :term:`trigger` or :term:`complete expression`. @@ -47,16 +47,16 @@ The trigger for task2 is equivalent to 't1 == complete or t4 == complete and t5 == active or t7 == active' -.. py:method:: PartExpression.and_expr( (PartExpression)arg1) -> bool +.. py:method:: PartExpression.and_expr(self: ecflow.PartExpression) -> bool :module: ecflow -.. py:method:: PartExpression.get_expression( (PartExpression)arg1) -> str : +.. py:method:: PartExpression.get_expression(self: ecflow.PartExpression) -> str :module: ecflow returns the part expression as a string -.. py:method:: PartExpression.or_expr( (PartExpression)arg1) -> bool +.. py:method:: PartExpression.or_expr(self: ecflow.PartExpression) -> bool :module: ecflow diff --git a/docs/python_api/PrintStyle.rst b/docs/python_api/PrintStyle.rst index 80cf50329..601d78e6a 100644 --- a/docs/python_api/PrintStyle.rst +++ b/docs/python_api/PrintStyle.rst @@ -5,7 +5,7 @@ ecflow.PrintStyle .. py:class:: PrintStyle :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Singleton used to control the print Style. See :py:class:`ecflow.Style` @@ -19,14 +19,14 @@ Usage:: PrintStyle.set_style(old_style) # reset previous style -.. py:method:: PrintStyle.get_style() -> Style : +.. py:method:: PrintStyle.get_style() -> ecflow.Style :module: ecflow :staticmethod: Returns the style, static method -.. py:method:: PrintStyle.set_style( (Style)arg1) -> None : +.. py:method:: PrintStyle.set_style(arg0: ecflow.Style) -> None :module: ecflow :staticmethod: diff --git a/docs/python_api/Queue.rst b/docs/python_api/Queue.rst index c0a8efb34..6758ec428 100644 --- a/docs/python_api/Queue.rst +++ b/docs/python_api/Queue.rst @@ -5,30 +5,30 @@ ecflow.Queue .. py:class:: Queue :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Queue allows specification of queue on Task, Family and Suite nodes -.. py:method:: Queue.empty( (Queue)arg1) -> bool : +.. py:method:: Queue.empty(self: ecflow.Queue) -> bool :module: ecflow Return true if the Queue is empty. Used when returning a NULL Queue, from a find -.. py:method:: Queue.index( (Queue)arg1) -> int : +.. py:method:: Queue.index(self: ecflow.Queue) -> int :module: ecflow Return the queue current index as a integer -.. py:method:: Queue.name( (Queue)arg1) -> str : +.. py:method:: Queue.name(self: ecflow.Queue) -> str :module: ecflow Return the queue name as string -.. py:method:: Queue.value( (Queue)arg1) -> str : +.. py:method:: Queue.value(self: ecflow.Queue) -> str :module: ecflow Return the queue current value as string diff --git a/docs/python_api/Repeat.rst b/docs/python_api/Repeat.rst index 370966fb6..bbee31fd7 100644 --- a/docs/python_api/Repeat.rst +++ b/docs/python_api/Repeat.rst @@ -5,42 +5,42 @@ ecflow.Repeat .. py:class:: Repeat :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Represents one of RepeatString,RepeatEnumerated,RepeatInteger,RepeatDate,RepeatDay -.. py:method:: Repeat.empty( (Repeat)arg1) -> bool : +.. py:method:: Repeat.empty(self: ecflow.Repeat) -> bool :module: ecflow Return true if the repeat is empty. -.. py:method:: Repeat.end( (Repeat)arg1) -> int : +.. py:method:: Repeat.end(self: ecflow.Repeat) -> int :module: ecflow The last value of the repeat, as an integer -.. py:method:: Repeat.name( (Repeat)arg1) -> str : +.. py:method:: Repeat.name(self: ecflow.Repeat) -> str :module: ecflow The :term:`repeat` name, can be referenced in :term:`trigger` expressions -.. py:method:: Repeat.start( (Repeat)arg1) -> int : +.. py:method:: Repeat.start(self: ecflow.Repeat) -> int :module: ecflow The start value of the repeat, as an integer -.. py:method:: Repeat.step( (Repeat)arg1) -> int : +.. py:method:: Repeat.step(self: ecflow.Repeat) -> int :module: ecflow The increment for the repeat, as an integer -.. py:method:: Repeat.value( (Repeat)arg1) -> int : +.. py:method:: Repeat.value(self: ecflow.Repeat) -> int :module: ecflow The current value of the repeat as an integer diff --git a/docs/python_api/RepeatDate.rst b/docs/python_api/RepeatDate.rst index 722bd0783..27ced4a8d 100644 --- a/docs/python_api/RepeatDate.rst +++ b/docs/python_api/RepeatDate.rst @@ -5,7 +5,7 @@ ecflow.RepeatDate .. py:class:: RepeatDate :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Allows a :term:`node` to be repeated using a yyyymmdd format @@ -39,25 +39,25 @@ Usage: RepeatDate('YMD', 20050130, 20050203 )) -.. py:method:: RepeatDate.end( (RepeatDate)arg1) -> int : +.. py:method:: RepeatDate.end(self: ecflow.RepeatDate) -> int :module: ecflow Return the end date as an integer in yyyymmdd format -.. py:method:: RepeatDate.name( (RepeatDate)arg1) -> str : +.. py:method:: RepeatDate.name(self: ecflow.RepeatDate) -> str :module: ecflow Return the name of the repeat. -.. py:method:: RepeatDate.start( (RepeatDate)arg1) -> int : +.. py:method:: RepeatDate.start(self: ecflow.RepeatDate) -> int :module: ecflow Return the start date as an integer in yyyymmdd format -.. py:method:: RepeatDate.step( (RepeatDate)arg1) -> int : +.. py:method:: RepeatDate.step(self: ecflow.RepeatDate) -> int :module: ecflow Return the step increment. This is used to update the repeat, until end date is reached diff --git a/docs/python_api/RepeatDateList.rst b/docs/python_api/RepeatDateList.rst index 60df2ed8d..72dab75e7 100644 --- a/docs/python_api/RepeatDateList.rst +++ b/docs/python_api/RepeatDateList.rst @@ -5,7 +5,7 @@ ecflow.RepeatDateList .. py:class:: RepeatDateList :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Allows a :term:`node` to be repeated using arbitrary list of yyyymmdd integers @@ -38,19 +38,19 @@ Usage: RepeatDateList('YMD',[20050130, 20050203] )) -.. py:method:: RepeatDateList.end( (RepeatDateList)arg1) -> int : +.. py:method:: RepeatDateList.end(self: ecflow.RepeatDateList) -> int :module: ecflow Return the end date as an integer in yyyymmdd format -.. py:method:: RepeatDateList.name( (RepeatDateList)arg1) -> str : +.. py:method:: RepeatDateList.name(self: ecflow.RepeatDateList) -> str :module: ecflow Return the name of the repeat. -.. py:method:: RepeatDateList.start( (RepeatDateList)arg1) -> int : +.. py:method:: RepeatDateList.start(self: ecflow.RepeatDateList) -> int :module: ecflow Return the start date as an integer in yyyymmdd format diff --git a/docs/python_api/RepeatDateTime.rst b/docs/python_api/RepeatDateTime.rst index 7167cfc0a..026cb1be2 100644 --- a/docs/python_api/RepeatDateTime.rst +++ b/docs/python_api/RepeatDateTime.rst @@ -5,7 +5,7 @@ ecflow.RepeatDateTime .. py:class:: RepeatDateTime :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Allows a :term:`node` to be repeated based on date+time instants (using yyyymmddTHHMMSS format). @@ -41,25 +41,25 @@ Usage: RepeatDateTime('DATETIME', '20050130T000000', '20050203T120000', '1:00:00')) -.. py:method:: RepeatDateTime.end( (RepeatDateTime)arg1) -> int : +.. py:method:: RepeatDateTime.end(self: ecflow.RepeatDateTime) -> int :module: ecflow Return the end date as an integer (i.e. seconds since 19700101T000000) -.. py:method:: RepeatDateTime.name( (RepeatDateTime)arg1) -> str : +.. py:method:: RepeatDateTime.name(self: ecflow.RepeatDateTime) -> str :module: ecflow Return the name of the repeat. -.. py:method:: RepeatDateTime.start( (RepeatDateTime)arg1) -> int : +.. py:method:: RepeatDateTime.start(self: ecflow.RepeatDateTime) -> int :module: ecflow Return the start date as an integer (i.e. seconds since 19700101T000000) -.. py:method:: RepeatDateTime.step( (RepeatDateTime)arg1) -> int : +.. py:method:: RepeatDateTime.step(self: ecflow.RepeatDateTime) -> int :module: ecflow Return the step increment (in seconds). This is used to update the repeat, until end instant is reached diff --git a/docs/python_api/RepeatDateTimeList.rst b/docs/python_api/RepeatDateTimeList.rst index 4d62ba77a..c58c98413 100644 --- a/docs/python_api/RepeatDateTimeList.rst +++ b/docs/python_api/RepeatDateTimeList.rst @@ -5,7 +5,7 @@ ecflow.RepeatDateTimeList .. py:class:: RepeatDateTimeList :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Allows a :term:`node` to be repeated using an arbitrary list of date+time instants (yyyymmddTHHMMSS format). @@ -32,19 +32,19 @@ Usage: RepeatDateTimeList('DT', ['20240101T000000', '20240102T120000'])) -.. py:method:: RepeatDateTimeList.end( (RepeatDateTimeList)arg1) -> int : +.. py:method:: RepeatDateTimeList.end(self: ecflow.RepeatDateTimeList) -> int :module: ecflow Return the end instant as seconds since epoch -.. py:method:: RepeatDateTimeList.name( (RepeatDateTimeList)arg1) -> str : +.. py:method:: RepeatDateTimeList.name(self: ecflow.RepeatDateTimeList) -> str :module: ecflow Return the name of the repeat. -.. py:method:: RepeatDateTimeList.start( (RepeatDateTimeList)arg1) -> int : +.. py:method:: RepeatDateTimeList.start(self: ecflow.RepeatDateTimeList) -> int :module: ecflow Return the start instant as seconds since epoch diff --git a/docs/python_api/RepeatDay.rst b/docs/python_api/RepeatDay.rst index 1e2a07014..66b0aeb38 100644 --- a/docs/python_api/RepeatDay.rst +++ b/docs/python_api/RepeatDay.rst @@ -5,7 +5,7 @@ ecflow.RepeatDay .. py:class:: RepeatDay :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` A repeat that is infinite. diff --git a/docs/python_api/RepeatEnumerated.rst b/docs/python_api/RepeatEnumerated.rst index 6b041790b..4a2d520ed 100644 --- a/docs/python_api/RepeatEnumerated.rst +++ b/docs/python_api/RepeatEnumerated.rst @@ -5,7 +5,7 @@ ecflow.RepeatEnumerated .. py:class:: RepeatEnumerated :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Allows a node to be repeated using a enumerated list. @@ -27,20 +27,20 @@ Usage: RepeatEnumerated('COLOR', [ 'red', 'green', 'blue' ] )) -.. py:method:: RepeatEnumerated.end( (RepeatEnumerated)arg1) -> int +.. py:method:: RepeatEnumerated.end(self: ecflow.RepeatEnumerated) -> int :module: ecflow -.. py:method:: RepeatEnumerated.name( (RepeatEnumerated)arg1) -> str : +.. py:method:: RepeatEnumerated.name(self: ecflow.RepeatEnumerated) -> str :module: ecflow Return the name of the :term:`repeat`. -.. py:method:: RepeatEnumerated.start( (RepeatEnumerated)arg1) -> int +.. py:method:: RepeatEnumerated.start(self: ecflow.RepeatEnumerated) -> int :module: ecflow -.. py:method:: RepeatEnumerated.step( (RepeatEnumerated)arg1) -> int +.. py:method:: RepeatEnumerated.step(self: ecflow.RepeatEnumerated) -> int :module: ecflow diff --git a/docs/python_api/RepeatInteger.rst b/docs/python_api/RepeatInteger.rst index 4eaf78baf..5f97a61a6 100644 --- a/docs/python_api/RepeatInteger.rst +++ b/docs/python_api/RepeatInteger.rst @@ -5,7 +5,7 @@ ecflow.RepeatInteger .. py:class:: RepeatInteger :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Allows a :term:`node` to be repeated using a integer range. @@ -29,20 +29,20 @@ Usage: RepeatInteger('HOUR', 6, 24, 6 )) -.. py:method:: RepeatInteger.end( (RepeatInteger)arg1) -> int +.. py:method:: RepeatInteger.end(self: ecflow.RepeatInteger) -> int :module: ecflow -.. py:method:: RepeatInteger.name( (RepeatInteger)arg1) -> str : +.. py:method:: RepeatInteger.name(self: ecflow.RepeatInteger) -> str :module: ecflow Return the name of the repeat. -.. py:method:: RepeatInteger.start( (RepeatInteger)arg1) -> int +.. py:method:: RepeatInteger.start(self: ecflow.RepeatInteger) -> int :module: ecflow -.. py:method:: RepeatInteger.step( (RepeatInteger)arg1) -> int +.. py:method:: RepeatInteger.step(self: ecflow.RepeatInteger) -> int :module: ecflow diff --git a/docs/python_api/RepeatString.rst b/docs/python_api/RepeatString.rst index 705e6d994..4db010e64 100644 --- a/docs/python_api/RepeatString.rst +++ b/docs/python_api/RepeatString.rst @@ -5,7 +5,7 @@ ecflow.RepeatString .. py:class:: RepeatString :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Allows a :term:`node` to be repeated using a string list. @@ -27,20 +27,20 @@ Usage: RepeatString('COLOR', [ 'red', 'green', 'blue' ] )) -.. py:method:: RepeatString.end( (RepeatString)arg1) -> int +.. py:method:: RepeatString.end(self: ecflow.RepeatString) -> int :module: ecflow -.. py:method:: RepeatString.name( (RepeatString)arg1) -> str : +.. py:method:: RepeatString.name(self: ecflow.RepeatString) -> str :module: ecflow Return the name of the :term:`repeat`. -.. py:method:: RepeatString.start( (RepeatString)arg1) -> int +.. py:method:: RepeatString.start(self: ecflow.RepeatString) -> int :module: ecflow -.. py:method:: RepeatString.step( (RepeatString)arg1) -> int +.. py:method:: RepeatString.step(self: ecflow.RepeatString) -> int :module: ecflow diff --git a/docs/python_api/SState.rst b/docs/python_api/SState.rst index 4ca26b1d0..47b6db78e 100644 --- a/docs/python_api/SState.rst +++ b/docs/python_api/SState.rst @@ -5,34 +5,40 @@ ecflow.SState .. py:class:: SState :module: ecflow - Bases: :py:class:`~Boost.Python.enum` + Bases: :py:class:`~pybind11_builtins.pybind11_object` A SState holds the :term:`ecflow_server` state See :term:`server states` +Members: + + HALTED + + SHUTDOWN + + RUNNING + .. py:attribute:: SState.HALTED :module: ecflow - :value: ecflow.SState.HALTED + :value: .. py:attribute:: SState.RUNNING :module: ecflow - :value: ecflow.SState.RUNNING + :value: .. py:attribute:: SState.SHUTDOWN :module: ecflow - :value: ecflow.SState.SHUTDOWN + :value: -.. py:attribute:: SState.names +.. py:property:: SState.name :module: ecflow - :value: {'HALTED': ecflow.SState.HALTED, 'RUNNING': ecflow.SState.RUNNING, 'SHUTDOWN': ecflow.SState.SHUTDOWN} -.. py:attribute:: SState.values +.. py:property:: SState.value :module: ecflow - :value: {0: ecflow.SState.HALTED, 1: ecflow.SState.SHUTDOWN, 2: ecflow.SState.RUNNING} diff --git a/docs/python_api/State.rst b/docs/python_api/State.rst index 27ef89862..711995563 100644 --- a/docs/python_api/State.rst +++ b/docs/python_api/State.rst @@ -5,7 +5,7 @@ ecflow.State .. py:class:: State :module: ecflow - Bases: :py:class:`~Boost.Python.enum` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Each :term:`node` can have a status, which reflects the life cycle of a node. @@ -23,43 +23,55 @@ It varies as follows: Jobs end by becoming either :term:`complete` or :term:`aborted` +Members: + + unknown + + complete + + queued + + aborted + + submitted + + active + .. py:attribute:: State.aborted :module: ecflow - :value: ecflow.State.aborted + :value: .. py:attribute:: State.active :module: ecflow - :value: ecflow.State.active + :value: .. py:attribute:: State.complete :module: ecflow - :value: ecflow.State.complete + :value: -.. py:attribute:: State.names +.. py:property:: State.name :module: ecflow - :value: {'aborted': ecflow.State.aborted, 'active': ecflow.State.active, 'complete': ecflow.State.complete, 'queued': ecflow.State.queued, 'submitted': ecflow.State.submitted, 'unknown': ecflow.State.unknown} .. py:attribute:: State.queued :module: ecflow - :value: ecflow.State.queued + :value: .. py:attribute:: State.submitted :module: ecflow - :value: ecflow.State.submitted + :value: .. py:attribute:: State.unknown :module: ecflow - :value: ecflow.State.unknown + :value: -.. py:attribute:: State.values +.. py:property:: State.value :module: ecflow - :value: {0: ecflow.State.unknown, 1: ecflow.State.complete, 2: ecflow.State.queued, 3: ecflow.State.aborted, 4: ecflow.State.submitted, 5: ecflow.State.active} diff --git a/docs/python_api/Style.rst b/docs/python_api/Style.rst index 9333b9b32..b03e210d3 100644 --- a/docs/python_api/Style.rst +++ b/docs/python_api/Style.rst @@ -5,7 +5,7 @@ ecflow.Style .. py:class:: Style :module: ecflow - Bases: :py:class:`~Boost.Python.enum` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Style is used to control printing output for the definition @@ -30,32 +30,41 @@ The following shows a summary of the features associated with each choice ===================== ==== ===== ======= +Members: + + NOTHING + + DEFS + + STATE + + MIGRATE + + .. py:attribute:: Style.DEFS :module: ecflow - :value: ecflow.Style.DEFS + :value: .. py:attribute:: Style.MIGRATE :module: ecflow - :value: ecflow.Style.MIGRATE + :value: .. py:attribute:: Style.NOTHING :module: ecflow - :value: ecflow.Style.NOTHING + :value: .. py:attribute:: Style.STATE :module: ecflow - :value: ecflow.Style.STATE + :value: -.. py:attribute:: Style.names +.. py:property:: Style.name :module: ecflow - :value: {'DEFS': ecflow.Style.DEFS, 'MIGRATE': ecflow.Style.MIGRATE, 'NOTHING': ecflow.Style.NOTHING, 'STATE': ecflow.Style.STATE} -.. py:attribute:: Style.values +.. py:property:: Style.value :module: ecflow - :value: {0: ecflow.Style.NOTHING, 1: ecflow.Style.DEFS, 2: ecflow.Style.STATE, 3: ecflow.Style.MIGRATE} diff --git a/docs/python_api/Submittable.rst b/docs/python_api/Submittable.rst index dec02e999..f566dbf1c 100644 --- a/docs/python_api/Submittable.rst +++ b/docs/python_api/Submittable.rst @@ -12,31 +12,31 @@ Submittable is the abstract base class for a Task and Alias It provides a process id, password and try number -.. py:method:: Submittable.get_aborted_reason( (Submittable)arg1) -> str : +.. py:method:: Submittable.get_aborted_reason(self: ecflow.Submittable) -> str :module: ecflow If node was aborted and a reason was provided, return the string -.. py:method:: Submittable.get_int_try_no( (Submittable)arg1) -> int : +.. py:method:: Submittable.get_int_try_no(self: ecflow.Submittable) -> int :module: ecflow The current try number as integer. -.. py:method:: Submittable.get_jobs_password( (Submittable)arg1) -> str : +.. py:method:: Submittable.get_jobs_password(self: ecflow.Submittable) -> str :module: ecflow The password. This generated by server -.. py:method:: Submittable.get_process_or_remote_id( (Submittable)arg1) -> str : +.. py:method:: Submittable.get_process_or_remote_id(self: ecflow.Submittable) -> str :module: ecflow The process or remote id of the running job -.. py:method:: Submittable.get_try_no( (Submittable)arg1) -> str : +.. py:method:: Submittable.get_try_no(self: ecflow.Submittable) -> str :module: ecflow The current try number as a string. diff --git a/docs/python_api/Suite.rst b/docs/python_api/Suite.rst index d9b59a352..50215bb47 100644 --- a/docs/python_api/Suite.rst +++ b/docs/python_api/Suite.rst @@ -40,29 +40,29 @@ Usage: Task('t1')))) # create in in-place -.. py:method:: Suite.add_clock( (Suite)arg1, (Clock)arg2) -> Suite +.. py:method:: Suite.add_clock(self: ecflow.Suite, arg0: ecflow.Clock) -> ecflow.Suite :module: ecflow -.. py:method:: Suite.add_end_clock( (Suite)arg1, (Clock)arg2) -> Suite : +.. py:method:: Suite.add_end_clock(self: ecflow.Suite, arg0: ecflow.Clock) -> ecflow.Suite :module: ecflow End clock, used to mark end of simulation -.. py:method:: Suite.begun( (Suite)arg1) -> bool : +.. py:method:: Suite.begun(self: ecflow.Suite) -> bool :module: ecflow Returns true if the :term:`suite` has begun, false otherwise -.. py:method:: Suite.get_clock( (Suite)arg1) -> Clock : +.. py:method:: Suite.get_clock(self: ecflow.Suite) -> ecflow.Clock :module: ecflow Returns the :term:`suite` :term:`clock` -.. py:method:: Suite.get_end_clock( (Suite)arg1) -> Clock : +.. py:method:: Suite.get_end_clock(self: ecflow.Suite) -> ecflow.Clock :module: ecflow Return the suite's end clock. Can be NULL diff --git a/docs/python_api/SuiteVec.rst b/docs/python_api/SuiteVec.rst index 73fb8f84d..d4047c794 100644 --- a/docs/python_api/SuiteVec.rst +++ b/docs/python_api/SuiteVec.rst @@ -5,15 +5,65 @@ ecflow.SuiteVec .. py:class:: SuiteVec :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Hold a list of :term:`suite` nodes's -.. py:method:: SuiteVec.append( (SuiteVec)arg1, (object)arg2) -> None +.. py:method:: SuiteVec.append(self: ecflow.SuiteVec, x: Suite) -> None :module: ecflow +Add an item to the end of the list -.. py:method:: SuiteVec.extend( (SuiteVec)arg1, (object)arg2) -> None + +.. py:method:: SuiteVec.clear(self: ecflow.SuiteVec) -> None + :module: ecflow + +Clear the contents + + +.. py:method:: SuiteVec.count(self: ecflow.SuiteVec, x: Suite) -> int + :module: ecflow + +Return the number of times ``x`` appears in the list + + +.. py:method:: SuiteVec.extend(*args, **kwargs) + :module: ecflow + +Overloaded function. + +1. extend(self: ecflow.SuiteVec, L: ecflow.SuiteVec) -> None + +Extend the list by appending all the items in the given list + +2. extend(self: ecflow.SuiteVec, L: collections.abc.Iterable) -> None + +Extend the list by appending all the items in the given list + + +.. py:method:: SuiteVec.insert(self: ecflow.SuiteVec, i: typing.SupportsInt | typing.SupportsIndex, x: Suite) -> None + :module: ecflow + +Insert an item at a given position. + + +.. py:method:: SuiteVec.pop(*args, **kwargs) :module: ecflow +Overloaded function. + +1. pop(self: ecflow.SuiteVec) -> Suite + +Remove and return the last item + +2. pop(self: ecflow.SuiteVec, i: typing.SupportsInt | typing.SupportsIndex) -> Suite + +Remove and return the item at index ``i`` + + +.. py:method:: SuiteVec.remove(self: ecflow.SuiteVec, x: Suite) -> None + :module: ecflow + +Remove the first item from the list whose value is x. It is an error if there is no such item. + diff --git a/docs/python_api/TaskVec.rst b/docs/python_api/TaskVec.rst index feef407ec..8b79148b0 100644 --- a/docs/python_api/TaskVec.rst +++ b/docs/python_api/TaskVec.rst @@ -5,15 +5,65 @@ ecflow.TaskVec .. py:class:: TaskVec :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Hold a list of :term:`task` nodes -.. py:method:: TaskVec.append( (TaskVec)arg1, (object)arg2) -> None +.. py:method:: TaskVec.append(self: ecflow.TaskVec, x: Task) -> None :module: ecflow +Add an item to the end of the list -.. py:method:: TaskVec.extend( (TaskVec)arg1, (object)arg2) -> None + +.. py:method:: TaskVec.clear(self: ecflow.TaskVec) -> None + :module: ecflow + +Clear the contents + + +.. py:method:: TaskVec.count(self: ecflow.TaskVec, x: Task) -> int + :module: ecflow + +Return the number of times ``x`` appears in the list + + +.. py:method:: TaskVec.extend(*args, **kwargs) + :module: ecflow + +Overloaded function. + +1. extend(self: ecflow.TaskVec, L: ecflow.TaskVec) -> None + +Extend the list by appending all the items in the given list + +2. extend(self: ecflow.TaskVec, L: collections.abc.Iterable) -> None + +Extend the list by appending all the items in the given list + + +.. py:method:: TaskVec.insert(self: ecflow.TaskVec, i: typing.SupportsInt | typing.SupportsIndex, x: Task) -> None + :module: ecflow + +Insert an item at a given position. + + +.. py:method:: TaskVec.pop(*args, **kwargs) :module: ecflow +Overloaded function. + +1. pop(self: ecflow.TaskVec) -> Task + +Remove and return the last item + +2. pop(self: ecflow.TaskVec, i: typing.SupportsInt | typing.SupportsIndex) -> Task + +Remove and return the item at index ``i`` + + +.. py:method:: TaskVec.remove(self: ecflow.TaskVec, x: Task) -> None + :module: ecflow + +Remove the first item from the list whose value is x. It is an error if there is no such item. + diff --git a/docs/python_api/Time.rst b/docs/python_api/Time.rst index 5fa4bd934..9e8ef2750 100644 --- a/docs/python_api/Time.rst +++ b/docs/python_api/Time.rst @@ -5,7 +5,7 @@ ecflow.Time .. py:class:: Time :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Is used to define a :term:`time` dependency @@ -52,7 +52,7 @@ Usage: Time('10:30 20:10 00:10')) # Create time in place -.. py:method:: Time.time_series( (Time)arg1) -> TimeSeries : +.. py:method:: Time.time_series(self: ecflow.Time) -> ecflow.TimeSeries :module: ecflow Return the Time attributes time series diff --git a/docs/python_api/TimeSeries.rst b/docs/python_api/TimeSeries.rst index 7ce18d9f4..9fb4b2dd9 100644 --- a/docs/python_api/TimeSeries.rst +++ b/docs/python_api/TimeSeries.rst @@ -5,7 +5,7 @@ ecflow.TimeSeries .. py:class:: TimeSeries :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` A TimeSeries can hold a single time slot or a series. @@ -44,31 +44,31 @@ Usage:: time_series = TimeSeries(TimeSlot(10,11),False) -.. py:method:: TimeSeries.finish( (TimeSeries)arg1) -> TimeSlot : +.. py:method:: TimeSeries.finish(self: ecflow.TimeSeries) -> ecflow.TimeSlot :module: ecflow returns the finish time if time series specified, else returns a NULL time slot -.. py:method:: TimeSeries.has_increment( (TimeSeries)arg1) -> bool : +.. py:method:: TimeSeries.has_increment(self: ecflow.TimeSeries) -> bool :module: ecflow distinguish between a single time slot and a series. returns true for a series -.. py:method:: TimeSeries.incr( (TimeSeries)arg1) -> TimeSlot : +.. py:method:: TimeSeries.incr(self: ecflow.TimeSeries) -> ecflow.TimeSlot :module: ecflow returns the increment time if time series specified, else returns a NULL time slot -.. py:method:: TimeSeries.relative( (TimeSeries)arg1) -> bool : +.. py:method:: TimeSeries.relative(self: ecflow.TimeSeries) -> bool :module: ecflow returns a boolean where true means that the time series is relative -.. py:method:: TimeSeries.start( (TimeSeries)arg1) -> TimeSlot : +.. py:method:: TimeSeries.start(self: ecflow.TimeSeries) -> ecflow.TimeSlot :module: ecflow returns the start time diff --git a/docs/python_api/TimeSlot.rst b/docs/python_api/TimeSlot.rst index c504a03a9..1c06779ba 100644 --- a/docs/python_api/TimeSlot.rst +++ b/docs/python_api/TimeSlot.rst @@ -5,7 +5,7 @@ ecflow.TimeSlot .. py:class:: TimeSlot :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Represents a time slot. @@ -24,14 +24,14 @@ Usage:: ts = TimeSlot(10,11) -.. py:method:: TimeSlot.empty( (TimeSlot)arg1) -> bool +.. py:method:: TimeSlot.empty(self: ecflow.TimeSlot) -> bool :module: ecflow -.. py:method:: TimeSlot.hour( (TimeSlot)arg1) -> int +.. py:method:: TimeSlot.hour(self: ecflow.TimeSlot) -> int :module: ecflow -.. py:method:: TimeSlot.minute( (TimeSlot)arg1) -> int +.. py:method:: TimeSlot.minute(self: ecflow.TimeSlot) -> int :module: ecflow diff --git a/docs/python_api/Today.rst b/docs/python_api/Today.rst index 58553636a..eb6afe5d7 100644 --- a/docs/python_api/Today.rst +++ b/docs/python_api/Today.rst @@ -5,7 +5,7 @@ ecflow.Today .. py:class:: Today :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` :term:`today` is a time dependency that does not wrap to tomorrow. @@ -49,8 +49,8 @@ Usage: Today('10:30 20:10 00:10')) # Create today in place -.. py:method:: Today.time_series( (Today)arg1) -> TimeSeries : +.. py:method:: Today.time_series(self: ecflow.Today) -> ecflow.TimeSeries :module: ecflow -Return the Todays time series +Return the Today's time series diff --git a/docs/python_api/Trigger.rst b/docs/python_api/Trigger.rst index 959600137..f66c8ecc2 100644 --- a/docs/python_api/Trigger.rst +++ b/docs/python_api/Trigger.rst @@ -5,7 +5,7 @@ ecflow.Trigger .. py:class:: Trigger :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Add a :term:`trigger` or :term:`complete expression`. @@ -64,7 +64,7 @@ If however node taskx has not yet been added to its parent, we use a relative na t2 ==complete and taskx == complete -.. py:method:: Trigger.get_expression( (Trigger)arg1) -> str : +.. py:method:: Trigger.get_expression(self: ecflow.Trigger) -> str :module: ecflow returns the trigger expression as a string diff --git a/docs/python_api/UrlCmd.rst b/docs/python_api/UrlCmd.rst index a092a153c..151b74dff 100644 --- a/docs/python_api/UrlCmd.rst +++ b/docs/python_api/UrlCmd.rst @@ -5,7 +5,7 @@ ecflow.UrlCmd .. py:class:: UrlCmd :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Executes a command ECF_URL_CMD to display a url. @@ -48,7 +48,7 @@ Lets assume that the server has the following definition:: print(str(e)) -.. py:method:: UrlCmd.execute( (UrlCmd)arg1) -> None : +.. py:method:: UrlCmd.execute(self: ecflow.UrlCmd) -> None :module: ecflow Displays url in the chosen browser diff --git a/docs/python_api/Variable.rst b/docs/python_api/Variable.rst index 795add8cb..9e20dc708 100644 --- a/docs/python_api/Variable.rst +++ b/docs/python_api/Variable.rst @@ -5,7 +5,7 @@ ecflow.Variable .. py:class:: Variable :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Defines a :term:`variable` on a :term:`node` for use in :term:`ecf script`. @@ -57,19 +57,19 @@ The following use example of using Edit, which allow multiple variables to added Edit(d='d') ] -.. py:method:: Variable.empty( (Variable)arg1) -> bool : +.. py:method:: Variable.empty(self: ecflow.Variable) -> bool :module: ecflow Return true if the variable is empty. Used when returning a Null variable, from a find -.. py:method:: Variable.name( (Variable)arg1) -> str : +.. py:method:: Variable.name(self: ecflow.Variable) -> str :module: ecflow Return the variable name as string -.. py:method:: Variable.value( (Variable)arg1) -> str : +.. py:method:: Variable.value(self: ecflow.Variable) -> str :module: ecflow Return the variable value as a string diff --git a/docs/python_api/VariableList.rst b/docs/python_api/VariableList.rst index cc31f66e1..dcc37a6ec 100644 --- a/docs/python_api/VariableList.rst +++ b/docs/python_api/VariableList.rst @@ -5,15 +5,65 @@ ecflow.VariableList .. py:class:: VariableList :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Hold a list of Variables -.. py:method:: VariableList.append( (VariableList)arg1, (object)arg2) -> None +.. py:method:: VariableList.append(self: ecflow.VariableList, x: Variable) -> None :module: ecflow +Add an item to the end of the list -.. py:method:: VariableList.extend( (VariableList)arg1, (object)arg2) -> None + +.. py:method:: VariableList.clear(self: ecflow.VariableList) -> None + :module: ecflow + +Clear the contents + + +.. py:method:: VariableList.count(self: ecflow.VariableList, x: Variable) -> int + :module: ecflow + +Return the number of times ``x`` appears in the list + + +.. py:method:: VariableList.extend(*args, **kwargs) + :module: ecflow + +Overloaded function. + +1. extend(self: ecflow.VariableList, L: ecflow.VariableList) -> None + +Extend the list by appending all the items in the given list + +2. extend(self: ecflow.VariableList, L: collections.abc.Iterable) -> None + +Extend the list by appending all the items in the given list + + +.. py:method:: VariableList.insert(self: ecflow.VariableList, i: typing.SupportsInt | typing.SupportsIndex, x: Variable) -> None + :module: ecflow + +Insert an item at a given position. + + +.. py:method:: VariableList.pop(*args, **kwargs) :module: ecflow +Overloaded function. + +1. pop(self: ecflow.VariableList) -> Variable + +Remove and return the last item + +2. pop(self: ecflow.VariableList, i: typing.SupportsInt | typing.SupportsIndex) -> Variable + +Remove and return the item at index ``i`` + + +.. py:method:: VariableList.remove(self: ecflow.VariableList, x: Variable) -> None + :module: ecflow + +Remove the first item from the list whose value is x. It is an error if there is no such item. + diff --git a/docs/python_api/Verify.rst b/docs/python_api/Verify.rst index bd2348db1..4d7a73c19 100644 --- a/docs/python_api/Verify.rst +++ b/docs/python_api/Verify.rst @@ -5,5 +5,5 @@ ecflow.Verify .. py:class:: Verify :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` diff --git a/docs/python_api/WhyCmd.rst b/docs/python_api/WhyCmd.rst index 781cd0653..3a97ccaac 100644 --- a/docs/python_api/WhyCmd.rst +++ b/docs/python_api/WhyCmd.rst @@ -5,7 +5,7 @@ ecflow.WhyCmd .. py:class:: WhyCmd :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` The why command reports, the reason why a node is not running. @@ -35,7 +35,7 @@ Usage:: print(str(e)) -.. py:method:: WhyCmd.why( (WhyCmd)arg1) -> str : +.. py:method:: WhyCmd.why(self: ecflow.WhyCmd) -> str :module: ecflow returns a '/n' separated string, with reasons why node is not running diff --git a/docs/python_api/Zombie.rst b/docs/python_api/Zombie.rst index 2f2ea66a3..39309a2f5 100644 --- a/docs/python_api/Zombie.rst +++ b/docs/python_api/Zombie.rst @@ -5,99 +5,99 @@ ecflow.Zombie .. py:class:: Zombie :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Represent a zombie process stored by the server -.. py:method:: Zombie.adopt( (Zombie)arg1) -> bool +.. py:method:: Zombie.adopt(self: ecflow.Zombie) -> bool :module: ecflow -.. py:method:: Zombie.allowed_age( (Zombie)arg1) -> int +.. py:method:: Zombie.allowed_age(self: ecflow.Zombie) -> int :module: ecflow -.. py:method:: Zombie.attr( (Zombie)arg1) -> ZombieAttr +.. py:method:: Zombie.attr(self: ecflow.Zombie) -> ecflow.ZombieAttr :module: ecflow -.. py:method:: Zombie.block( (Zombie)arg1) -> bool +.. py:method:: Zombie.block(self: ecflow.Zombie) -> bool :module: ecflow -.. py:method:: Zombie.calls( (Zombie)arg1) -> int +.. py:method:: Zombie.calls(self: ecflow.Zombie) -> int :module: ecflow -.. py:method:: Zombie.duration( (Zombie)arg1) -> int +.. py:method:: Zombie.duration(self: ecflow.Zombie) -> int :module: ecflow -.. py:method:: Zombie.empty( (Zombie)arg1) -> bool +.. py:method:: Zombie.empty(self: ecflow.Zombie) -> bool :module: ecflow -.. py:method:: Zombie.fail( (Zombie)arg1) -> bool +.. py:method:: Zombie.fail(self: ecflow.Zombie) -> bool :module: ecflow -.. py:method:: Zombie.fob( (Zombie)arg1) -> bool +.. py:method:: Zombie.fob(self: ecflow.Zombie) -> bool :module: ecflow -.. py:method:: Zombie.host( (Zombie)arg1) -> str +.. py:method:: Zombie.host(self: ecflow.Zombie) -> str :module: ecflow -.. py:method:: Zombie.jobs_password( (Zombie)arg1) -> str +.. py:method:: Zombie.jobs_password(self: ecflow.Zombie) -> str :module: ecflow -.. py:method:: Zombie.kill( (Zombie)arg1) -> bool +.. py:method:: Zombie.kill(self: ecflow.Zombie) -> bool :module: ecflow -.. py:method:: Zombie.last_child_cmd( (Zombie)arg1) -> ChildCmdType +.. py:method:: Zombie.last_child_cmd(self: ecflow.Zombie) -> ecflow.ChildCmdType :module: ecflow -.. py:method:: Zombie.manual_user_action( (Zombie)arg1) -> bool +.. py:method:: Zombie.manual_user_action(self: ecflow.Zombie) -> bool :module: ecflow -.. py:method:: Zombie.path_to_task( (Zombie)arg1) -> str +.. py:method:: Zombie.path_to_task(self: ecflow.Zombie) -> str :module: ecflow -.. py:method:: Zombie.process_or_remote_id( (Zombie)arg1) -> str +.. py:method:: Zombie.process_or_remote_id(self: ecflow.Zombie) -> str :module: ecflow -.. py:method:: Zombie.remove( (Zombie)arg1) -> bool +.. py:method:: Zombie.remove(self: ecflow.Zombie) -> bool :module: ecflow -.. py:method:: Zombie.try_no( (Zombie)arg1) -> int +.. py:method:: Zombie.try_no(self: ecflow.Zombie) -> int :module: ecflow -.. py:method:: Zombie.type( (Zombie)arg1) -> ZombieType +.. py:method:: Zombie.type(self: ecflow.Zombie) -> ecflow.ZombieType :module: ecflow -.. py:method:: Zombie.type_str( (Zombie)arg1) -> str +.. py:method:: Zombie.type_str(self: ecflow.Zombie) -> str :module: ecflow -.. py:method:: Zombie.user_action( (Zombie)arg1) -> ZombieUserActionType +.. py:method:: Zombie.user_action(self: ecflow.Zombie) -> ecflow.ZombieUserActionType :module: ecflow -.. py:method:: Zombie.user_action_str( (Zombie)arg1) -> str +.. py:method:: Zombie.user_action_str(self: ecflow.Zombie) -> str :module: ecflow -.. py:method:: Zombie.user_cmd( (Zombie)arg1) -> str +.. py:method:: Zombie.user_cmd(self: ecflow.Zombie) -> str :module: ecflow diff --git a/docs/python_api/ZombieAttr.rst b/docs/python_api/ZombieAttr.rst index 69f7c6d1e..cc25f2550 100644 --- a/docs/python_api/ZombieAttr.rst +++ b/docs/python_api/ZombieAttr.rst @@ -5,7 +5,7 @@ ecflow.ZombieAttr .. py:class:: ZombieAttr :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` The :term:`zombie` attribute defines how a :term:`zombie` should be handled in an automated fashion @@ -48,25 +48,25 @@ Usage: The list of child commands. If empty action applies to all child cmds -.. py:method:: ZombieAttr.empty( (ZombieAttr)arg1) -> bool : +.. py:method:: ZombieAttr.empty(self: ecflow.ZombieAttr) -> bool :module: ecflow Return true if the attribute is empty -.. py:method:: ZombieAttr.user_action( (ZombieAttr)arg1) -> ZombieUserActionType : +.. py:method:: ZombieAttr.user_action(self: ecflow.ZombieAttr) -> ecflow.ZombieUserActionType :module: ecflow The automated action to invoke, when zombies arise -.. py:method:: ZombieAttr.zombie_lifetime( (ZombieAttr)arg1) -> int : +.. py:method:: ZombieAttr.zombie_lifetime(self: ecflow.ZombieAttr) -> int :module: ecflow Returns the lifetime in seconds of :term:`zombie` in the server -.. py:method:: ZombieAttr.zombie_type( (ZombieAttr)arg1) -> ZombieType : +.. py:method:: ZombieAttr.zombie_type(self: ecflow.ZombieAttr) -> ecflow.ZombieType :module: ecflow Returns the :term:`zombie type` diff --git a/docs/python_api/ZombieType.rst b/docs/python_api/ZombieType.rst index 8e2158727..bf04d4b12 100644 --- a/docs/python_api/ZombieType.rst +++ b/docs/python_api/ZombieType.rst @@ -5,13 +5,28 @@ ecflow.ZombieType .. py:class:: ZombieType :module: ecflow - Bases: :py:class:`~Boost.Python.enum` + Bases: :py:class:`~pybind11_builtins.pybind11_object` :term:`zombie`\ s are running jobs that fail authentication when communicating with the :term:`ecflow_server`. See class :term:`zombie type` and :py:class:`ecflow.ZombieAttr` for further information. +Members: + + ecf + + ecf_pid + + ecf_pid_passwd + + ecf_passwd + + user + + path + + .. py:attribute:: ZombieType.ecf :module: ecflow :value: ecflow.ZombieType.ecf @@ -32,6 +47,10 @@ See class :term:`zombie type` and :py:class:`ecflow.ZombieAttr` for further info :value: ecflow.ZombieType.ecf_pid_passwd +.. py:property:: ZombieType.name + :module: ecflow + + .. py:attribute:: ZombieType.names :module: ecflow :value: {'ecf': ecflow.ZombieType.ecf, 'ecf_passwd': ecflow.ZombieType.ecf_passwd, 'ecf_pid': ecflow.ZombieType.ecf_pid, 'ecf_pid_passwd': ecflow.ZombieType.ecf_pid_passwd, 'path': ecflow.ZombieType.path, 'user': ecflow.ZombieType.user} @@ -47,6 +66,10 @@ See class :term:`zombie type` and :py:class:`ecflow.ZombieAttr` for further info :value: ecflow.ZombieType.user +.. py:property:: ZombieType.value + :module: ecflow + + .. py:attribute:: ZombieType.values :module: ecflow :value: {0: ecflow.ZombieType.user, 1: ecflow.ZombieType.ecf, 2: ecflow.ZombieType.ecf_pid, 3: ecflow.ZombieType.ecf_passwd, 4: ecflow.ZombieType.ecf_pid_passwd, 5: ecflow.ZombieType.path} diff --git a/docs/python_api/ZombieUserActionType.rst b/docs/python_api/ZombieUserActionType.rst index 5d2d7cec6..cff435e34 100644 --- a/docs/python_api/ZombieUserActionType.rst +++ b/docs/python_api/ZombieUserActionType.rst @@ -5,7 +5,7 @@ ecflow.ZombieUserActionType .. py:class:: ZombieUserActionType :module: ecflow - Bases: :py:class:`~Boost.Python.enum` + Bases: :py:class:`~pybind11_builtins.pybind11_object` ZombieUserActionType is used define an automated response. See class :py:class:`ZombieAttr` @@ -31,6 +31,21 @@ server side: Note: Only adopt will allow the :term:`child command` to continue and change the :term:`node` tree +Members: + + fob + + fail + + remove + + adopt + + block + + kill + + .. py:attribute:: ZombieUserActionType.adopt :module: ecflow :value: ecflow.ZombieUserActionType.adopt @@ -56,6 +71,10 @@ Note: Only adopt will allow the :term:`child command` to continue and change the :value: ecflow.ZombieUserActionType.kill +.. py:property:: ZombieUserActionType.name + :module: ecflow + + .. py:attribute:: ZombieUserActionType.names :module: ecflow :value: {'adopt': ecflow.ZombieUserActionType.adopt, 'block': ecflow.ZombieUserActionType.block, 'fail': ecflow.ZombieUserActionType.fail, 'fob': ecflow.ZombieUserActionType.fob, 'kill': ecflow.ZombieUserActionType.kill, 'remove': ecflow.ZombieUserActionType.remove} @@ -66,6 +85,10 @@ Note: Only adopt will allow the :term:`child command` to continue and change the :value: ecflow.ZombieUserActionType.remove +.. py:property:: ZombieUserActionType.value + :module: ecflow + + .. py:attribute:: ZombieUserActionType.values :module: ecflow :value: {0: ecflow.ZombieUserActionType.fob, 1: ecflow.ZombieUserActionType.fail, 2: ecflow.ZombieUserActionType.adopt, 3: ecflow.ZombieUserActionType.remove, 4: ecflow.ZombieUserActionType.block, 5: ecflow.ZombieUserActionType.kill} diff --git a/docs/python_api/ZombieVec.rst b/docs/python_api/ZombieVec.rst index 36ab6b92a..f1c352e95 100644 --- a/docs/python_api/ZombieVec.rst +++ b/docs/python_api/ZombieVec.rst @@ -5,15 +5,69 @@ ecflow.ZombieVec .. py:class:: ZombieVec :module: ecflow - Bases: :py:class:`~Boost.Python.instance` + Bases: :py:class:`~pybind11_builtins.pybind11_object` Hold a list of zombies -.. py:method:: ZombieVec.append( (ZombieVec)arg1, (object)arg2) -> None +.. py:method:: ZombieVec.append(self: ecflow.ZombieVec, x: Zombie) -> None :module: ecflow +Add an item to the end of the list -.. py:method:: ZombieVec.extend( (ZombieVec)arg1, (object)arg2) -> None + +.. py:method:: ZombieVec.clear(self: ecflow.ZombieVec) -> None + :module: ecflow + +Clear the contents + + +.. py:method:: ZombieVec.count(self: ecflow.ZombieVec, x: Zombie) -> int + :module: ecflow + +Return the number of times ``x`` appears in the list + + +.. py:method:: ZombieVec.extend(*args, **kwargs) + :module: ecflow + +Overloaded function. + +1. extend(self: ecflow.ZombieVec, L: ecflow.ZombieVec) -> None + +Extend the list by appending all the items in the given list + +2. extend(self: ecflow.ZombieVec, L: collections.abc.Iterable) -> None + +Extend the list by appending all the items in the given list + + +.. py:method:: ZombieVec.insert(self: ecflow.ZombieVec, i: typing.SupportsInt | typing.SupportsIndex, x: Zombie) -> None + :module: ecflow + +Insert an item at a given position. + + +.. py:method:: ZombieVec.pop(*args, **kwargs) + :module: ecflow + +Overloaded function. + +1. pop(self: ecflow.ZombieVec) -> Zombie + +Remove and return the last item + +2. pop(self: ecflow.ZombieVec, i: typing.SupportsInt | typing.SupportsIndex) -> Zombie + +Remove and return the item at index ``i`` + + +.. py:method:: ZombieVec.remove(self: ecflow.ZombieVec, x: Zombie) -> None + :module: ecflow + +Remove the first item from the list whose value is x. It is an error if there is no such item. + + +.. py:function:: debug_build() -> bool :module: ecflow From d0764d16721d6dc3ac3281fbe19f31bf459d91b9 Mon Sep 17 00:00:00 2001 From: Marcos Bento Date: Wed, 20 May 2026 11:24:56 +0100 Subject: [PATCH 02/15] Add release notes for 5.17.0 --- docs/release_notes/index.rst | 1 + docs/release_notes/version_5.16.rst | 2 +- docs/release_notes/version_5.17.rst | 43 +++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 docs/release_notes/version_5.17.rst diff --git a/docs/release_notes/index.rst b/docs/release_notes/index.rst index 6507f3534..6572d7bd9 100644 --- a/docs/release_notes/index.rst +++ b/docs/release_notes/index.rst @@ -5,6 +5,7 @@ Release notes .. toctree:: :maxdepth: 1 + version_5.17 version_5.16 version_5.15 version_5.14 diff --git a/docs/release_notes/version_5.16.rst b/docs/release_notes/version_5.16.rst index 37c924b8c..f344bbeab 100644 --- a/docs/release_notes/version_5.16.rst +++ b/docs/release_notes/version_5.16.rst @@ -12,7 +12,7 @@ Version 5.16 updates Version 5.16.0 ============== -* `Released `__\ on 2026-02-06 +* `Released `__\ on 2026-03-25 General ------- diff --git a/docs/release_notes/version_5.17.rst b/docs/release_notes/version_5.17.rst new file mode 100644 index 000000000..3303181f8 --- /dev/null +++ b/docs/release_notes/version_5.17.rst @@ -0,0 +1,43 @@ +.. _version_5.17: + +Version 5.17 updates +******************** + +.. role:: jiraissue + :class: hidden + +.. role:: githubissue + :class: hidden + +Version 5.17.0 +============== + +* `Released `__\ on 2026-05-20 + +General +------- + +- **Feature** enable support for RepeatDateTimeList :jiraissue:`ECFLOW-2080` +- **Feature** enable support for Debian 13 (+ .deb package) :jiraissue:`ECFLOW-2082` + +- **Improvement** review LICENSE + NOTICE content :jiraissue:`ECFLOW-2088` +- **Improvement** enable support for compilers GNU GCC 15.2/Intel 2025.3.1 :jiraissue:`ECFLOW-2078/ECFLOW-2079` +- **Improvement** refactor string/node path algorithms (i.e. remove boost::algorithm dependencies) :jiraissue:`ECFLOW-2076,ECFLOW-1922` +- **Improvement** review server log content to ensure no information disclosure :jiraissue:`ECFLOW-2004` +- **Improvement** review SSL server implementation to ensure no use of weak encryption algorithms :jiraissue:`ECFLOW-2003` + +- **Fix** correct parsing of Variables with whitespace/special characters in their value :jiraissue:`ECFLOW-2089` +- **Fix** correct handling of Trigger subtraction expression :code:`:NONEXISTENT - 1` :jiraissue:`ECFLOW-2083` +- **Fix** correct optimisation for parsing of Simple Trigger Expressions :jiraissue:`ECFLOW-2075` +- **Fix** correct handling of :code:`--help` option when ECF_SSL is set :jiraissue:`ECFLOW-2081` +- **Fix** avoid clobbering of :code:`setup.py` and :code:`__init__.py` during multi-preset CMake configuration :jiraissue:`ECFLOW-2077` + +Python API +---------- + +- **Improvement** replace Boost.Python with Pybind11 for Python bindings :jiraissue:`ECFLOW-2090` + +ecFlowUI +-------- + +- **Fix** correct intermittent :code:`ecflow_ui` crash :jiraissue:`ECFLOW-2090` From cce755a91ff03f466889ce74b4da926e4b9ede08 Mon Sep 17 00:00:00 2001 From: Marcos Bento Date: Wed, 20 May 2026 11:29:56 +0100 Subject: [PATCH 03/15] Update version to 5.17.0 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ea59fda6a..3f40893f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,7 +31,7 @@ find_package( ecbuild 3.4 REQUIRED HINTS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CUR # Project # ========================================================================================= -project( ecflow LANGUAGES CXX VERSION 5.16.0 ) +project( ecflow LANGUAGES CXX VERSION 5.17.0 ) # # Important: # The CMake project version is used, as generated CMake variables, to filter .../ecflow/core/ecflow_version.h.in From bbe622ba6b563b45ba5c6efec36d96ab415d3939 Mon Sep 17 00:00:00 2001 From: Iain Russell <40060766+iainrussell@users.noreply.github.com> Date: Thu, 21 May 2026 10:36:32 +0100 Subject: [PATCH 04/15] Update CD config for pybind11 and python-3.13 --- .github/cd-config.yml | 46 ++++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/.github/cd-config.yml b/.github/cd-config.yml index 8d4adf4ea..dffefec8c 100644 --- a/.github/cd-config.yml +++ b/.github/cd-config.yml @@ -72,7 +72,6 @@ builds: dependencies: - ecmwf/ecbuild cmake_options: - -DPython3_EXECUTABLE: /usr/bin/python3 -DBOOST_ROOT: ${BOOST_ROOT_DIR} -DBOOST_INCLUDEDIR: ${BOOST_INCLUDE_DIR} -DBOOST_LIBRARYDIR: ${BOOST_LIB_DIR} @@ -102,7 +101,6 @@ builds: dependencies: - ecmwf/ecbuild cmake_options: - -DPython3_EXECUTABLE: /usr/bin/python3 -DBOOST_ROOT: ${BOOST_ROOT_DIR} -DBOOST_INCLUDEDIR: ${BOOST_INCLUDE_DIR} -DBOOST_LIBRARYDIR: ${BOOST_LIB_DIR} @@ -175,6 +173,25 @@ builds: self_test: true stages: + - name: python313 + modules: + - boost/1.87.0 + - python3/3.13.13-01 + - qt/6.6.1 + - cmake/new + - ecbuild/new + test_command: &test_cmd "ctest --output-on-failure -j 8 -L nightly" + cmake_options: &common_cmake_options + -DCMAKE_VERBOSE_MAKEFILE: ON + -DENABLE_ALL_TESTS: ON + -DENABLE_STATIC_BOOST_LIBS: ON + -DENABLE_WARNINGS: ON + -DCMAKE_BUILD_TYPE: Release + -DCMAKE_CXX_FLAGS: -Wno-deprecated-declarations + -DCMAKE_PYTHON_INSTALL_TYPE: local + -DINSTALL_LIB_DIR: lib + -DUI_SYSTEM_SERVERS_LIST: /ec/vol/ecflow_def/servers.list.all + - name: python312 modules: - boost/1.87.0 @@ -193,10 +210,12 @@ builds: -DCMAKE_PYTHON_INSTALL_TYPE: local -DINSTALL_LIB_DIR: lib -DUI_SYSTEM_SERVERS_LIST: /ec/vol/ecflow_def/servers.list.all + install_command: | + cmake --install . --component python - name: python311 modules: - - boost/1.84.0 + - boost/1.87.0 - python3/3.11.8-01 - qt/5.12.0 - cmake/new @@ -206,19 +225,14 @@ builds: <<: *common_cmake_options -DBoost_ROOT: /usr/local/apps/boost/1.84.0/GNU/8.5 -DBoost_INCLUDE_DIR: /usr/local/apps/boost/1.84.0/GNU/8.5/include - -DBoost_PYTHON311_LIBRARY_RELEASE: /usr/local/apps/boost/1.84.0/GNU/8.5/lib/libboost_python311.so -DPython3_ROOT_DIR: /usr/local/apps/python3/3.11.8-01 - -DPython3_EXECUTABLE: /usr/local/apps/python3/3.11.8-01/bin/python3 - -DPython3_INCLUDE_DIRS: /usr/local/apps/python3/3.11.8-01/include/python3.11 - -DPython3_LIBRARIES: /usr/local/apps/python3/3.11.8-01/lib64/libpython3.11.so - -DPython3_LIBRARY_DIRS: /usr/local/apps/python3/3.11.8-01/lib64 -DENABLE_UI: OFF install_command: | cmake --install . --component python - name: python310 modules: - - boost/1.81.0 + - boost/1.87.0 - python3/3.10.10-01 - qt/6.2.0 - cmake/new @@ -229,18 +243,12 @@ builds: ENABLE_UI: OFF -DBoost_ROOT: /usr/local/apps/boost/1.81.0/GNU/8.5 -DBoost_INCLUDE_DIR: /usr/local/apps/boost/1.81.0/GNU/12.2/include - -DBoost_PYTHON310_LIBRARY_RELEASE: /usr/local/apps/boost/1.81.0/GNU/8.5/lib/libboost_python310.so - -DPython3_ROOT_DIR: /usr/local/apps/python3/3.10.10-01 - -DPython3_EXECUTABLE: /usr/local/apps/python3/3.10.10-01/bin/python3 - -DPython3_INCLUDE_DIRS: /usr/local/apps/python3/3.10.10-01/include/python3.10 - -DPython3_LIBRARIES: /usr/local/apps/python3/3.10.10-01/lib64/libpython3.10.so - -DPython3_LIBRARY_DIRS: /usr/local/apps/python3/3.10.10-01/lib64 install_command: | cmake --install . --component python - name: python38 modules: - - boost/1.75.0 + - boost/1.87.0 - python3/3.8.8-01 - qt/5.12.0 - cmake/new @@ -251,12 +259,6 @@ builds: -DENABLE_UI: OFF -DBoost_ROOT: /usr/local/apps/boost/1.75.0/GNU/8.5 -DBoost_INCLUDE_DIR: /usr/local/apps/boost/1.75.0/GNU/8.5/include - -DBoost_PYTHON38_LIBRARY_RELEASE: /usr/local/apps/boost/1.75.0/GNU/8.5/lib/libboost_python38.so - -DPython3_ROOT_DIR: /usr/local/apps/python3/3.8.8-01 - -DPython3_EXECUTABLE: /usr/local/apps/python3/3.8.8-01/bin/python3 - -DPython3_INCLUDE_DIRS: /usr/local/apps/python3/3.8.8-01/include/python3.8 - -DPython3_LIBRARIES: /usr/local/apps/python3/3.8.8-01/lib64/libpython3.8.so - -DPython3_LIBRARY_DIRS: /usr/local/apps/python3/3.8.8-01/lib64 install_command: | cmake --install . --component python From 044accbea26ac0b4b4ab1be411f8cad48c732791 Mon Sep 17 00:00:00 2001 From: Iain Russell <40060766+iainrussell@users.noreply.github.com> Date: Thu, 21 May 2026 10:43:33 +0100 Subject: [PATCH 05/15] Fix condition for build-and-release job --- .github/workflows/cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 744615ce9..ae83cf0d6 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -23,7 +23,7 @@ jobs: if: | startsWith(github.ref, 'refs/tags/') || github.ref_name == github.event.repository.default_branch || - (github.event.pull_request.base.ref == github.event.repository.default_branch && github.event.label.name == 'approved-for-cd') + github.event.label.name == 'approved-for-cd' uses: ecmwf/reusable-workflows/.github/workflows/main-cd.yml@v2 with: ref_name: ${{ github.ref_name }} From f9efea332e2776a4f714fb7c9f7af1cb2f24bca1 Mon Sep 17 00:00:00 2001 From: Iain Russell <40060766+iainrussell@users.noreply.github.com> Date: Thu, 21 May 2026 10:46:26 +0100 Subject: [PATCH 06/15] CD: fix anchor --- .github/cd-config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/cd-config.yml b/.github/cd-config.yml index dffefec8c..6c5adc061 100644 --- a/.github/cd-config.yml +++ b/.github/cd-config.yml @@ -199,7 +199,7 @@ builds: - qt/6.6.1 - cmake/new - ecbuild/new - test_command: &test_cmd "ctest --output-on-failure -j 8 -L nightly" + test_command: *test_cmd cmake_options: &common_cmake_options -DCMAKE_VERBOSE_MAKEFILE: ON -DENABLE_ALL_TESTS: ON From 13b1cb7fefc344a61db2a0131c536e47866d3c3b Mon Sep 17 00:00:00 2001 From: Iain Russell <40060766+iainrussell@users.noreply.github.com> Date: Thu, 21 May 2026 10:50:26 +0100 Subject: [PATCH 07/15] Update CD config --- .github/cd-config.yml | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/.github/cd-config.yml b/.github/cd-config.yml index 6c5adc061..5638f2867 100644 --- a/.github/cd-config.yml +++ b/.github/cd-config.yml @@ -200,16 +200,8 @@ builds: - cmake/new - ecbuild/new test_command: *test_cmd - cmake_options: &common_cmake_options - -DCMAKE_VERBOSE_MAKEFILE: ON - -DENABLE_ALL_TESTS: ON - -DENABLE_STATIC_BOOST_LIBS: ON - -DENABLE_WARNINGS: ON - -DCMAKE_BUILD_TYPE: Release - -DCMAKE_CXX_FLAGS: -Wno-deprecated-declarations - -DCMAKE_PYTHON_INSTALL_TYPE: local - -DINSTALL_LIB_DIR: lib - -DUI_SYSTEM_SERVERS_LIST: /ec/vol/ecflow_def/servers.list.all + cmake_options: + <<: *common_cmake_options install_command: | cmake --install . --component python @@ -223,9 +215,8 @@ builds: test_command: *test_cmd cmake_options: <<: *common_cmake_options - -DBoost_ROOT: /usr/local/apps/boost/1.84.0/GNU/8.5 - -DBoost_INCLUDE_DIR: /usr/local/apps/boost/1.84.0/GNU/8.5/include - -DPython3_ROOT_DIR: /usr/local/apps/python3/3.11.8-01 + -DBoost_ROOT: /usr/local/apps/boost/1.87.0/GNU/8.5 + -DBoost_INCLUDE_DIR: /usr/local/apps/boost/1.87.0/GNU/8.5/include -DENABLE_UI: OFF install_command: | cmake --install . --component python @@ -241,8 +232,8 @@ builds: cmake_options: <<: *common_cmake_options ENABLE_UI: OFF - -DBoost_ROOT: /usr/local/apps/boost/1.81.0/GNU/8.5 - -DBoost_INCLUDE_DIR: /usr/local/apps/boost/1.81.0/GNU/12.2/include + -DBoost_ROOT: /usr/local/apps/boost/1.87.0/GNU/8.5 + -DBoost_INCLUDE_DIR: /usr/local/apps/boost/1.87.0/GNU/12.2/include install_command: | cmake --install . --component python @@ -257,8 +248,8 @@ builds: cmake_options: <<: *common_cmake_options -DENABLE_UI: OFF - -DBoost_ROOT: /usr/local/apps/boost/1.75.0/GNU/8.5 - -DBoost_INCLUDE_DIR: /usr/local/apps/boost/1.75.0/GNU/8.5/include + -DBoost_ROOT: /usr/local/apps/boost/1.87.0/GNU/8.5 + -DBoost_INCLUDE_DIR: /usr/local/apps/boost/1.87.0/GNU/8.5/include install_command: | cmake --install . --component python From 73c45c2aa7afdb2ff0c976f98576d72a720f7b57 Mon Sep 17 00:00:00 2001 From: Iain Russell <40060766+iainrussell@users.noreply.github.com> Date: Thu, 21 May 2026 11:12:25 +0100 Subject: [PATCH 08/15] Update CD config --- .github/cd-config.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/cd-config.yml b/.github/cd-config.yml index 5638f2867..ca6da41d7 100644 --- a/.github/cd-config.yml +++ b/.github/cd-config.yml @@ -191,6 +191,7 @@ builds: -DCMAKE_PYTHON_INSTALL_TYPE: local -DINSTALL_LIB_DIR: lib -DUI_SYSTEM_SERVERS_LIST: /ec/vol/ecflow_def/servers.list.all + -DCMAKE_PREFIX_PATH: /usr/local/apps/python3/3.13.13-01/lib/python3.13/site-packages/pybind11/share/cmake/pybind11 - name: python312 modules: @@ -202,6 +203,7 @@ builds: test_command: *test_cmd cmake_options: <<: *common_cmake_options + -DCMAKE_PREFIX_PATH: /usr/local/apps/python3/3.12.9-01/lib/python3.12/site-packages/pybind11/share/cmake/pybind11 install_command: | cmake --install . --component python @@ -217,6 +219,7 @@ builds: <<: *common_cmake_options -DBoost_ROOT: /usr/local/apps/boost/1.87.0/GNU/8.5 -DBoost_INCLUDE_DIR: /usr/local/apps/boost/1.87.0/GNU/8.5/include + -DCMAKE_PREFIX_PATH: /usr/local/apps/python3/3.11.8-01/lib/python3.11/site-packages/pybind11/share/cmake/pybind11 -DENABLE_UI: OFF install_command: | cmake --install . --component python @@ -234,6 +237,7 @@ builds: ENABLE_UI: OFF -DBoost_ROOT: /usr/local/apps/boost/1.87.0/GNU/8.5 -DBoost_INCLUDE_DIR: /usr/local/apps/boost/1.87.0/GNU/12.2/include + -DCMAKE_PREFIX_PATH: /usr/local/apps/python3/3.10.10-01/lib/python3.10/site-packages/pybind11/share/cmake/pybind11 install_command: | cmake --install . --component python @@ -250,6 +254,7 @@ builds: -DENABLE_UI: OFF -DBoost_ROOT: /usr/local/apps/boost/1.87.0/GNU/8.5 -DBoost_INCLUDE_DIR: /usr/local/apps/boost/1.87.0/GNU/8.5/include + -DCMAKE_PREFIX_PATH: /usr/local/apps/python3/3.10.10-01/lib/python3.10/site-packages/pybind11/share/cmake/pybind11 install_command: | cmake --install . --component python From eb124dda5aa831ff38fba83270f9dcd0b80db5ed Mon Sep 17 00:00:00 2001 From: Iain Russell <40060766+iainrussell@users.noreply.github.com> Date: Thu, 21 May 2026 13:16:29 +0100 Subject: [PATCH 09/15] Add Python 3.11, 3.10, and 3.8 configurations for CD --- .github/cd-config.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/cd-config.yml b/.github/cd-config.yml index ca6da41d7..59d1ad7ee 100644 --- a/.github/cd-config.yml +++ b/.github/cd-config.yml @@ -220,6 +220,11 @@ builds: -DBoost_ROOT: /usr/local/apps/boost/1.87.0/GNU/8.5 -DBoost_INCLUDE_DIR: /usr/local/apps/boost/1.87.0/GNU/8.5/include -DCMAKE_PREFIX_PATH: /usr/local/apps/python3/3.11.8-01/lib/python3.11/site-packages/pybind11/share/cmake/pybind11 + -DPython3_ROOT_DIR: /usr/local/apps/python3/3.11.8-01 + -DPython3_EXECUTABLE: /usr/local/apps/python3/3.11.8-01/bin/python3 + -DPython3_INCLUDE_DIRS: /usr/local/apps/python3/3.11.8-01/include/python3.11 + -DPython3_LIBRARIES: /usr/local/apps/python3/3.11.8-01/lib64/libpython3.11.so + -DPython3_LIBRARY_DIRS: /usr/local/apps/python3/3.11.8-01/lib64 -DENABLE_UI: OFF install_command: | cmake --install . --component python @@ -238,6 +243,11 @@ builds: -DBoost_ROOT: /usr/local/apps/boost/1.87.0/GNU/8.5 -DBoost_INCLUDE_DIR: /usr/local/apps/boost/1.87.0/GNU/12.2/include -DCMAKE_PREFIX_PATH: /usr/local/apps/python3/3.10.10-01/lib/python3.10/site-packages/pybind11/share/cmake/pybind11 + -DPython3_ROOT_DIR: /usr/local/apps/python3/3.10.10-01 + -DPython3_EXECUTABLE: /usr/local/apps/python3/3.10.10-01/bin/python3 + -DPython3_INCLUDE_DIRS: /usr/local/apps/python3/3.10.10-01/include/python3.10 + -DPython3_LIBRARIES: /usr/local/apps/python3/3.10.10-01/lib64/libpython3.10.so + -DPython3_LIBRARY_DIRS: /usr/local/apps/python3/3.10.10-01/lib64 install_command: | cmake --install . --component python @@ -255,6 +265,11 @@ builds: -DBoost_ROOT: /usr/local/apps/boost/1.87.0/GNU/8.5 -DBoost_INCLUDE_DIR: /usr/local/apps/boost/1.87.0/GNU/8.5/include -DCMAKE_PREFIX_PATH: /usr/local/apps/python3/3.10.10-01/lib/python3.10/site-packages/pybind11/share/cmake/pybind11 + -DPython3_ROOT_DIR: /usr/local/apps/python3/3.8.8-01 + -DPython3_EXECUTABLE: /usr/local/apps/python3/3.8.8-01/bin/python3 + -DPython3_INCLUDE_DIRS: /usr/local/apps/python3/3.8.8-01/include/python3.8 + -DPython3_LIBRARIES: /usr/local/apps/python3/3.8.8-01/lib64/libpython3.8.so + -DPython3_LIBRARY_DIRS: /usr/local/apps/python3/3.8.8-01/lib64 install_command: | cmake --install . --component python From cd6fcd0fe51f072e7cfa70f50aa044c4819925cd Mon Sep 17 00:00:00 2001 From: Iain Russell <40060766+iainrussell@users.noreply.github.com> Date: Thu, 21 May 2026 14:32:41 +0100 Subject: [PATCH 10/15] CD: remove a few tests when deploying on ag --- .github/cd-config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/cd-config.yml b/.github/cd-config.yml index 59d1ad7ee..8128ad1ae 100644 --- a/.github/cd-config.yml +++ b/.github/cd-config.yml @@ -297,7 +297,7 @@ builds: - python3/3.12.9-01 - cmake/new - ecbuild - test_command: *test_cmd + test_command: ctest --output-on-failure -j 8 -L nightly -E 's_foolproof|s_test|s_zombies' install_command: | cmake --install . cmake_options: From 8715ceb182f169d7e7b80224fb3c783daa3e7d4e Mon Sep 17 00:00:00 2001 From: Iain Russell <40060766+iainrussell@users.noreply.github.com> Date: Thu, 21 May 2026 14:34:32 +0100 Subject: [PATCH 11/15] Ignore .github/cd-config.yml in CI workflow Add path ignore for .github/cd-config.yml in CI workflow --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a4d714243..61ecd2282 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,6 +10,7 @@ on: - '**' paths-ignore: - ".cd/**" + - ".github/cd-config.yml" # Trigger the workflow on pull request pull_request: ~ From d437ac78a6d476f957e7fd9e2f4fd41e2d5bcf5e Mon Sep 17 00:00:00 2001 From: Iain Russell <40060766+iainrussell@users.noreply.github.com> Date: Thu, 21 May 2026 14:35:07 +0100 Subject: [PATCH 12/15] Add paths-ignore for CD configurations in docs workflow Ignore specific paths in the workflow for docs. --- .github/workflows/docs.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 0fa19765d..405dfeafe 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -10,6 +10,9 @@ on: - 'main' tags: - '**' + paths-ignore: + - ".cd/**" + - ".github/cd-config.yml" jobs: # Setup environment and build ecflow documentation From a6bd6c45484e003356aae1b014d6265af27da7ce Mon Sep 17 00:00:00 2001 From: Iain Russell <40060766+iainrussell@users.noreply.github.com> Date: Thu, 21 May 2026 15:08:01 +0100 Subject: [PATCH 13/15] Fix test_command quotes in cd-config.yml --- .github/cd-config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/cd-config.yml b/.github/cd-config.yml index 8128ad1ae..5b52c4ff4 100644 --- a/.github/cd-config.yml +++ b/.github/cd-config.yml @@ -297,7 +297,7 @@ builds: - python3/3.12.9-01 - cmake/new - ecbuild - test_command: ctest --output-on-failure -j 8 -L nightly -E 's_foolproof|s_test|s_zombies' + test_command: "ctest --output-on-failure -j 8 -L nightly -E 's_foolproof|s_test|s_zombies'" install_command: | cmake --install . cmake_options: From f74fe9103f263509098b6c3ad262631a5fac640a Mon Sep 17 00:00:00 2001 From: Iain Russell <40060766+iainrussell@users.noreply.github.com> Date: Thu, 21 May 2026 15:13:16 +0100 Subject: [PATCH 14/15] Refactor test_command in cd-config.yml Update test_command to use a block style for better readability. --- .github/cd-config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/cd-config.yml b/.github/cd-config.yml index 5b52c4ff4..813de27f1 100644 --- a/.github/cd-config.yml +++ b/.github/cd-config.yml @@ -297,7 +297,8 @@ builds: - python3/3.12.9-01 - cmake/new - ecbuild - test_command: "ctest --output-on-failure -j 8 -L nightly -E 's_foolproof|s_test|s_zombies'" + test_command: >- + ctest --output-on-failure -j 8 -L nightly -E "s_foolproof|s_test|s_zombies" install_command: | cmake --install . cmake_options: From 66a673bfc77c8a47dbb5acde59f046274d0ae512 Mon Sep 17 00:00:00 2001 From: Iain Russell <40060766+iainrussell@users.noreply.github.com> Date: Fri, 22 May 2026 14:52:14 +0100 Subject: [PATCH 15/15] CD: clean up config --- .github/cd-config.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/cd-config.yml b/.github/cd-config.yml index 813de27f1..75757bebb 100644 --- a/.github/cd-config.yml +++ b/.github/cd-config.yml @@ -197,13 +197,13 @@ builds: modules: - boost/1.87.0 - python3/3.12.9-01 - - qt/6.6.1 - cmake/new - ecbuild/new test_command: *test_cmd cmake_options: <<: *common_cmake_options -DCMAKE_PREFIX_PATH: /usr/local/apps/python3/3.12.9-01/lib/python3.12/site-packages/pybind11/share/cmake/pybind11 + -DENABLE_UI: OFF install_command: | cmake --install . --component python @@ -211,7 +211,6 @@ builds: modules: - boost/1.87.0 - python3/3.11.8-01 - - qt/5.12.0 - cmake/new - ecbuild/new test_command: *test_cmd @@ -233,7 +232,6 @@ builds: modules: - boost/1.87.0 - python3/3.10.10-01 - - qt/6.2.0 - cmake/new - ecbuild/new test_command: *test_cmd @@ -255,7 +253,6 @@ builds: modules: - boost/1.87.0 - python3/3.8.8-01 - - qt/5.12.0 - cmake/new - ecbuild/new test_command: *test_cmd @@ -264,7 +261,7 @@ builds: -DENABLE_UI: OFF -DBoost_ROOT: /usr/local/apps/boost/1.87.0/GNU/8.5 -DBoost_INCLUDE_DIR: /usr/local/apps/boost/1.87.0/GNU/8.5/include - -DCMAKE_PREFIX_PATH: /usr/local/apps/python3/3.10.10-01/lib/python3.10/site-packages/pybind11/share/cmake/pybind11 + -DCMAKE_PREFIX_PATH: /usr/local/apps/python3/3.8.8-01/lib/python3.8/site-packages/pybind11/share/cmake/ -DPython3_ROOT_DIR: /usr/local/apps/python3/3.8.8-01 -DPython3_EXECUTABLE: /usr/local/apps/python3/3.8.8-01/bin/python3 -DPython3_INCLUDE_DIRS: /usr/local/apps/python3/3.8.8-01/include/python3.8