-
Notifications
You must be signed in to change notification settings - Fork 32
Add a uw rocoto iterate action #766
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
maddenp-cu
merged 72 commits into
ufs-community:main
from
maddenp-cu:uw-629-rocoto-monitor
Jul 24, 2025
Merged
Changes from 65 commits
Commits
Show all changes
72 commits
Select commit
Hold shift + click to select a range
80c80a5
Wire up CLI
maddenp-cu c5532da
Add unit tests
maddenp-cu 5298587
Simplify function names in uwtools.rocoto module
maddenp-cu e7f254c
WIP
maddenp-cu 6d51fd9
WIP
maddenp-cu ce8b384
WIP
maddenp-cu 3c5392c
WIP
maddenp-cu c7f63cf
WIP
maddenp-cu 29ff657
Add RocotoRunner class
maddenp-cu 4157942
WIP
maddenp-cu d5f0332
WIP
maddenp-cu 0067cd2
WIP
maddenp-cu 6a269c5
Add missing types
maddenp-cu 8143433
Make methods private
maddenp-cu cc835e8
Reorg
maddenp-cu 5e91cc4
WIP
maddenp-cu afe8852
WIP
maddenp-cu 10f9350
WIP [skip ci]
maddenp-cu fd37eab
WIP [skip ci]
maddenp-cu f0e3b51
WIP [skip ci]
maddenp-cu 57fca6f
WIP [skip ci]
maddenp-cu 083d8c0
WIP [skip ci]
maddenp-cu f8109d2
WIP [skip ci]
maddenp-cu 37208d4
Fix rate in CLI
maddenp-cu ecac20c
Test renaming
maddenp-cu 8c9c0a2
Work on tests [skip ci]
maddenp-cu ce03756
Work on tests [skip ci]
maddenp-cu 5bbbff5
Work on tests [skip ci]
maddenp-cu 0976e6a
Work on tests [skip ci]
maddenp-cu 5301eaf
Work on tests [skip ci]
maddenp-cu f94bf28
Work on tests [skip ci]
maddenp-cu d7316d2
Work on tests [skip ci]
maddenp-cu 8871218
Merge branch 'main' into uw-629-rocoto-monitor
maddenp-cu dc208cf
Work on tests [skip ci]
maddenp-cu fcd97f1
Work on tests [skip ci]
maddenp-cu cec60eb
Work on tests [skip ci]
maddenp-cu 4b25a04
Work on tests [skip ci]
maddenp-cu f2b9baa
Work on tests [skip ci]
maddenp-cu e889c01
Work on tests [skip ci]
maddenp-cu 5acf570
Work on tests [skip ci]
maddenp-cu 8e38b74
Work on tests
maddenp-cu 9a30879
Work on docs
maddenp-cu c86ad7a
Work on docs
maddenp-cu 974651e
Work on docs
maddenp-cu 0ed6935
Fix typo
maddenp-cu e42f6ce
DRY out 10-second default rate
maddenp-cu d424abb
Simplify run
maddenp-cu f88d469
Simplify run
maddenp-cu 7836471
Simplify run
maddenp-cu e927c8b
Simplify run
maddenp-cu 9a1dcfb
Simplify run
maddenp-cu e7b97c7
Simplify run
maddenp-cu 521635a
Simplify run
maddenp-cu 30b6940
Reorder tests
maddenp-cu da7887b
Restore Makefile.outputs
maddenp-cu 32d4433
Work on docs [skip ci]
maddenp-cu b81ead7
Add commentary to Makefile.outputs
maddenp-cu 81715e9
WIP [skip ci]
maddenp-cu d53ffdd
WIP [skip ci]
maddenp-cu e02c868
Work on docs
maddenp-cu 13d4259
Work on docs
maddenp-cu 9be3a8f
Fix test
maddenp-cu 606cdde
Merge branch 'main' into uw-629-rocoto-monitor
maddenp-cu 56283f4
Improve & test hardlink error logging
maddenp-cu dc7213e
Update docs/sections/user_guide/cli/Makefile.outputs
maddenp-cu 16867d6
Fix comments
maddenp-cu f22fa3e
Merge branch 'uw-629-rocoto-monitor' of github.com:maddenp-cu/uwtools…
maddenp-cu b160570
Run -> Iterate (mostly code)
maddenp-cu 2edafb9
Update docs [skip ci]
maddenp-cu 0717590
Update docs
maddenp-cu 0b6675a
Fix highlight line in docs
maddenp-cu d62b4ad
Remove conda-verify references
maddenp-cu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
rocoto.log | ||
rocoto.xml | ||
tmp.* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
RUNDIR=/some/path uw rocoto realize -c foobar.yaml |
30 changes: 30 additions & 0 deletions
30
docs/sections/user_guide/cli/tools/rocoto/foobar-realize.out
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
[2025-01-02T03:04:05] INFO Schema validation succeeded for Rocoto config | ||
[2025-01-02T03:04:05] INFO Schema validation succeeded for Rocoto XML | ||
<?xml version='1.0' encoding='utf-8'?> | ||
<workflow realtime="False" scheduler="slurm"> | ||
<cycledef group="default">202507170000 202507170000 00:00:01</cycledef> | ||
<log>/some/path/log</log> | ||
<task name="foo" cycledefs="default"> | ||
<account>wrfruc</account> | ||
<cores>1</cores> | ||
<partition>service</partition> | ||
<queue>batch</queue> | ||
<walltime>00:01:00</walltime> | ||
<command>/bin/true</command> | ||
<jobname>foo</jobname> | ||
<join>/some/path/slurm</join> | ||
</task> | ||
<task name="bar" cycledefs="default"> | ||
<account>wrfruc</account> | ||
<cores>1</cores> | ||
<partition>service</partition> | ||
<queue>batch</queue> | ||
<walltime>00:01:00</walltime> | ||
<command>/bin/true</command> | ||
<jobname>bar</jobname> | ||
<join>/some/path/slurm</join> | ||
<dependency> | ||
<taskdep task="foo"/> | ||
</dependency> | ||
</task> | ||
</workflow> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
common: &common | ||
account: wrfruc | ||
attrs: {cycledefs: default} | ||
command: /bin/true | ||
cores: 1 | ||
join: "{{ 'RUNDIR' | env }}/slurm" | ||
partition: service | ||
queue: batch | ||
walltime: "00:01:00" | ||
workflow: | ||
attrs: {realtime: false, scheduler: slurm} | ||
cycledef: | ||
- attrs: {group: default} | ||
spec: 202507170000 202507170000 00:00:01 | ||
log: {value: "{{ 'RUNDIR' | env }}/log" } | ||
tasks: | ||
task_foo: | ||
<<: *common | ||
task_bar: | ||
<<: *common | ||
dependency: {taskdep: {attrs: {task: foo}}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
+ uw rocoto run --cycle 2025-07-17T00 --database db --task bar --workflow xml | ||
[2025-01-02T03:04:05] INFO Iterating workflow | ||
[2025-01-02T03:04:05] INFO Workflow status: | ||
[2025-01-02T03:04:05] INFO CYCLE TASK JOBID STATE EXIT STATUS TRIES DURATION | ||
[2025-01-02T03:04:05] INFO ================================================================================================================================ | ||
[2025-01-02T03:04:05] INFO 202507170000 foo druby://10.178.9.5:36657 SUBMITTING - 0 0.0 | ||
[2025-01-02T03:04:05] INFO 202507170000 bar - - - - - | ||
[2025-01-02T03:04:05] INFO Iterating workflow | ||
[2025-01-02T03:04:05] INFO Rocoto task 'bar' for cycle 2025-07-17 00:00:00: SUBMITTING | ||
[2025-01-02T03:04:05] INFO Iterating workflow | ||
[2025-01-02T03:04:05] INFO Rocoto task 'bar' for cycle 2025-07-17 00:00:00: SUCCEEDED | ||
+ uw rocoto run --cycle 2025-07-17T00 --database db --task bar --workflow xml | ||
[2025-01-02T03:04:05] INFO Rocoto task 'bar' for cycle 2025-07-17 00:00:00: SUCCEEDED |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export RUNDIR=$(readlink -f $(mktemp -d -p $(dirname $0))) | ||
uw rocoto realize -c foobar.yaml >$RUNDIR/xml 2>/dev/null | ||
for invocation in 1 2; do ( | ||
cd $RUNDIR | ||
set -x | ||
uw rocoto run --cycle 2025-07-17T00 --database db --task bar --workflow xml | ||
) | ||
done | ||
rm -rf $RUNDIR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
+ uw rocoto run --cycle 2025-07-17T00 --database db --task foo --workflow xml | ||
[2025-01-02T03:04:05] INFO Iterating workflow | ||
[2025-01-02T03:04:05] INFO Rocoto task 'foo' for cycle 2025-07-17 00:00:00: SUBMITTING | ||
[2025-01-02T03:04:05] INFO Iterating workflow | ||
[2025-01-02T03:04:05] INFO Rocoto task 'foo' for cycle 2025-07-17 00:00:00: SUCCEEDED | ||
+ uw rocoto run --cycle 2025-07-17T00 --database db --task foo --workflow xml | ||
[2025-01-02T03:04:05] INFO Rocoto task 'foo' for cycle 2025-07-17 00:00:00: SUCCEEDED |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export RUNDIR=$(readlink -f $(mktemp -d -p $(dirname $0))) | ||
uw rocoto realize -c foobar.yaml >$RUNDIR/xml 2>/dev/null | ||
for invocation in 1 2; do ( | ||
cd $RUNDIR | ||
set -x | ||
uw rocoto run --cycle 2025-07-17T00 --database db --task foo --workflow xml | ||
) | ||
done | ||
rm -rf $RUNDIR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
uw rocoto run --help |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
usage: uw rocoto run [--cycle CYCLE] --database DATABASE --task TASK | ||
--workflow WORKFLOW [-h] [--version] [--rate SECONDS] | ||
[--quiet] [--verbose] | ||
|
||
Run a Rocoto workflow | ||
|
||
Required arguments: | ||
--cycle CYCLE | ||
The cycle in ISO8601 format (e.g. yyyy-mm-ddThh) | ||
--database DATABASE, -d DATABASE | ||
The Rocoto database file | ||
--task TASK | ||
Task to execute | ||
--workflow WORKFLOW, -w WORKFLOW | ||
The Rocoto XML file | ||
|
||
Optional arguments: | ||
-h, --help | ||
Show help and exit | ||
--version | ||
Show version info and exit | ||
--rate SECONDS, -r SECONDS | ||
Delay between workflow iterations (default: 10) | ||
--quiet, -q | ||
Print no logging messages | ||
--verbose, -v | ||
Print all logging messages |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.