-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add documentation for xtriggers entry_point (#671)
Add documentation for xtriggers entry_point --------- Co-authored-by: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com>
- Loading branch information
1 parent
c3c2f03
commit 7b8d510
Showing
4 changed files
with
59 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
Xtrigger Plugins | ||
====================================== | ||
|
||
Xtrigger plugins allow you to install and use xtriggers without them being | ||
in your ``CYLC_PYTHONPATH``. | ||
|
||
|
||
Built In Plugins | ||
---------------- | ||
|
||
Cylc Flow provides the following xtriggers. | ||
|
||
.. autosummary:: | ||
:toctree: built-in | ||
:template: docstring_only.rst | ||
|
||
cylc.flow.xtriggers.echo | ||
cylc.flow.xtriggers.workflow_state | ||
cylc.flow.xtriggers.xrandom | ||
|
||
.. Note: Autosummary generates files in this directory, these are cleaned | ||
up by `make clean`. | ||
Developing ``xtrigger`` plugins | ||
------------------------------- | ||
|
||
Cylc uses entry points registered by setuptools to search for xtrigger | ||
plugins. | ||
|
||
Example | ||
^^^^^^^ | ||
|
||
Plugins are registered by registering them with the ``cylc.xtriggers`` | ||
entry points. Each xtrigger is registered individually. | ||
|
||
.. code-block:: ini | ||
:caption: ``setup.cfg`` | ||
[options.entry_points] | ||
cylc.xtriggers = | ||
foo = my_package.foo:foo | ||
bar = my_package.foo:bar | ||
baz = my_package.baz:baz | ||
.. code-block:: toml | ||
:caption: ``pyproject.toml`` | ||
[project.entry-points."cylc.xtriggers"] | ||
foo = "my_package.foo:foo" | ||
bar = "my_package.foo:bar" | ||
baz = "my_package.baz:baz" | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters