Skip to content

Commit 1e38554

Browse files
Merge branch 'main' into typos
2 parents bbcca4f + c55fbd6 commit 1e38554

9 files changed

Lines changed: 75 additions & 24 deletions

File tree

docs/sections/user_guide/cli/tools/fs/makedirs-exec-report.out

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
[2025-01-30T06:32:58] INFO Validating config against internal schema: makedirs
2-
[2025-01-30T06:32:58] INFO 0 schema-validation errors found in fs config
3-
[2025-01-30T06:33:00] INFO Directory makedirs-parent-report/foo: Executing
4-
[2025-01-30T06:33:00] INFO Directory makedirs-parent-report/foo: Ready
5-
[2025-01-30T06:33:01] INFO Directory makedirs-parent-report/subdir/bar: Executing
6-
[2025-01-30T06:33:01] WARNING Directory makedirs-parent-report/subdir/bar: Not ready
7-
[2025-01-30T06:33:01] WARNING Directories: Not ready
8-
[2025-01-30T06:33:01] WARNING Directories: Requires:
9-
[2025-01-30T06:33:01] WARNING Directories: ✔ Directory makedirs-parent-report/foo
10-
[2025-01-30T06:33:01] WARNING Directories: ✖ Directory makedirs-parent-report/subdir/bar
1+
[2025-02-13T17:19:49] INFO Validating config against internal schema: makedirs
2+
[2025-02-13T17:19:49] INFO 0 schema-validation errors found in fs config
3+
[2025-02-13T17:19:50] INFO Directory makedirs-parent-report/foo: Executing
4+
[2025-02-13T17:19:50] INFO Directory makedirs-parent-report/foo: Ready
5+
[2025-02-13T17:19:50] INFO Directory makedirs-parent-report/subdir/bar: Executing
6+
[2025-02-13T17:19:50] ERROR [Errno 13] Permission denied: 'makedirs-parent-report/subdir/bar'
7+
[2025-02-13T17:19:50] WARNING Directory makedirs-parent-report/subdir/bar: Not ready
8+
[2025-02-13T17:19:50] WARNING Directories: Not ready
9+
[2025-02-13T17:19:50] WARNING Directories: Requires:
10+
[2025-02-13T17:19:50] WARNING Directories: ✔ Directory makedirs-parent-report/foo
11+
[2025-02-13T17:19:50] WARNING Directories: ✖ Directory makedirs-parent-report/subdir/bar
1112
{
1213
"not-ready": [
1314
"makedirs-parent-report/subdir/bar"

docs/sections/user_guide/cli/tools/rocoto.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The ``uw`` mode for realizing and validating Rocoto XML documents.
1616

1717
In ``uw`` terminology, to ``realize`` a configuration file is to transform it from its raw form into its final, usable state. In the case of ``uw rocoto``, that means transforming a structured UW YAML file into a :rocoto:`Rocoto XML<>` file. The structured YAML language required by UW closely follows the XML language defined by Rocoto.
1818

19-
More information about the structured UW YAML file for Rocoto can be found :any:`here<defining_a_workflow>`.
19+
See :ref:`rocoto_workflows` for more information about the structured UW YAML for Rocoto.
2020

2121
.. literalinclude:: rocoto/realize-help.cmd
2222
:language: text
File renamed without changes.

docs/sections/user_guide/yaml/components/index.rst

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
UW YAML for Components
2-
======================
1+
Component Drivers
2+
=================
3+
4+
Available Drivers
5+
-----------------
36

47
.. toctree::
58
:maxdepth: 1
@@ -24,3 +27,12 @@ UW YAML for Components
2427
ungrib
2528
upp
2629
ww3
30+
31+
Common Driver Blocks
32+
--------------------
33+
34+
.. toctree::
35+
:maxdepth: 1
36+
37+
execution
38+
platform
File renamed without changes.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
Custom Filters
2+
==============
3+
4+
Filters are used to transform values inside Jinja2 expressions. See Jinja2's `general description <https://jinja.palletsprojects.com/en/stable/templates/#filters>`_ or the list of `built-in filters <https://jinja.palletsprojects.com/en/stable/templates/#builtin-filters>`_.
5+
6+
The following custom filters are available from ``uwtools``
7+
8+
``env``
9+
^^^^^^^
10+
11+
Inserts the value of the specified environment variable. For example, given ``config.yaml``
12+
13+
.. code-block:: text
14+
15+
cycle: "{{ 'CYCLE' | env }}"
16+
17+
and the presence of environment variable ``CYCLE`` with value ``2025021312``:
18+
19+
.. code-block:: text
20+
21+
$ uw config realize -i config.yaml --output-format yaml
22+
cycle: '2025021312'
23+
24+
Note that the name of the environment variable must be quoted in the Jinja2 expression so that it is recognized as a string, not a Python variable name.
25+
26+
The ``env`` filter can be combined with :ref:`custom_yaml_tags` to obtain appropriately typed YAML values. For example, give ``config.yaml``
27+
28+
.. code-block:: text
29+
30+
leadtime: !int "{{ 'LEADTIME' | env }}"
31+
32+
and the presence of environment variable ``LEADTIME`` with value ``6``:
33+
34+
.. code-block:: text
35+
36+
$ uw config realize -i config.yaml --output-format yaml
37+
leadtime: 6
38+
39+
Note that ``6`` here is a YAML integer, not a string, and will be instantiated in Python as an ``int``.

docs/sections/user_guide/yaml/index.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ UW YAML
44
.. toctree::
55
:maxdepth: 1
66

7-
components/index
8-
execution
7+
filters
8+
tags
99
files
1010
makedirs
11-
platform
12-
rocoto
13-
tags
1411
updating_values
12+
components/index
13+
rocoto

docs/sections/user_guide/yaml/rocoto.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
.. _defining_a_workflow:
1+
.. _rocoto_workflows:
22

3-
Defining a Rocoto Workflow
4-
==========================
3+
Rocoto Workflows
4+
================
55

66
:rocoto:`Rocoto<>` is a workflow manager widely used by :ufs:`UFS<>` users and developers. It uses a custom XML language to define a set of tasks, their computational resource needs on a batch system, and their dependencies.
77

docs/sections/user_guide/yaml/tags.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
.. _defining_YAML_tags:
1+
.. _custom_yaml_tags:
22

3-
UW YAML tags
4-
============
3+
Custom Tags
4+
===========
55

66
Tags are used to denote the type of a YAML node when converting to a Python object. Standard YAML tags are defined `here <http://yaml.org/type/index.html>`_.
77

0 commit comments

Comments
 (0)