Skip to content

Commit

Permalink
address PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
elcarpenterNOAA committed Jan 2, 2025
1 parent b7aea86 commit 63b70bd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions docs/sections/user_guide/yaml/tags.rst
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,14 @@ Converts the tagged node to a Python ``list`` value. For example, given ``input.
l1: [1, 2, 3]
l2: !list "[{% for n in range(3) %} a{{ n }},{% endfor %} ]"
l3: !list "[ a, b, c, ]"
l3: !list "[ a0, a1, a2, ]"
.. code-block:: text
$ uw config realize --input-file input.yaml --output-format yaml
l1: [1, 2, 3]
l2: ['a0', 'a1', 'a2']
l3: ['a', 'b', 'c']
l3: ['a0', 'a1', 'a2']
``!remove``
^^^^^^^^^^^
Expand Down
28 changes: 14 additions & 14 deletions src/uwtools/tests/config/formats/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,15 +210,15 @@ def test_dereference(tmp_path):
yaml = """
a: !int '{{ b.c + 11 }}'
b:
c: !int '{{ N | int + 11 }}'
c: !int '{{ l | int + 11 }}'
d: '{{ X }}'
e:
- !bool "False"
- !datetime '{{ D }}'
- !float '3.14'
- !int '42'
- !datetime '{{ i }}'
- !dict "{ b0: 0, b1: 1, b2: 2,}"
- !dict "[ ['c0',0], ['c1',1], ['c2',2], ]"
- !float '3.14'
- !int '42'
- !list "[ a0, a1, a2, ]"
f:
f1: True
Expand All @@ -229,10 +229,10 @@ def test_dereference(tmp_path):
f6: !list "[ 0, 1, 2, ]"
g: !bool '{{ f.f3 }}'
h: !bool 0
D: 2024-10-10 00:19:00
I: !dict "{ b0: 0, b1: 1, b2: 2,}"
L: !list "[ a0, a1, a2, ]"
N: "22"
i: 2024-10-10 00:19:00
j: !dict "{ b0: 0, b1: 1, b2: 2,}"
k: !list "[ a0, a1, a2, ]"
l: "22"
""".strip()
path = tmp_path / "config.yaml"
Expand All @@ -249,10 +249,10 @@ def test_dereference(tmp_path):
"e": [
False,
datetime.fromisoformat("2024-10-10 00:19:00"),
3.14,
42,
{"b0": 0, "b1": 1, "b2": 2},
{"c0": 0, "c1": 1, "c2": 2},
3.14,
42,
["a0", "a1", "a2"],
],
"f": {
Expand All @@ -265,10 +265,10 @@ def test_dereference(tmp_path):
},
"g": True,
"h": False,
"D": datetime.fromisoformat("2024-10-10 00:19:00"),
"I": {"b0": 0, "b1": 1, "b2": 2},
"L": ["a0", "a1", "a2"],
"N": "22",
"i": datetime.fromisoformat("2024-10-10 00:19:00"),
"j": {"b0": 0, "b1": 1, "b2": 2},
"k": ["a0", "a1", "a2"],
"l": "22",
}


Expand Down

0 comments on commit 63b70bd

Please sign in to comment.