aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
30 hoursslurm-api: Bind return value of slurm-http-get in the state monad.Arun Isaac
* ravanan/slurm-api.scm (job-state): Bind return value of slurm-http-get in the state monad.
31 hoursreader: Normalize File array type formals too.Arun Isaac
* ravanan/reader.scm: Import (ravanan work types). (some-file-type?): New function. (normalize-formal-input, normalize-formal-output): Normalize File array type formals too. * tests/reader.scm: Import (srfi srfi-1) and (ice-9 match). (normalize-formal-input, normalize-formal-output): New variables. (json=?): New function. ("Normalize File type formal input", "Normalize File array type formal input", "Normalize array of File arrays type formal input", "Normalize File type formal output", "Normalize File array type formal output", "Normalize array of File arrays type formal output"): New tests.
32 hoursreader: Promote normalize functions to top level.Arun Isaac
It is easier to test top-level functions. * ravanan/reader.scm (normalize-workflow)[normalize-secondary-files, normalize-formal-input, normalize-formal-output, normalize-base-command, normalize-arguments, normalize-steps]: Promote to top level.
2 daysworkflow: Return correct updated state when polling list states.Arun Isaac
We were returning the original input state. That was obviously a catastrophe! I have spent the better part of the day debugging this. I am tired. * ravanan/workflow.scm (workflow-scheduler)[poll]: Return correct updated state when polling list states.
3 dayscommand-line-tool: Write output JSON atomically to the store.Arun Isaac
* ravanan/command-line-tool.scm (run-command-line-tool, build-command-line-tool-script): Write output JSON atomically to the store.
3 dayswork/utils: Add call-with-atomic-output-file.Arun Isaac
* ravanan/work/utils.scm: Import (srfi srfi-71), (system foreign) and (system foreign-library). (fsync): New function. (call-with-atomic-output-file): New public function.
3 daysutils: Delete unused call-with-temporary-file.Arun Isaac
* ravanan/utils.scm (call-with-temporary-file): Delete function.
3 dayspropnet: Make interface state-monadic.Arun Isaac
* ravanan/job-state.scm (job-state-status): Return a state-monadic value. * ravanan/propnet.scm: Import (srfi srfi-26). (schedule-propnet, poll-propnet, capture-propnet-output): Return a state-monadic value. * ravanan/workflow.scm (workflow-scheduler)[schedule, poll, capture-output]: Return a state-monadic value. (run-workflow): Accept state-monadic values from schedule, poll and capture-output.
3 daysworkflow: Use lists to represent state of scatter steps.Arun Isaac
Lists are more convenient than vectors, and all the more so when dealing with the state monad. * ravanan/job-state.scm: Import (srfi srfi-1). Do not import (ravanan work vectors). (job-state-status): Use lists instead of vectors to represent state of scatter steps. * ravanan/workflow.scm (workflow-scheduler)[schedule, poll, capture-output]: Use lists instead of vectors to represent state of scatter steps. (maybe-vector?): Delete function. (maybe-list?): New function. (merge-values): Support merging lists instead of vectors.
3 dayspropnet: Introduce <state+status> objects for polling.Arun Isaac
Let pollers return <state+status> objects instead of two separate values. <state+status> objects are essentially named 2-tuples. This will be more convenient than multiple values when dealing with the state monad. * ravanan/propnet.scm (<state+status>): New record type. (poll-propnet): Accept and return <state+status> objects. * ravanan/workflow.scm (workflow-scheduler)[poll]: Accept and return <state+status> objects. (run-workflow): Accept <state+status> objects from poll.
3 daysjob-state: Do not allow updating of low-level job-state objects.Arun Isaac
Low-level job-state objects tied to the batch system (such as those that represent single-machine and slurm-api jobs) never get updated. So, there is no point permitting it. * ravanan/job-state.scm (job-state-status): Return only the job status, not the updated job state. * ravanan/workflow.scm (workflow-scheduler)[poll]: Accept only the job status, not the updated job state, from job-state-status. * ravanan/workflow.scm (<command-line-tool-state>)[job-state]: Remove setter.
3 daysworkflow: Return state of scheduled jobs as a state-monadic value.Arun Isaac
* ravanan/command-line-tool.scm (run-command-line-tool): Return state of scheduled jobs as a state-monadic value. * ravanan/workflow.scm (workflow-scheduler)[schedule]: Return state of scheduled jobs as a state-monadic value. (run-workflow): Run state of scheduled workflow in the state monad. * ravanan/propnet.scm (poll-propnet): Run state of scheduled jobs in the state monad. [schedule-propagators]: New function.
4 dayssingle-machine: Make interface state-monadic.Arun Isaac
* ravanan/single-machine.scm: Import (ravanan work monads). (submit-job): Convert to a state-monadic function. * ravanan/command-line-tool.scm (run-command-line-tool): Run state-monadic return value from single-machine:submit-job.
4 daysslurm: Make interface state-monadic.Arun Isaac
* ravanan/slurm-api.scm: Import (ravanan work monads). (slurm-http-request, slurm-http-get, slurm-http-post, submit-job, job-state): Convert to state-monadic functions. * ravanan/command-line-tool.scm (run-command-line-tool): Update use of submit-job. * ravanan/job-state.scm: Import (ravanan work monads). (job-state-status): Update use of job-state.
4 dayspropnet: Schedule all propagators from inbox in a single step.Arun Isaac
There is no value in making the loop recursion explicit. A single append-map call is clearer. * ravanan/propnet.scm (poll-propnet): Schedule all propagators from inbox in a single step.
4 dayssingle-machine: Move single machine batch system to separate module.Arun Isaac
* ravanan/command-line-tool.scm: Import (ravanan single-machine). Import (ravanan slurm-api) with slurm: prefix. (run-command-line-tool): Call single-machine:submit-job. Prefix submit-job with slurm:. * ravanan/single-machine.scm: New file.
4 daysmonads: Rename bindings to other-bindings in mlet*.Arun Isaac
other-bindings is a more descriptive name. * ravanan/work/monads.scm (mlet*): Rename bindings to other-bindings.
4 daysmonads: Re-indent mlet*.Arun Isaac
* ravanan/work/monads.scm (mlet*): Re-indent.
4 daysmonads: Add mappend-map.Arun Isaac
* ravanan/work/monads.scm (mappend-map): New function. (state-append-map): New public function.
4 daysmonads: Add mmap.Arun Isaac
* ravanan/work/monads.scm (mmap): New function. (state-map): New public function.
5 daysmonads: Add sequence.Arun Isaac
* ravanan/work/monads.scm (sequence): New function. (state-sequence): New public function.
5 daysmonads: Implement the state monad.Arun Isaac
* ravanan/work/monads.scm (<mstate>): New record type. (state-bind, current-state, set-current-state, run-with-state): New public functions. (state-return, state-let*, state-begin): New public macros. * ravanan/command-line-tool.scm: Be selective to avoid importing run-with-state from (guix monads). * .dir-locals.el (scheme-mode): Indent state-let* correctly.
5 daysmonads: Add mbegin.Arun Isaac
* ravanan/work/monads.scm (mbegin): New macro.
5 daysmonads: Do not export maybe-monad.Arun Isaac
* ravanan/work/monads.scm: Do not export maybe-monad.
5 dayscommand-line-tool: Re-indent run-command-line-tool.Arun Isaac
* ravanan/command-line-tool.scm (run-command-line-tool): Re-indent.
2025-01-07guix: Use %default-gnu-imported-modules.Arun Isaac
%gnu-build-system-modules is deprecated. * .guix/ravanan-package.scm (ravanan)[arguments]: Replace %gnu-build-system-modules with %default-gnu-imported-modules.
2025-01-07guix: Add NODE makeflag.Arun Isaac
* .guix/ravanan-package.scm (ravanan)[arguments]: Add NODE makeflag.
2025-01-07guix: Depend on guile-json-4.Arun Isaac
* .guix/ravanan-package.scm: Import guile-json-4 from (gnu packages guile). (ravanan)[inputs]: Add guile-json-4.
2024-12-06dir-locals: Indent call-with-inferior correctly.Arun Isaac
* .dir-locals.el (scheme-mode): Indent call-with-inferior correctly.
2024-12-05bin: Do not specify the default output port unnecessarily.Arun Isaac
* bin/ravanan (main): Do not specify the default (current-output-port).
2024-12-05bin: Add --output-directory argument.Arun Isaac
* bin/ravanan: Import (ravanan work utils). (%options): Add --output-directory. (print-usage): Document it. (symlink-to-output-directory): New function. (main): Symlink to output directory if it is specified.
2024-12-04bin: Indicate that the --store argument was not specified.Arun Isaac
* bin/ravanan (main): Indicate specifically that the --store argument was not specified.
2024-12-04bin: Indicate that the --scratch argument was not specified.Arun Isaac
* bin/ravanan (main): Indicate specifically that the --scratch argument was not specified.
2024-12-04bin: Indicate that the --slurm-jwt argument was not specified.Arun Isaac
* bin/ravanan (main): Indicate specifically that the --slurm-jwt argument was not specified.
2024-12-04bin: Add --version flag.Arun Isaac
* ravanan/config.scm.in (%project, %version): New variables. * Makefile (version): New variable. (%.scm): Substitute %project and %version too. * bin/ravanan: Import (ravanan config). (%options): Add --version. (print-usage): Document it. (main): Implement it.
2024-11-06command-line-tool: Bubble up manifest file errors to the top level.Arun Isaac
* ravanan/command-line-tool.scm: Import (rnrs conditions) and (rnrs exceptions). (&manifest-file-error): New condition type. (load-manifest): Raise &manifest-file-error when loading the manifest file fails. * bin/ravanan: Import (rnrs exceptions) and (ravanan command-line-tool). (main): Handle manifest file errors bubbled up from lower down the stack.
2024-11-06bin: Remove default Guix manifest.Arun Isaac
* bin/ravanan (main): Remove default Guix manifest.
2024-11-06command-line-tool: Support packages in SoftwareRequirement.Arun Isaac
* ravanan/command-line-tool.scm: Import (gnu packages). (specifications->environment): New function. (build-command-line-tool-script)[software-package->package-specification]: New function. Build environment from packages if specified.
2024-11-06command-line-tool: Allow processing manifest objects without a file.Arun Isaac
* ravanan/command-line-tool.scm (manifest->environment): New function. (manifest-file->environment)[build-derivation]: Delete function. Call manifest->environment.
2024-11-06bin: Add --guix-channels command-line argument.Arun Isaac
* bin/ravanan: Import (guix channels). (%options): Add guix-channels. (print-usage): Document it. (main): Load channels from channels file if specified.
2024-11-06command-line-tool: Build manifest in Guix inferior with channels.Arun Isaac
* ravanan/command-line-tool.scm: Import (guix inferior). (call-with-inferior): New function. (run-command-line-tool): Accept channels argument and pass it on to build-command-line-tool-script. (build-command-line-tool-script): Accept channels argument and pass it on to manifest-file->environment. (manifest-file->environment): Accept channels argument. Build manifest in Guix inferior when channels is provided. * ravanan/workflow.scm (workflow-scheduler): Accept channels argument and pass it on to run-command-line-tool. (run-workflow): Accept channels argument and pass it on to workflow-scheduler. * bin/ravanan (main): Pass #f as channels to run-workflow.
2024-11-06command-line-tool: Convert manifest to environment in new function.Arun Isaac
* ravanan/command-line-tool.scm (manifest-file->environment): New function. (build-command-line-tool-script): Use manifest-file->environment.
2024-11-06utils: Generalize load-manifest and move to (ravanan utils).Arun Isaac
* ravanan/utils.scm: Import (ice-9 filesystem) and (ice-9 match). (load-script): New function. * ravanan/command-line-tool.scm: Import (ravanan utils). (load-manifest): Use load-script.
2024-11-06command-line-tool: Implement WorkReuse.Arun Isaac
* ravanan/command-line-tool.scm (%command-line-tool-supported-requirements): Add WorkReuse. * ravanan/command-line-tool.scm (build-command-line-tool-script): Implement WorkReuse.
2024-11-06command-line-tool: Fit Guix manifest into SoftwareRequirement.Arun Isaac
* ravanan/command-line-tool.scm (%command-line-tool-supported-requirements): Replace GuixManifestRequirement with SoftwareRequirement. (build-command-line-tool-script): Look for SoftwareRequirement instead of GuixManifestRequirement.
2024-11-06slurm-api: Find state of purged jobs.Arun Isaac
* ravanan/slurm-api.scm (job-state): Query slurmdb for jobs that have been purged from slurmctld's active memory.
2024-11-06slurm-api: Deduplicate API error checks.Arun Isaac
* ravanan/slurm-api.scm (check-api-error): New function. (submit-job, job-state): Use check-api-error.
2024-11-06slurm-api: Upgrade to API version 0.0.41.Arun Isaac
* ravanan/slurm-api.scm (submit-job, job-state): Upgrade to API version 0.0.41. (job-state): Handle job_state as a vector of strings.
2024-11-06README: Add ravanan pronunciation.Arun Isaac
* README.md: Add ravanan pronunciation.
2024-10-11workflow: Report file interning.Arun Isaac
* ravanan/workflow.scm (intern-file): Report file interning.