File tree Expand file tree Collapse file tree 4 files changed +59
-2
lines changed
user-guide/writing-workflows Expand file tree Collapse file tree 4 files changed +59
-2
lines changed Original file line number Diff line number Diff line change @@ -24,5 +24,6 @@ src/appendices/command-ref.rst
24
24
# auto-generated documentation
25
25
src /plugins /main-loop /built-in
26
26
src /plugins /install /built-in
27
+ src /plugins /xtriggers /built-in
27
28
src /user-guide /task-implementation /job-runner-handlers
28
29
src /dictionaries /sentence_case
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ The following are "core" plugins maintained by the Cylc team:
12
12
main-loop/index
13
13
install/index
14
14
job-runners/index
15
+ xtriggers/index
15
16
16
17
.. warning ::
17
18
Original file line number Diff line number Diff line change
1
+ Xtrigger Plugins
2
+ ======================================
3
+
4
+ Xtrigger plugins allow you to install and use xtriggers without them being
5
+ in your ``CYLC_PYTHONPATH ``.
6
+
7
+
8
+ Built In Plugins
9
+ ----------------
10
+
11
+ Cylc Flow provides the following xtriggers.
12
+
13
+ .. autosummary ::
14
+ :toctree: built-in
15
+ :template: docstring_only.rst
16
+
17
+ cylc.flow.xtriggers.echo
18
+ cylc.flow.xtriggers.workflow_state
19
+ cylc.flow.xtriggers.xrandom
20
+
21
+ .. Note: Autosummary generates files in this directory, these are cleaned
22
+ up by `make clean`.
23
+
24
+ Developing ``xtrigger `` plugins
25
+ -------------------------------
26
+
27
+ Cylc uses entry points registered by setuptools to search for xtrigger
28
+ plugins.
29
+
30
+ Example
31
+ ^^^^^^^
32
+
33
+ Plugins are registered by registering them with the ``cylc.xtriggers ``
34
+ entry points. Each xtrigger is registered individually.
35
+
36
+ .. code-block :: ini
37
+ :caption: ``setup.cfg``
38
+
39
+ [options.entry_points]
40
+ cylc.xtriggers =
41
+ foo = my_package.foo:foo
42
+ bar = my_package.foo:bar
43
+ baz = my_package.baz:baz
44
+
45
+ .. code-block :: toml
46
+ :caption: ``pyproject.toml``
47
+
48
+ [project.entry-points."cylc.xtriggers"]
49
+ foo = "my_package.foo:foo"
50
+ bar = "my_package.foo:bar"
51
+ baz = "my_package.baz:baz"
52
+
Original file line number Diff line number Diff line change @@ -230,14 +230,17 @@ properties:
230
230
231
231
- they must:
232
232
233
- - be defined in a module with the same name as the function;
233
+ - be defined in a module with the same name as the function, unless
234
+ provided using the ``cylc.xtriggers `` entry point;
234
235
- be compatible with the same Python version that runs the scheduler
235
236
(see :ref: `Requirements ` for the latest version specification).
236
237
237
238
- they can be located either:
238
239
239
240
- in ``<workflow-dir>/lib/python/ ``;
240
- - or anywhere in your ``$CYLC_PYTHONPATH ``.
241
+ - anywhere in your ``$CYLC_PYTHONPATH ``;
242
+ - or defined using the ``cylc.xtriggers `` entry point for an installed
243
+ package.
241
244
242
245
- they can take arbitrary positional and keyword arguments
243
246
- workflow and task identity, and cycle point, can be passed to trigger
You can’t perform that action at this time.
0 commit comments