Skip to content

Commit

Permalink
Doc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
maddenp-noaa committed Jan 5, 2025
1 parent cb640d5 commit f3e2983
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 72 deletions.
56 changes: 28 additions & 28 deletions docs/sections/user_guide/cli/tools/config/realize-verbose.out
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
[2024-11-27T05:24:34] DEBUG Command: uw config realize --input-format yaml --output-format yaml --verbose
[2024-11-27T05:24:34] DEBUG Reading input from stdin
[2024-11-27T05:24:34] DEBUG Dereferencing, current value:
[2024-11-27T05:24:34] DEBUG hello: '{{ recipient }}'
[2024-11-27T05:24:34] DEBUG recipient: world
[2024-11-27T05:24:34] DEBUG [dereference] Rendering: hello
[2024-11-27T05:24:34] DEBUG [dereference] Rendered: hello
[2024-11-27T05:24:34] DEBUG [dereference] Rendering: {{ recipient }}
[2024-11-27T05:24:34] DEBUG [dereference] Rendered: world
[2024-11-27T05:24:34] DEBUG [dereference] Rendering: recipient
[2024-11-27T05:24:34] DEBUG [dereference] Rendered: recipient
[2024-11-27T05:24:34] DEBUG [dereference] Rendering: world
[2024-11-27T05:24:34] DEBUG [dereference] Rendered: world
[2024-11-27T05:24:34] DEBUG Dereferencing, current value:
[2024-11-27T05:24:34] DEBUG hello: world
[2024-11-27T05:24:34] DEBUG recipient: world
[2024-11-27T05:24:34] DEBUG [dereference] Rendering: hello
[2024-11-27T05:24:34] DEBUG [dereference] Rendered: hello
[2024-11-27T05:24:34] DEBUG [dereference] Rendering: world
[2024-11-27T05:24:34] DEBUG [dereference] Rendered: world
[2024-11-27T05:24:34] DEBUG [dereference] Rendering: recipient
[2024-11-27T05:24:34] DEBUG [dereference] Rendered: recipient
[2024-11-27T05:24:34] DEBUG [dereference] Rendering: world
[2024-11-27T05:24:34] DEBUG [dereference] Rendered: world
[2024-11-27T05:24:34] DEBUG Dereferencing, final value:
[2024-11-27T05:24:34] DEBUG hello: world
[2024-11-27T05:24:34] DEBUG recipient: world
[2024-11-27T05:24:34] DEBUG Writing output to stdout
[2025-01-05T21:15:07] DEBUG Command: uw config realize --input-format yaml --output-format yaml --verbose
[2025-01-05T21:15:07] DEBUG Reading input from stdin
[2025-01-05T21:15:07] DEBUG [dereference] Dereferencing, current value:
[2025-01-05T21:15:07] DEBUG [dereference] hello: '{{ recipient }}'
[2025-01-05T21:15:07] DEBUG [dereference] recipient: world
[2025-01-05T21:15:07] DEBUG [dereference] Rendering: hello
[2025-01-05T21:15:07] DEBUG [dereference] Rendered: hello
[2025-01-05T21:15:07] DEBUG [dereference] Rendering: {{ recipient }}
[2025-01-05T21:15:07] DEBUG [dereference] Rendered: world
[2025-01-05T21:15:07] DEBUG [dereference] Rendering: recipient
[2025-01-05T21:15:07] DEBUG [dereference] Rendered: recipient
[2025-01-05T21:15:07] DEBUG [dereference] Rendering: world
[2025-01-05T21:15:07] DEBUG [dereference] Rendered: world
[2025-01-05T21:15:07] DEBUG [dereference] Dereferencing, current value:
[2025-01-05T21:15:07] DEBUG [dereference] hello: world
[2025-01-05T21:15:07] DEBUG [dereference] recipient: world
[2025-01-05T21:15:07] DEBUG [dereference] Rendering: hello
[2025-01-05T21:15:07] DEBUG [dereference] Rendered: hello
[2025-01-05T21:15:07] DEBUG [dereference] Rendering: world
[2025-01-05T21:15:07] DEBUG [dereference] Rendered: world
[2025-01-05T21:15:07] DEBUG [dereference] Rendering: recipient
[2025-01-05T21:15:07] DEBUG [dereference] Rendered: recipient
[2025-01-05T21:15:07] DEBUG [dereference] Rendering: world
[2025-01-05T21:15:07] DEBUG [dereference] Rendered: world
[2025-01-05T21:15:07] DEBUG [dereference] Dereferencing, final value:
[2025-01-05T21:15:07] DEBUG [dereference] hello: world
[2025-01-05T21:15:07] DEBUG [dereference] recipient: world
[2025-01-05T21:15:07] DEBUG Writing output to stdout
hello: world
recipient: world
42 changes: 21 additions & 21 deletions docs/sections/user_guide/cli/tools/config/validate-verbose.out
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
[2024-11-27T05:24:34] DEBUG Command: uw config validate --schema-file schema.jsonschema --input-file values.yaml --verbose
[2024-11-27T05:24:34] DEBUG Using schema file: schema.jsonschema
[2024-11-27T05:24:34] DEBUG Dereferencing, current value:
[2024-11-27T05:24:34] DEBUG values:
[2024-11-27T05:24:34] DEBUG greeting: Hello
[2024-11-27T05:24:34] DEBUG recipient: World
[2024-11-27T05:24:34] DEBUG [dereference] Rendering: values
[2024-11-27T05:24:34] DEBUG [dereference] Rendered: values
[2024-11-27T05:24:34] DEBUG [dereference] Rendering: greeting
[2024-11-27T05:24:34] DEBUG [dereference] Rendered: greeting
[2024-11-27T05:24:34] DEBUG [dereference] Rendering: Hello
[2024-11-27T05:24:34] DEBUG [dereference] Rendered: Hello
[2024-11-27T05:24:34] DEBUG [dereference] Rendering: recipient
[2024-11-27T05:24:34] DEBUG [dereference] Rendered: recipient
[2024-11-27T05:24:34] DEBUG [dereference] Rendering: World
[2024-11-27T05:24:34] DEBUG [dereference] Rendered: World
[2024-11-27T05:24:34] DEBUG Dereferencing, final value:
[2024-11-27T05:24:34] DEBUG values:
[2024-11-27T05:24:34] DEBUG greeting: Hello
[2024-11-27T05:24:34] DEBUG recipient: World
[2024-11-27T05:24:34] INFO 0 schema-validation errors found in config
[2025-01-05T21:15:07] DEBUG Command: uw config validate --schema-file schema.jsonschema --input-file values.yaml --verbose
[2025-01-05T21:15:07] DEBUG Using schema file: schema.jsonschema
[2025-01-05T21:15:07] DEBUG [dereference] Dereferencing, current value:
[2025-01-05T21:15:07] DEBUG [dereference] values:
[2025-01-05T21:15:07] DEBUG [dereference] greeting: Hello
[2025-01-05T21:15:07] DEBUG [dereference] recipient: World
[2025-01-05T21:15:07] DEBUG [dereference] Rendering: values
[2025-01-05T21:15:07] DEBUG [dereference] Rendered: values
[2025-01-05T21:15:07] DEBUG [dereference] Rendering: greeting
[2025-01-05T21:15:07] DEBUG [dereference] Rendered: greeting
[2025-01-05T21:15:07] DEBUG [dereference] Rendering: Hello
[2025-01-05T21:15:07] DEBUG [dereference] Rendered: Hello
[2025-01-05T21:15:07] DEBUG [dereference] Rendering: recipient
[2025-01-05T21:15:07] DEBUG [dereference] Rendered: recipient
[2025-01-05T21:15:07] DEBUG [dereference] Rendering: World
[2025-01-05T21:15:07] DEBUG [dereference] Rendered: World
[2025-01-05T21:15:07] DEBUG [dereference] Dereferencing, final value:
[2025-01-05T21:15:07] DEBUG [dereference] values:
[2025-01-05T21:15:07] DEBUG [dereference] greeting: Hello
[2025-01-05T21:15:07] DEBUG [dereference] recipient: World
[2025-01-05T21:15:07] INFO 0 schema-validation errors found in config
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
[2024-08-26T23:39:19] DEBUG Command: uw rocoto realize --config-file rocoto.yaml --verbose
[2024-08-26T23:39:19] DEBUG Dereferencing, current value:
[2024-08-26T23:39:19] DEBUG workflow:
[2024-08-26T23:39:19] DEBUG attrs:
[2024-08-26T23:39:19] DEBUG realtime: false
[2024-08-26T23:39:19] DEBUG scheduler: slurm
[2024-08-26T23:39:19] DEBUG cycledef:
[2024-08-26T23:39:19] DEBUG - attrs:
[2024-08-26T23:39:19] DEBUG group: howdy
[2024-08-26T23:39:19] DEBUG spec: 202209290000 202209300000 06:00:00
[2025-01-05T21:15:07] DEBUG Command: uw rocoto realize --config-file rocoto.yaml --verbose
[2025-01-05T21:15:07] DEBUG [dereference] Dereferencing, current value:
[2025-01-05T21:15:07] DEBUG [dereference] workflow:
[2025-01-05T21:15:07] DEBUG [dereference] attrs:
[2025-01-05T21:15:07] DEBUG [dereference] realtime: false
[2025-01-05T21:15:07] DEBUG [dereference] scheduler: slurm
[2025-01-05T21:15:07] DEBUG [dereference] cycledef:
[2025-01-05T21:15:07] DEBUG [dereference] - attrs:
[2025-01-05T21:15:07] DEBUG [dereference] group: howdy
[2025-01-05T21:15:07] DEBUG [dereference] spec: 202209290000 202209300000 06:00:00
...
[2024-08-26T23:39:20] DEBUG cycledefs: howdy
[2024-08-26T23:39:20] DEBUG account: '&ACCOUNT;'
[2024-08-26T23:39:20] DEBUG command: echo hello $person
[2024-08-26T23:39:20] DEBUG jobname: hello
[2024-08-26T23:39:20] DEBUG native: --reservation my_reservation
[2024-08-26T23:39:20] DEBUG nodes: 1:ppn=1
[2024-08-26T23:39:20] DEBUG walltime: 00:01:00
[2024-08-26T23:39:20] DEBUG envars:
[2024-08-26T23:39:20] DEBUG person: siri
[2024-08-26T23:39:20] INFO 0 Rocoto XML validation errors found
[2025-01-05T21:15:07] DEBUG [dereference] cycledefs: howdy
[2025-01-05T21:15:07] DEBUG [dereference] account: '&ACCOUNT;'
[2025-01-05T21:15:07] DEBUG [dereference] command: echo hello $person
[2025-01-05T21:15:07] DEBUG [dereference] jobname: hello
[2025-01-05T21:15:07] DEBUG [dereference] native: --reservation my_reservation
[2025-01-05T21:15:07] DEBUG [dereference] nodes: 1:ppn=1
[2025-01-05T21:15:07] DEBUG [dereference] walltime: 00:01:00
[2025-01-05T21:15:07] DEBUG [dereference] envars:
[2025-01-05T21:15:07] DEBUG [dereference] person: siri
[2025-01-05T21:15:07] INFO 0 Rocoto XML validation errors found
2 changes: 1 addition & 1 deletion src/uwtools/config/formats/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def _compare_config_get_lines(d: dict) -> list[str]:
"""
sio = StringIO()
sio.write(dict_to_yaml_str(d, sort=True))
return sio.getvalue().splitlines(keepends=True)
return sio.getvalue().splitlines(keepends=False)

@staticmethod
def _compare_config_log_header() -> None:
Expand Down
8 changes: 6 additions & 2 deletions src/uwtools/config/jinja2.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,18 @@ def dereference(
return rendered


def deref_debug(action: str, val: Optional[_ConfigVal] = "") -> None:
def deref_debug(action: str, val: Optional[_ConfigVal] = None) -> None:
"""
Log a debug-level message related to dereferencing.
:param action: The dereferencing activity being performed.
:param val: The value being dereferenced.
"""
log.debug("[dereference] %s: %s", action, val)
prefix = "[dereference]"
if val:
log.debug("%s %s: %s", prefix, action, val)
else:
log.debug("%s %s", prefix, action)


def render(
Expand Down

0 comments on commit f3e2983

Please sign in to comment.