diff options
Diffstat (limited to 'src/config.rs')
| -rw-r--r-- | src/config.rs | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/src/config.rs b/src/config.rs index fa8b610..e64f2ad 100644 --- a/src/config.rs +++ b/src/config.rs @@ -72,10 +72,17 @@ pub struct Config { /// (see src/gemma.rs's compute_ravanan). Defaults to "ravanan", /// resolved via PATH. pub ravanan_cmd: String, - /// Path to the CWL workflow POST /compute/gemma/ravanan runs under - /// ravanan. Defaults to that path relative to the working - /// directory the server is started from, same convention as - /// `rqtl_wrapper_path`. + /// The ccwl (https://ccwl.systemreboot.net/) executable used to + /// compile `gemma_ravanan_workflow` to CWL before each ravanan run + /// (see src/gemma.rs's compute_ravanan). Defaults to "ccwl", + /// resolved via PATH. + pub ccwl_cmd: String, + /// Path to the ccwl source POST /compute/gemma/ravanan compiles to + /// CWL and runs under ravanan. Not a CWL file itself -- the + /// compiled .cwl is a generated, throwaway artifact (written under + /// `ravanan_cache_dir` on every call), never checked into the repo. + /// Defaults to that path relative to the working directory the + /// server is started from, same convention as `rqtl_wrapper_path`. pub gemma_ravanan_workflow: String, /// Path to the Guix manifest ravanan resolves its jobs' commands /// against (its own --guix-manifest switch, required -- ravanan @@ -149,9 +156,10 @@ impl Config { .into_owned(), ); values.insert("RAVANAN_CMD".to_string(), "ravanan".to_string()); + values.insert("CCWL_CMD".to_string(), "ccwl".to_string()); values.insert( "GEMMA_RAVANAN_WORKFLOW".to_string(), - "cwl/gemma/gemma-loco.cwl".to_string(), + "cwl/gemma/gemma-loco.scm".to_string(), ); values.insert( "GEMMA_RAVANAN_MANIFEST".to_string(), @@ -203,6 +211,7 @@ impl Config { "GEMMA_WRAPPER_CMD", "GEMMA_CACHE_DIR", "RAVANAN_CMD", + "CCWL_CMD", "GEMMA_RAVANAN_WORKFLOW", "GEMMA_RAVANAN_MANIFEST", "RAVANAN_CACHE_DIR", @@ -237,6 +246,7 @@ impl Config { gemma_wrapper_cmd: values["GEMMA_WRAPPER_CMD"].clone(), gemma_cache_dir: values["GEMMA_CACHE_DIR"].clone(), ravanan_cmd: values["RAVANAN_CMD"].clone(), + ccwl_cmd: values["CCWL_CMD"].clone(), gemma_ravanan_workflow: values["GEMMA_RAVANAN_WORKFLOW"].clone(), gemma_ravanan_manifest: values["GEMMA_RAVANAN_MANIFEST"].clone(), ravanan_cache_dir: values["RAVANAN_CACHE_DIR"].clone(), @@ -315,6 +325,7 @@ mod tests { "GEMMA_WRAPPER_CMD", "GEMMA_CACHE_DIR", "RAVANAN_CMD", + "CCWL_CMD", "GEMMA_RAVANAN_WORKFLOW", "GEMMA_RAVANAN_MANIFEST", "RAVANAN_CACHE_DIR", @@ -332,7 +343,8 @@ mod tests { assert_eq!(config.gemma_wrapper_cmd, "gemma-wrapper"); assert!(config.gemma_cache_dir.ends_with("gn4-gemma")); assert_eq!(config.ravanan_cmd, "ravanan"); - assert_eq!(config.gemma_ravanan_workflow, "cwl/gemma/gemma-loco.cwl"); + assert_eq!(config.ccwl_cmd, "ccwl"); + assert_eq!(config.gemma_ravanan_workflow, "cwl/gemma/gemma-loco.scm"); assert_eq!(config.gemma_ravanan_manifest, "cwl/gemma/manifest.scm"); assert!(config.ravanan_cache_dir.ends_with("gn4-gemma-ravanan")); assert_eq!(config.rqtl_wrapper_path, "scripts/rqtl_wrapper.R"); |
