From c5ed0a4cd157cde10b855447f2c2ee5bcf2f85a6 Mon Sep 17 00:00:00 2001 From: Robrecht Cannoodt Date: Thu, 30 Jul 2026 10:40:32 +0200 Subject: [PATCH] record the workflow commit in task_info.yaml --- CHANGELOG.md | 6 ++++++ src/workflows/run_benchmark/main.nf | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e2ec54e0..fd78e970 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # task_spatial_simulators dev +Minor changes: + - `run_benchmark`: write the commit the workflow ran from into `task_info.yaml`, + so a published result can be traced back to the code that produced it. Until + now `task_info.yaml` was a verbatim copy of `_viash.yaml`, whose `version` is + the revision (`build_main`) rather than a commit. + Bug fixes: - `downstream`: normalise the simulated dataset the same way as the real one, through a new `compute_logcounts()` helper. The simulated side used diff --git a/src/workflows/run_benchmark/main.nf b/src/workflows/run_benchmark/main.nf index cbfbd434..b634d763 100644 --- a/src/workflows/run_benchmark/main.nf +++ b/src/workflows/run_benchmark/main.nf @@ -165,7 +165,14 @@ workflow run_wf { def metric_configs_file = tempFile("metric_configs.yaml") metric_configs_file.write(metric_configs_yaml_blob) - def task_info_file = meta.resources_dir.resolve("_viash.yaml") + // store the task info in a file + def task_info = readYaml(meta.resources_dir.resolve("_viash.yaml")) + // commitId is null when nextflow runs from a local checkout instead of a revision + if (workflow.commitId) { + task_info.commit = workflow.commitId + } + def task_info_file = tempFile("task_info.yaml") + task_info_file.write(toYamlBlob(task_info)) // store the scores in a file def score_uns = states.collect{it.score_uns}