diff options
author | Arun Isaac | 2025-06-05 23:46:12 +0100 |
---|---|---|
committer | Arun Isaac | 2025-06-26 14:50:28 +0100 |
commit | 93c590d1467f747c3845d95922b6f9b42c8bd92c (patch) | |
tree | 34971ddc451f7ab5f7a10e40c2113e96bbe21757 /COPYING | |
parent | fd46885b7c831e39c813d3e9709b6b218fd32d5c (diff) | |
download | ravanan-93c590d1467f747c3845d95922b6f9b42c8bd92c.tar.gz ravanan-93c590d1467f747c3845d95922b6f9b42c8bd92c.tar.lz ravanan-93c590d1467f747c3845d95922b6f9b42c8bd92c.zip |
command-line-tool: Build script without inputs.
We build the script using only the CommandLineTool workflow itself,
and not its inputs. We pass the inputs in through a WORKFLOW_INPUTS
environment variable. To maintain bullet-proof caching, we construct
ravanan store paths by hashing both the script and the inputs
together. This change paves the way to pre-building all scripts ahead
of time.
* ravanan/command-line-tool.scm (<command-line-binding>,
command-line-binding->args): Move to (ravanan work command-line-tool).
(run-command-line-tool): Do not pass inputs to
build-command-line-tool-script. Call step-store-files-directory
instead of script->store-files-directory, step-store-data-file instead
of script->store-data-file, step-store-stdout-file instead of
script->store-stdout-file and step-store-stderr-file instead of
script->store-stderr-file. Put inputs into job state objects. Pass
inputs to the script through the WORKFLOW_INPUTS environment variable.
(capture-command-line-tool-output): Accept inputs. Call
step-store-data-file instead of script->store-data-file and
step-store-files-directory instead of script->store-files-directory.
(copy-input-files-gexp): Delete function.
(build-command-line-tool-script): Do not accept inputs; get them from
the WORKFLOW_INPUTS environment variable.
[coerce-argument]: New function.
[run-command-gexp]: Build command inside the G-expression.
[gexp]{copy-input-files}: New function.
* ravanan/job-state.scm (<single-machine-job-state>)[inputs]: New
field.
* ravanan/job-state.scm (<slurm-job-state>)[inputs]: New field.
* ravanan/job-state.scm (job-state-inputs): New public function.
* ravanan/store.scm: Import (srfi srfi-71), (gcrypt hash) and (guix
build utils).
(sha1-hash-sexp): New function.
(script->store-files-directory, script->store-data-file,
script->store-stdout-file, script->store-stderr-file): Delete
functions.
(step-store-files-directory, step-store-data-file,
step-store-stdout-file, step-store-stderr-file): New public functions.
* ravanan/work/command-line-tool.scm: Import (srfi srfi-9 gnu)
and (ravanan work ui).
* ravanan/workflow.scm (&job-failure)[inputs]: New field.
* ravanan/workflow.scm (workflow-scheduler)[poll]: Put inputs into
&job-failure condition.
[capture-output]: Call step-store-stdout-file instead of
script->store-stdout-file and step-store-stderr-file instead of
script->store-stderr-file. Pass inputs to
capture-command-line-tool-output.
(run-workflow): Call step-store-stdout-file instead of
script->store-stdout-file and step-store-stderr-file instead of
script->store-stderr-file.
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions