about summary refs log tree commit diff
path: root/src/config.rs
diff options
context:
space:
mode:
authorPjotr Prins <pjotr.public01@thebird.nl>2026-10-19 07:13:15 +0000
committerPjotr Prins <pjotr.public01@thebird.nl>2026-10-19 07:13:15 +0000
commitd504b5da9f5deeece9ba2ff4dcd8baf3dfa4dc32 (patch)
treeeaed193876da61ad7d6ae55906dccf4c6198c583 /src/config.rs
parent477294a2aa9ae7348137271b66831ac93a6149d6 (diff)
downloadgenenetwork4-gemma-cwl-parallel.tar.gz
gemma: compile ravanan's ccwl workflow on demand, don't check in the CWL gemma-cwl-parallel
gemma-loco.cwl was a generated artifact (ccwl compile's output), but
was being committed like hand-written source. Remove it, and have
compute_ravanan compile cwl/gemma/gemma-loco.scm to a throwaway CWL
file under its own cache dir on every call instead -- cheap (pure
macro expansion, no Guix build involved), so there's no real cost to
regenerating it fresh each time, and no risk of a stale compiled file
drifting from its ccwl source.

Config gains a ccwl_cmd knob (default "ccwl", resolved via PATH,
alongside ravanan_cmd/gemma_wrapper_cmd); gemma_ravanan_workflow now
names the .scm source, not a .cwl file. Verified end to end by running
the exact compile-then-run sequence compute_ravanan now performs
against the real ccwl/ravanan/gemma-wrapper binaries and the BXD
fixtures: same correctness and timings as before.
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs24
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");