cylc_lang
An extension providing pygments lexers for the Cylc flow.cylc language.
Pygments Lexers
cylc
Lexer for the Cylc language and flow.cylc
extensions.
.. code-block:: cylc
[scheduling]
initial cycle point = 2000
[[graph]]
P1Y = """
@wall_clock => foo? => bar
(foo? & bar) => pub
"""
[scheduling]
initial cycle point = 2000
[[graph]]
P1Y = """
@wall_clock => foo? => bar
(foo? & bar) => pub
"""
Note
The graph part should format the same as the cylc-graph
example
below.
cylc-graph
Lexer for the Cylc “graph string” language.
.. code-block:: cylc-graph
@wall_clock => foo? => bar
(foo? & bar) => pub
@wall_clock => foo? => bar
(foo? & bar) => pub
Domains
Sphinx domain for cylc
configurations.
cylc
.. cylc:conf:: my-conf1.cylc
.. cylc:setting:: foo
A setting called ``foo``.
We can use relative references to link to other sections in the
same configuration tree. Just use ``..`` to back up a level
like this: :cylc:conf:`[..][bar]pub`
Note the ``[..]`` will disappear when the docs are built.
Note also that arbitrary whitespace is supported in references,
for example :cylc:conf:`[..]
[bar]
pub`
.. cylc:section:: bar
A section called ``bar``.
Here's a link to :cylc:conf:`this section <my-conf1.cylc[bar]>`, note
we re-named the target using the sphinx/rst ``name <target>`` syntax.
.. cylc:setting:: pub
A setting called ``pub``
.. cylc:value:: integer
:deprecated: 1.2.3
seconds as an integer.
the newer :cylc:value:`..=string` is preferred (this is also
a relative reference).
.. cylc:value:: string
an iso8601 duration.
.. cylc:setting:: a/b/c
A setting with a ``/`` in the name.
- my-conf1.cylc
- foo
A setting called
foo
.We can use relative references to link to other sections in the same configuration tree. Just use
..
to back up a level like this:[bar]pub
Note the
[..]
will disappear when the docs are built.Note also that arbitrary whitespace is supported in references, for example
[bar]pub
- [bar]
A section called
bar
.Here’s a link to
this section
, note we re-named the target using the sphinx/rstname <target>
syntax.- pub
A setting called
pub
- =integer
- Deprecated:
1.2.3
seconds as an integer.
the newer
=string
is preferred (this is also a relative reference).
- =string
an iso8601 duration.
- a/b/c
A setting with a
/
in the name.
Auto Documenters
- .. auto-cylc-conf::
Directive for documenting Parsec specification dictionaries.
.. auto-cylc-conf:: name-of-conf python.namespace.SPEC
- .. auto-cylc-type::
Directive for documenting Parsec types.
Extracts type information from
cylc.flow
, or, for development purposes, from JSON in the directive body... auto-cylc-type:: [ { "name": "boolean", "help": "A boolean in Python format", "options": ["True", "False"], "examples": { "True": "/usr/bin/true to your heart", "False": "oh noes" }, "references": [ ["rst:dir", "auto-cylc-type"] ] } ] Expected usage would look like this: .. code-block:: rst .. auto-cylc-type:: cylc.flow.parsec.validate.ParsecValidator.V_TYPE_HELP cylc.flow.parsec.validate.CylcConfigValidator.V_TYPE_HELP
- boolean
A boolean in Python format
Examples:
True
- /usr/bin/true to your heartFalse
- oh noes
See Also:
Expected usage would look like this:
.. auto-cylc-type:: cylc.flow.parsec.validate.ParsecValidator.V_TYPE_HELP cylc.flow.parsec.validate.CylcConfigValidator.V_TYPE_HELP
Directives
- .. cylc-scope::
Sets the context for cylc object references.
.. cylc-scope:: my-conf1.cylc[bar] Lets head to the :cylc:conf:`pub`.
Lets head to the
pub
.Always be nice and reset the scope afterwards. .. cylc-scope:: .. note:: This resets it to the hardcoded default which is ``flow.cylc``.
Always be nice and reset the scope afterwards.
Note
This resets it to the hardcoded default which is
flow.cylc
.