Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Cannot deduce format of 'a.txt' from unknown extension 'txt'
[2025-01-02T03:04:05] ERROR Formats do not match: yaml vs nml
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
Cannot deduce format of 'config.txt' from unknown extension 'txt'
values:
date: 20240105
empty: null
greeting: Good Night
message: Good Night Moon Good Night Moon
recipient: Moon
repeat: 2
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
Specify --input-format when --input-file is not specified
values:
date: 20240105
empty: null
greeting: Good Night
message: Good Night Moon Good Night Moon
recipient: Moon
repeat: 2
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Cannot deduce format of 'values.txt' from unknown extension 'txt'
Hello, World!
78 changes: 39 additions & 39 deletions notebooks/config.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -362,11 +362,11 @@
" Recognized file extensions are: ini, nml, sh, yaml\n",
" \n",
" :param input_config: Input config file (``None`` => read ``stdin``).\n",
" :param input_format: Format of the input config (optional if file's extension is recognized).\n",
" :param input_format: Input config format (default: deduced from filename extension; ``yaml`` if that fails).\n",
" :param update_config: Update config file (``None`` => read ``stdin``).\n",
" :param update_format: Format of the update config (optional if file's extension is recognized).\n",
" :param update_format: Update config format (default: deduced from filename extension; ``yaml`` if that fails).\n",
" :param output_file: Output config file (``None`` => write to ``stdout``).\n",
" :param output_format: Format of the output config (optional if file's extension is recognized).\n",
" :param output_format: Output config format (default: deduced from filename extension; ``yaml`` if that fails).\n",
" :param key_path: Path of keys to the desired output block.\n",
" :param values_needed: Report complete, missing, and template values.\n",
" :param total: Require rendering of all Jinja2 variables/expressions.\n",
Expand Down Expand Up @@ -733,13 +733,13 @@
"name": "stderr",
"output_type": "stream",
"text": [
"[2025-05-17T15:28:47] INFO Keys that are complete:\n",
"[2025-05-17T15:28:47] INFO memo\n",
"[2025-05-17T15:28:47] INFO memo.sent\n",
"[2025-05-17T15:28:47] INFO \n",
"[2025-05-17T15:28:47] INFO Keys with unrendered Jinja2 variables/expressions:\n",
"[2025-05-17T15:28:47] INFO memo.sender_id: {{ id }}\n",
"[2025-05-17T15:28:47] INFO memo.message: {{ greeting }}, {{ recipient }}!\n"
"[2025-09-10T19:05:27] INFO Keys that are complete:\n",
"[2025-09-10T19:05:27] INFO memo\n",
"[2025-09-10T19:05:27] INFO memo.sent\n",
"[2025-09-10T19:05:27] INFO \n",
"[2025-09-10T19:05:27] INFO Keys with unrendered Jinja2 variables/expressions:\n",
"[2025-09-10T19:05:27] INFO memo.sender_id: {{ id }}\n",
"[2025-09-10T19:05:27] INFO memo.message: {{ greeting }}, {{ recipient }}!\n"
]
},
{
Expand Down Expand Up @@ -1072,16 +1072,16 @@
"name": "stderr",
"output_type": "stream",
"text": [
"[2025-05-17T15:28:47] INFO - fixtures/config/base-config.nml\n",
"[2025-05-17T15:28:47] INFO + fixtures/config/alt-config.nml\n",
"[2025-05-17T15:28:47] INFO ---------------------------------------------------------------------\n",
"[2025-05-17T15:28:47] INFO ↓ ? = info | -/+ = line unique to - or + file | blank = matching line\n",
"[2025-05-17T15:28:47] INFO ---------------------------------------------------------------------\n",
"[2025-05-17T15:28:47] INFO memo:\n",
"[2025-05-17T15:28:47] INFO message: '{{ greeting }}, {{ recipient }}!'\n",
"[2025-05-17T15:28:47] INFO sender_id: '{{ id }}'\n",
"[2025-05-17T15:28:47] INFO - sent: false\n",
"[2025-05-17T15:28:47] INFO + sent: true\n"
"[2025-09-10T19:05:27] INFO - fixtures/config/base-config.nml\n",
"[2025-09-10T19:05:27] INFO + fixtures/config/alt-config.nml\n",
"[2025-09-10T19:05:27] INFO ---------------------------------------------------------------------\n",
"[2025-09-10T19:05:27] INFO ↓ ? = info | -/+ = line unique to - or + file | blank = matching line\n",
"[2025-09-10T19:05:27] INFO ---------------------------------------------------------------------\n",
"[2025-09-10T19:05:27] INFO memo:\n",
"[2025-09-10T19:05:27] INFO message: '{{ greeting }}, {{ recipient }}!'\n",
"[2025-09-10T19:05:27] INFO sender_id: '{{ id }}'\n",
"[2025-09-10T19:05:27] INFO - sent: false\n",
"[2025-09-10T19:05:27] INFO + sent: true\n"
]
},
{
Expand Down Expand Up @@ -1143,8 +1143,8 @@
"name": "stderr",
"output_type": "stream",
"text": [
"[2025-05-17T15:28:47] INFO - fixtures/config/base-config.nml\n",
"[2025-05-17T15:28:47] INFO + tmp/config-copy.nml\n"
"[2025-09-10T19:05:27] INFO - fixtures/config/base-config.nml\n",
"[2025-09-10T19:05:27] INFO + tmp/config-copy.nml\n"
]
},
{
Expand Down Expand Up @@ -1184,7 +1184,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"[2025-05-17T15:28:47] ERROR Formats do not match: yaml vs nml\n"
"[2025-09-10T19:05:27] ERROR Formats do not match: yaml vs nml\n"
]
},
{
Expand Down Expand Up @@ -1338,7 +1338,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"[2025-05-17T15:28:47] INFO Schema validation succeeded for config\n"
"[2025-09-10T19:05:27] INFO Schema validation succeeded for config\n"
]
},
{
Expand Down Expand Up @@ -1378,9 +1378,9 @@
"name": "stderr",
"output_type": "stream",
"text": [
"[2025-05-17T15:28:47] ERROR 1 schema-validation error found in config\n",
"[2025-05-17T15:28:47] ERROR Error at recipient:\n",
"[2025-05-17T15:28:47] ERROR 47 is not of type 'string'\n"
"[2025-09-10T19:05:27] ERROR 1 schema-validation error found in config\n",
"[2025-09-10T19:05:27] ERROR Error at recipient:\n",
"[2025-09-10T19:05:27] ERROR 47 is not of type 'string'\n"
]
},
{
Expand Down Expand Up @@ -1544,7 +1544,7 @@
" | clear(self)\n",
" | D.clear() -> None. Remove all items from D.\n",
" | \n",
" | pop(self, key, default=<object object at 0xffffa16ef160>)\n",
" | pop(self, key, default=<object object at 0xffffa3fdf160>)\n",
" | D.pop(k[,d]) -> v, remove specified key and return the corresponding value.\n",
" | If key is not found, d is returned if given, otherwise KeyError is raised.\n",
" | \n",
Expand Down Expand Up @@ -1699,17 +1699,17 @@
"name": "stderr",
"output_type": "stream",
"text": [
"[2025-05-17T15:28:47] INFO ---------------------------------------------------------------------\n",
"[2025-05-17T15:28:47] INFO ↓ ? = info | -/+ = line unique to - or + file | blank = matching line\n",
"[2025-05-17T15:28:47] INFO ---------------------------------------------------------------------\n",
"[2025-05-17T15:28:47] INFO fruit count:\n",
"[2025-05-17T15:28:47] INFO apples: '3'\n",
"[2025-05-17T15:28:47] INFO - grapes: '{{ grape_count }}'\n",
"[2025-05-17T15:28:47] INFO + grapes: '8'\n",
"[2025-05-17T15:28:47] INFO - kiwis: '2'\n",
"[2025-05-17T15:28:47] INFO ? ^\n",
"[2025-05-17T15:28:47] INFO + kiwis: '1'\n",
"[2025-05-17T15:28:47] INFO ? ^\n"
"[2025-09-10T19:05:27] INFO ---------------------------------------------------------------------\n",
"[2025-09-10T19:05:27] INFO ↓ ? = info | -/+ = line unique to - or + file | blank = matching line\n",
"[2025-09-10T19:05:27] INFO ---------------------------------------------------------------------\n",
"[2025-09-10T19:05:27] INFO fruit count:\n",
"[2025-09-10T19:05:27] INFO apples: '3'\n",
"[2025-09-10T19:05:27] INFO - grapes: '{{ grape_count }}'\n",
"[2025-09-10T19:05:27] INFO + grapes: '8'\n",
"[2025-09-10T19:05:27] INFO - kiwis: '2'\n",
"[2025-09-10T19:05:27] INFO ? ^\n",
"[2025-09-10T19:05:27] INFO + kiwis: '1'\n",
"[2025-09-10T19:05:27] INFO ? ^\n"
]
},
{
Expand Down
12 changes: 6 additions & 6 deletions notebooks/exp-config-cb.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -350,17 +350,17 @@
"name": "stderr",
"output_type": "stream",
"text": [
"[2025-05-17T15:29:07] INFO Validating config against internal schema: chgres-cube\n",
"[2025-05-17T15:29:07] INFO Schema validation succeeded for chgres_cube config\n",
"[2025-05-17T15:29:07] INFO Validating config against internal schema: platform\n",
"[2025-05-17T15:29:07] INFO Schema validation succeeded for platform config\n",
"[2025-05-17T15:29:07] INFO 20250517 21:29:06 chgres_cube valid schema: Ready\n"
"[2025-09-10T19:05:55] INFO Validating config against internal schema: chgres-cube\n",
"[2025-09-10T19:05:55] INFO Schema validation succeeded for chgres_cube config\n",
"[2025-09-10T19:05:55] INFO Validating config against internal schema: platform\n",
"[2025-09-10T19:05:55] INFO Schema validation succeeded for platform config\n",
"[2025-09-10T19:05:55] INFO 20250911 01:05:55 chgres_cube valid schema: Ready\n"
]
},
{
"data": {
"text/plain": [
"20250517 21:29:06 chgres_cube valid schema <281472538537552>"
"20250911 01:05:55 chgres_cube valid schema <281472808976000>"
]
},
"execution_count": 8,
Expand Down
Loading