aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-10-17ccwl: Support staging input files.Arun Isaac
* ccwl/ccwl.scm (<input>)[stage?]: New field. * ccwl/ccwl.scm (input): Add #:stage argument. * ccwl/cwl.scm (command->cwl-scm): Serialize requirements for staged inputs. * doc/ccwl.skb (Cookbook)[Stage input files]: New section. * tests/ccwl.scm ("inputs with an invalid #:stage? parameter must raise a &ccwl-violation condition"): New test.
2023-10-16ccwl: Add #:requirements argument to command.Arun Isaac
* ccwl/ccwl.scm (<command>)[requirements]: New field. (command): Add #:requirements argument. * ccwl/cwl.scm (command->cwl-scm): Serialize requirements.
2023-10-16ccwl: Support arbitrary expressions in #:other arguments.Arun Isaac
Support arbitrary expressions, that are actually evaluated, in #:other arguments. This means, among other things, that users will have to quote them correctly. While this complicates matters for novice users who may not be familiar with scheme, it is the most general and most flexible solution. In this particular case, we value flexibility over ease of use since #:other is an escape hatch and if users have to use it, ease of use has already been lost. * ccwl/ccwl.scm (input, output, command): Make #:other an actually evaluated unary argument.
2023-10-16ccwl: Error out on prefixes that are not strings.Arun Isaac
* ccwl/ccwl.scm (run-args): Error out on prefixes that are not strings. * tests/ccwl.scm ("command definitions with non-string prefixes in prefixed inputs must raise a &ccwl-violation condition"): New test.
2023-10-16ccwl: Flatten prefixed string arguments in command definitions.Arun Isaac
* ccwl/ccwl.scm (run-args): Flatten prefixed string arguments in command definitions. * tests/ccwl.scm ("tolerate prefixed string arguments in command definitions"): New test.
2023-10-16ccwl: Move run arguments construction to separate function.Arun Isaac
* ccwl/ccwl.scm (command): Move run arguments construction to ... (run-args): ... new function.
2023-10-16ccwl: Raise &ccwl-violation on invalid command #:run arguments.Arun Isaac
* ccwl/ccwl.scm (command): Raise &ccwl-violation on invalid command #:run arguments. * tests/ccwl.scm ("command definitions with invalid #:run arguments must raise a &ccwl-violation condition"): New test.
2023-10-16ccwl: Check if inputs in command definitions are defined.Arun Isaac
* ccwl/ccwl.scm (command): Check if inputs used in #:run arguments of command definitions are actually defined. * tests/ccwl.scm ("command definitions with undefined inputs in their #:run arguments must raise a &ccwl-violation condition", "command definitions with undefined prefix inputs in their #:run arguments must raise a &ccwl-violation condition"): New tests.
2023-10-16tests: Allow literal ints as arguments.Arun Isaac
* tests/ccwl.scm ("allow literal as arguments"): Rename to "allow literal strings as arguments". (print-int): New variable. ("allow literal ints as arguments"): New test.
2023-10-15ccwl: Make #:stderr and #:stdout first class parameters.Arun Isaac
#:stderr and #:stdout, especially #:stdout, are commonly required. They ought to be first class parameters and not tucked away into #:other. * ccwl/ccwl.scm (<command>)[stderr, stdout]: New fields. * ccwl/ccwl.scm (command): Accept #:stderr and #:stdout as first class parameters. * ccwl/cwl.scm (command->cwl-scm): Serialize stderr and stdout fields. * doc/capture-stdout.scm (print), doc/decompress-compile-run.scm (run), doc/checksum.scm (md5sum, sha1sum, sha256sum), doc/spell-check.scm (find-misspellings): Capture stdout in file. * doc/checksum.scm, doc/decompress-compile-run.scm: * doc/ccwl.skb (Tutorial)[Capturing the standard output stream of a command]: Document #:stdout first class parameter. * doc/ccwl.skb (Tutorial)[Workflow with multiple steps]: Capture stdout in explicitly named files. * tests/ccwl.scm ("commands with non-string #:stderr parameters must raise a &ccwl-violation condition", "commands with non-string #:stdout parameters must raise a &ccwl-violation condition"): New tests.
2023-10-14ccwl: Detect multiple expressions in workflow body.Arun Isaac
* ccwl/ccwl.scm (workflow): Detect multiple expressions in workflow body and raise an exception. * tests/ccwl.scm ("unrecognized workflow syntaxes must raise a &ccwl-violation condition"): Test for the formatted message too. ("multiple expressions in workflow body must raise a &ccwl-violation condition"): New test.
2023-10-14ccwl: Raise &ccwl-violation when workflow syntax is not recognized.Arun Isaac
* ccwl/ccwl.scm (workflow): Raise &ccwl-violation when workflow syntax is not recognized. * tests/ccwl.scm ("unrecognized workflow syntaxes must raise a &ccwl-violation condition"): New test.
2023-10-13tests: Raise a &ccwl-violation on unknown keys.Arun Isaac
* tests/ccwl.scm ("step supplied with an unknown key must raise a &ccwl-violation condition"): New test.
2023-10-13ccwl: Convert syntax to datum before checking if it is a symbol.Arun Isaac
* ccwl/ccwl.scm (collect-steps): Convert syntax to datum before checking if it is a symbol.
2023-10-09ccwl: Deprecate auto-connection of single input commands.Arun Isaac
This seems like functionality that will be hard to support and will almost never be used in a real-world workflow. This feature is not even advertised in the manual. It is best to silently deprecate this feature now. * ccwl/ccwl.scm (collect-steps): Deprecate auto-connection of single input commands.
2023-10-09ccwl: Allow literals as arguments.Arun Isaac
* ccwl/ccwl.scm (<input>)[set-input-default]: New setter. * ccwl/ccwl.scm (<command>)[set-command-inputs]: Add setter. * ccwl/ccwl.scm (apply-partially): New function. (collect-steps): Support literal strings as arguments. * tests/ccwl.scm ("allow literal strings as arguments"): New test. * .dir-locals.el (scheme-mode): Indent set-command-inputs and set-input-default.
2023-10-09tests: Catch expressions that don't raise exceptions.Arun Isaac
Many tests that use guard to catch and ensure that certain conditions are raised actually leak and let through cases where the expressions result in a truthy value. * tests/ccwl.scm ("input, when passed more than one positional argument, must raise a &ccwl-violation condition", "input, when passed an unrecognized keyword, must raise a &ccwl-violation condition", "input, when passed multiple arguments to a unary keyword, must raise a &ccwl-violation condition", "output, when passed more than one positional argument, must raise a &ccwl-violation condition", "output, when passed an unrecognized keyword, must raise a &ccwl-violation condition", "output, when passed multiple arguments to a unary keyword, must raise a &ccwl-violation condition", "command, when passed positional arguments, must raise a &ccwl-violation condition", "command, when passed an unrecognized keyword, must raise a &ccwl-violation condition", "command, when passed multiple arguments to a unary keyword, must raise a &ccwl-violation condition"): Catch expressions that don't raise exceptions.
2023-10-09ccwl: Error out if steps with expression commands have no identifier.Arun Isaac
* ccwl/ccwl.scm (collect-steps): Error out if steps with expressions that evaluate to commands have no identifier. * tests/ccwl.scm ("step with expression that evaluates to a command but without a step identifier must raise a &ccwl-violation condition"): New test.
2023-10-09ccwl: In macro expansion, use eval instead of module introspection.Arun Isaac
eval is not just more portable but also more flexible. It lets us allow steps with expressions that evaluate to commands. Sadly, we do not yet properly support commands defined in lexical scope. * ccwl/ccwl.scm (function-object): Use eval instead of module introspection. * tests/ccwl.scm ("allow steps with expressions that evaluate to commands"): New test.
2023-09-29ccwl: Comment on allowing default parameter values.Arun Isaac
* ccwl/ccwl.scm (collect-steps): Comment on allowing default parameter values. Remove TODO note.
2023-09-29ccwl: Allow steps with unspecified default arguments.Arun Isaac
* ccwl/ccwl.scm (function-inputs): New function. (function-input-keys): Use function-inputs. (collect-steps): Do not error out on steps with unspecified default arguments. * tests/ccwl.scm (print-with-default): New variable. ("allow steps with unspecified default arguments"): New test.
2023-09-28scripts: Raise exception when file does not return supported object.Arun Isaac
* scripts/ccwl (main): Raise exception when file returns neither workflow nor command.
2023-09-28scripts: Support returning command objects from ccwl files.Arun Isaac
* scripts/ccwl (main): Replace workflow->cwl and workflow->dot with workflow-or-command->cwl and workflow-or-command->dot.
2023-09-28graphviz: Add generic workflow or command serialization function.Arun Isaac
* ccwl/cwl.scm (workflow-or-command->dot): New public function.
2023-09-28graphviz: Add command to dot serialization function.Arun Isaac
* ccwl/graphviz.scm (step-node, inputs-cluster, outputs-cluster, command->graph): New functions. (workflow->graph): Use step-node, inputs-cluster and outputs-cluster. (command->dot): New public function.
2023-09-28cwl: Add generic workflow or command serialization function.Arun Isaac
* ccwl/cwl.scm (workflow-or-command->cwl): New public function.
2023-09-28cwl: Add command to CWL serialization function.Arun Isaac
* ccwl/cwl.scm (command->cwl): New public function.
2023-09-28scripts: Catch and report &formatted-message conditions.Arun Isaac
* scripts/ccwl (main): Catch and report &formatted-message conditions.
2023-09-28ui: Split out reporting of &formatted-message conditions.Arun Isaac
* ccwl/ui.scm (report-formatted-message): New public function. (report-ccwl-violation): Use report-formatted-message.
2023-09-20scripts: Ignore quit exceptions when requesting the user report bugs.Arun Isaac
* scripts/ccwl: Import (ice-9 exceptions). (main): Do not print backtrace or request the user to report a bug for quit exceptions.
2023-09-20scripts: Set scheme mode in Emacs.Arun Isaac
* scripts/ccwl: Set scheme mode in Emacs.
2023-09-20scripts: Catch uncaught exceptions and request the user report them.Arun Isaac
* scripts/ccwl (main): Catch uncaught exceptions and request the user report them to the issue tracker.
2023-09-20scripts: Allow script to be loaded without executing main.Arun Isaac
Call main from the shebang command instead of calling it directly. This allows us to run "guile -l scripts/ccwl" without actually running main. This seems to be important for Emacs Geiser as it freezes up without this fix. * scripts/ccwl: Call main from shebang. Do not call main directly. (main): Accept args as regular argument instead of as a rest argument.
2023-09-20ccwl: Add TODO to support commands in lexical scope.Arun Isaac
* ccwl/ccwl.scm (function-object): Add TODO note to support commands (that is, function objects) defined in lexical scope.
2023-09-20tests: Test that rename works even on a final workflow output.Arun Isaac
* tests/ccwl.scm (print): New variable. ("rename should work even on the final output of a workflow"): New test.
2023-09-19ccwl: Use key name for output.Arun Isaac
The key may have been renamed. So, the output should likewise be. * ccwl/ccwl.scm (key->output): Use key name for output.
2023-09-19ccwl: Add set-output-id setter.Arun Isaac
* ccwl/ccwl.scm (<output>)[id]: Add setter.
2023-07-08Make repository a guix channel.Arun Isaac
* .guix-authorizations, .guix-channel: New files. * guix.scm: Convert to a symlink pointing to .guix/ccwl-package.scm. Move original there. * .guix/ccwl-package.scm: Convert into a module with public packages.
2022-04-09website: Use Fira Code and Charter fonts.Arun Isaac
* Makefile (fonts): New variable. (website): Depend on website/fonts. (website/fonts): New target. (clean): Clean up website/fonts. * website/style.css (@font-face: Charter, @font-face: Fira Code Regular, @font-face: Fira Code SemiBold): New font faces. (body): Use 20px Charter font. (pre): Use 0.9em Fira Code font. (code, samp): Use 0.8em semi-bold Fira Code font.
2022-04-09doc: Add table of contents.Arun Isaac
* doc/ccwl.skb: Add table of contents.
2022-04-09scripts: Do not pass multiple arguments to env.Arun Isaac
* scripts/ccwl: Do not pass multiple arguments to env. Pass them through sh.
2022-04-09scripts: Do not auto-compile the ccwl script.Arun Isaac
* scripts/ccwl: Add --no-auto-compile to shebang.
2022-04-09Makefile: Compile scheme source code with auto-compile disabled.Arun Isaac
* Makefile (%.go): Set GUILE_AUTO_COMPILE=0.
2022-02-11README: Mention dependencies to build the manual.Arun Isaac
* README.org (Manually from source): Mention dependencies graphviz, cwltool and skribilo that are required to build the manual.
2022-02-11README: Remove deprecated bootstrap step from build instructions.Arun Isaac
In 670b0b68602288b44ad459230be4f701140bca66, we migrated away from the autotools build system and got rid of bootstrap.sh but forgot to update the build instructions. * README.org (Manually from source): Remove deprecated bootstrap step.
2022-02-05Makefile: Copy HTML manual to website.Arun Isaac
This was done correctly in the earlier autotools build system, but was missed out in the migration to hand-written Makefiles. * Makefile (website): Depend on website/manual/dev/en. (website/manual/dev/en): New target. (clean): Remove website/manual. Remove $(doc_html) recursively.
2022-01-19build-aux: Fix broken link to signing key.Arun Isaac
* build-aux/build-home-page.el (org-dblock-write:download): Fix broken link to signing key.
2022-01-16ccwl: Raise parameter errors in workflow steps as exceptions.Arun Isaac
* ccwl/ccwl.scm (collect-steps): Raise parameter errors in workflow steps as exceptions.
2022-01-16ccwl: Raise undefined ccwl command error as exception.Arun Isaac
* ccwl/ccwl.scm (collect-steps): Raise undefined ccwl command error as a &ccwl-violation condition.
2022-01-16ccwl: Raise exceptions on command syntax errors.Arun Isaac
* ccwl/ccwl.scm (command): Raise &ccwl-violation conditions on syntax errors. * tests/ccwl.scm ("command, when passed positional arguments, must raise a &ccwl-violation condition", "command, when passed an unrecognized keyword, must raise a &ccwl-violation condition", "command, when passed multiple arguments to a unary keyword, must raise a &ccwl-violation condition"): New tests.