Skip to content

Commit c5ed0a4

Browse files
committed
record the workflow commit in task_info.yaml
1 parent e7fd676 commit c5ed0a4

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# task_spatial_simulators dev
22

3+
Minor changes:
4+
- `run_benchmark`: write the commit the workflow ran from into `task_info.yaml`,
5+
so a published result can be traced back to the code that produced it. Until
6+
now `task_info.yaml` was a verbatim copy of `_viash.yaml`, whose `version` is
7+
the revision (`build_main`) rather than a commit.
8+
39
Bug fixes:
410
- `downstream`: normalise the simulated dataset the same way as the real one,
511
through a new `compute_logcounts()` helper. The simulated side used

src/workflows/run_benchmark/main.nf

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,14 @@ workflow run_wf {
165165
def metric_configs_file = tempFile("metric_configs.yaml")
166166
metric_configs_file.write(metric_configs_yaml_blob)
167167

168-
def task_info_file = meta.resources_dir.resolve("_viash.yaml")
168+
// store the task info in a file
169+
def task_info = readYaml(meta.resources_dir.resolve("_viash.yaml"))
170+
// commitId is null when nextflow runs from a local checkout instead of a revision
171+
if (workflow.commitId) {
172+
task_info.commit = workflow.commitId
173+
}
174+
def task_info_file = tempFile("task_info.yaml")
175+
task_info_file.write(toYamlBlob(task_info))
169176

170177
// store the scores in a file
171178
def score_uns = states.collect{it.score_uns}

0 commit comments

Comments
 (0)