Reorganization of workflow repository #217
Replies: 4 comments 4 replies
|
tagging @dlebauer and @infotroph for the notification |
|
I think that this goes a long way to reducing redundancy, and associated maintenance and technical debt. Would you envision the examples include examples from other components of the project (e.g. downscaling, uncertainty, etc)? Or would the
I think to the extend that the examples should be run in order, it makes sense to use ordered numbers 01-single-site-almond, 02-multisite-almond, - .... etc. But we don't need to stick with the phased design of the implementation plan as a reference, especially since we aren't planning to have an example for each phase. |
|
This seems like broadly the right approach. As long as we're moving things I suggest aspiring to pull steps 1-3 out to common versions too. Entirely possible that will turn out to be more work than we want, but conceptually they serve similar purposes in each example and removing the truly repeated steps would make it much easier to follow what does change between examples. |
I'd say what's there now is more strictly ordered than is needed, especially because xml_build, IC_build, and met handling are all intentionally ~independent of each others' execution status. The unavoidable sequencing is basically:
|
Uh oh!
There was an error while loading. Please reload this page.
Proposal: Repository Reorganization — Workflow Directory + Examples + Unified Manifest
Current Structure
In the current structure, there is no plain "workflow" that can be run on a user's provided data. There are a set of workflows which are bound to specific analyses or 'phases' of development. These are useful, as they are examples of particular analyses, but we need to also have a more agnostic workflow set of scripts which can, in theory, be used to analyze a set of user-provided data resources.
For clarity, the current structure is as follows:
We will create a 'workflow' directory which holds the canonical methods needed to run an ensemble analysis. Separately, the existing 1a, 1b, 2a, 3a, etc workflows will be subsumed into an 'examples' directory.
The 'magic-ensemble' CLI will be augmented to have 'prepare' methods which prepare a run directory to support execution of each of these example workflows. The R scripts in the example workflows will be directly invoked by the CLI command such as
./magic-ensemble prepare-example-1a --config ./examples/1a_single_site/example_user_config.yaml.The CLI will require some modeling - there are paths in the manifest which utilize the current structure, and target scripts within the '2a_grass' directory. these will be updated to target the canonical script in the
workflowdirectory.Critically, the actual method for running ensembles will not be present in each workflow example directory. Those will be examples of different methods of data prep (primarily), and the actual execution of ensembles will run through
./workflow/04_run_model.RI wonder to what extent we need to retain the numbered steps, but i have left them in, in the current proposal.
I would like to also make sure we have solidified and well-labeled s3 data artifacts for each workflow.
I would also like to see if we can deprecate some of the ancillary files in the example directory: these should be minimal examples without artifacts from development cycles in them. In the first iteration, we'll move these directories over as a single lift.
Proposed Structure
Summarized changes:
1a,1b, and2amove underexamples/.workflow/directory holds the canonical data-agnostic versions of steps 00–03 (adapted from2a_grass) and step 04. This is the implementation that backs the bareprepare,get-demo-data, andrun-ensemblesverbs.workflow_manifest.yamlmoves intoworkflow/and expands to define all verbs:get-demo-data,prepare,prepare-example-1a,prepare-example-1b,prepare-example-2a, andrun-ensembles. The example-specific prepare verbs point at scripts in their respectiveexamples/subdirectory; all other verbs point atworkflow/.04_run_model.Ris removed from all example directories.run-ensemblesdelegates toworkflow/04_run_model.Rregardless of which prepare verb was used.example_user_config.yamlwith defaults appropriate to that example.What does not change:
tools/stays at the repo root.All reactions