diff options
| author | Pjotr Prins <pjotr.public01@thebird.nl> | 2026-10-19 07:13:15 +0000 |
|---|---|---|
| committer | Pjotr Prins <pjotr.public01@thebird.nl> | 2026-10-19 07:13:15 +0000 |
| commit | d504b5da9f5deeece9ba2ff4dcd8baf3dfa4dc32 (patch) | |
| tree | eaed193876da61ad7d6ae55906dccf4c6198c583 /tests | |
| parent | 477294a2aa9ae7348137271b66831ac93a6149d6 (diff) | |
| download | genenetwork4-d504b5da9f5deeece9ba2ff4dcd8baf3dfa4dc32.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 'tests')
| -rw-r--r-- | tests/gemma.rs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/gemma.rs b/tests/gemma.rs index ae1a3c1..7ce47e3 100644 --- a/tests/gemma.rs +++ b/tests/gemma.rs @@ -27,6 +27,17 @@ fn ravanan_available() -> bool { .is_ok() } +/// True only when ccwl is actually runnable. compute_ravanan compiles +/// cwl/gemma/gemma-loco.scm to CWL with it before every ravanan run. +/// ccwl has no top-level --version; "compile --help" is the cheapest +/// subcommand invocation that doesn't need a real source file. +fn ccwl_available() -> bool { + std::process::Command::new("ccwl") + .args(["compile", "--help"]) + .output() + .is_ok() +} + fn test_data_path(name: &str) -> String { format!("{}/tests/test_data/{name}", env!("CARGO_MANIFEST_DIR")) } @@ -180,9 +191,9 @@ async fn compute_gemma_maps_a_qtl_from_the_bxd_fixtures() { #[tokio::test] async fn compute_gemma_ravanan_maps_a_qtl_from_the_bxd_fixtures() { - if !ravanan_available() || !gemma_wrapper_available() { + if !ravanan_available() || !gemma_wrapper_available() || !ccwl_available() { eprintln!( - "skipping compute_gemma_ravanan_maps_a_qtl_from_the_bxd_fixtures: ravanan or gemma-wrapper not on PATH" + "skipping compute_gemma_ravanan_maps_a_qtl_from_the_bxd_fixtures: ravanan, gemma-wrapper or ccwl not on PATH" ); return; } |
