aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-11-02tests: Add input-output-parameters.cwl.Arun Isaac
This is a follow-up to 0b359cf2c32cde81b4311d55273c8f6c14ca6b93 where this file should have been included. * tests/input-output-parameters.cwl: New file. * Makefile.am (EXTRA_DIST): Register it.
2021-11-02ccwl: Support external CWL workflows.Arun Isaac
* ccwl/ccwl.scm: Import (yaml). Export cwl-workflow?, cwl-workflow, cwl-workflow-file, cwl-workflow-inputs and cwl-workflow-outputs. (<cwl-workflow>): New type. (cwl-workflow, function-input-keys, function-outputs, function-object): New functions. (command-input-keys, command-object): Delete functions. (collect-steps): Replace command-object with function-object, command-input-keys with function-input-keys and command-outputs with function-outputs. * ccwl/cwl.scm (workflow->cwl-scm): Handle <cwl-workflow> objects. * tests/ccwl.scm ("read all forms of inputs and outputs from a CWL workflow"): New test. * guix.scm: Import (gnu packages guile-xyz) and (guix utils). (guile-libyaml): New variable. (ccwl)[inputs]: Add guile-libyaml.
2021-11-02guix.scm: Define ccwl as a separate variable.Arun Isaac
This make it easier to refer to it in the changelog. * guix.scm (ccwl): New variable. Return ccwl.
2021-11-02ccwl: Rename graphviz to dot.Arun Isaac
What we call "graphviz syntax" is actually the "graphviz dot language". Rename accordingly. * ccwl/graphviz.scm (workflow->graphviz): Rename to workflow->dot. Call graph->dot instead of graph->graphviz. (escape-id): Update docstring to mention dot. (graph->graphviz): Rename to graph->dot. Update docstring to mention dot. * scripts/ccwl.in (main): Accept --to=dot instead of --to=graphviz. Update --help usage information. * Makefile.am (%.dot): Pass --to=dot instead of --to=graphviz.
2021-10-19configure: Warn if emacs is not found.Arun Isaac
* configure.ac (OPTIONAL_PROGRAM): New macro. Use OPTIONAL_PROGRAM to check for emacs.
2021-10-19configure: Error out if required programs are not found.Arun Isaac
* configure.ac (CHECK_FOR_PROGRAM, REQUIRED_PROGRAM): New macros. Use REQUIRED_PROGRAM to check for dot, cwltool and skribilo.
2021-10-19guix.scm: Use git-predicate from (guix git-download).Arun Isaac
* guix.scm: Do not import (srfi srfi-1), (srfi srfi-26), (ice-9 match), (ice-9 popen), (ice-9 rdelim) and (guix build utils). Import (guix git-download). (git-file?): Delete function. Use git-predicate from (guix git-download) instead of git-file?.
2021-10-18doc: Say that inputs, not workflow inputs, come into pipe and tee.Arun Isaac
Workflow inputs are now global. It is misleading to say that they come into the first expression, namely pipe and tee, in these examples. * doc/ccwl.skb (Tutorial)[Workflow with multiple steps]: Say that inputs, not workflow inputs, come into pipe and tee.
2021-10-18ccwl: Fix indentation and paragraph filling.Arun Isaac
* ccwl/ccwl.scm (collect-steps): Fix indentation. (key->output): Fill paragraph.
2021-10-18ccwl: Implement rename to rename keys between steps.Arun Isaac
* ccwl/ccwl.scm (collect-steps): Implement rename to rename keys between steps.
2021-10-18ccwl: Improve comment describing handling of single input commands.Arun Isaac
* ccwl/ccwl.scm (collect-steps): Improve comment describing handling of single input commands. Mention that it applies only when no inputs are passed to it.
2021-10-18ccwl: Add setter for name field of <key> type.Arun Isaac
* ccwl/ccwl.scm (<key>): Add setter set-key-name.
2021-10-18ccwl: Separate ccwl key from CWL input/output id.Arun Isaac
* ccwl/ccwl.scm (<key>): Add cwl-id field. (key): Initialize cwl-id field. (key->output): Match the cwl-id of keys to the id of outputs, instead of matching the name of keys to the id of outputs. (cwl-key-address): Use the cwl-id of keys when outputting to CWL.
2021-10-12tests: Fix quoting of type.Arun Isaac
* tests/ccwl.scm ("stdin input should not have inputBinding"): Fix quoting of type File.
2021-10-12Makefile: Use ccwl to generate graphviz graph.Arun Isaac
* Makefile.am (%.dot): Use ccwl to build %.dot from %.scm instead of cwltool to build %.dot from %.cwl.
2021-10-12scripts: Allow compiling to graphviz.Arun Isaac
* scripts/ccwl.in: Import (ccwl graphviz). (main): Implement the --to option.
2021-10-12scripts: Print usage information on --help and incorrect usage.Arun Isaac
* scripts/ccwl.in: Import (srfi srfi-28). (invalid-operand): New function. (%help-option): New variable. (main): Print usage information on --help and incorrect usage.
2021-10-12scripts: Use args-fold.Arun Isaac
* scripts/ccwl.in: Import (srfi srfi-37). (invalid-option): New function. (main): Use args-fold to extract source filename.
2021-10-12scripts: Wrap main body in function.Arun Isaac
This makes it easier to record changes in the changelog of commit messages. * scripts/ccwl.in: Invoke main. (main): New function.
2021-10-12ccwl: Implement compiling to graphviz.Arun Isaac
* ccwl/yaml.scm (indent-level): Import (ccwl utils). Move to ... * ccwl/utils.scm (indent-level): ... here. Export indent-level. * ccwl/graphviz.scm: New file. * Makefile.am (SOURCES): Register it.
2021-10-11ccwl: Remove unused invoke-command function.Arun Isaac
* ccwl/ccwl.scm (invoke-command): Delete function.
2021-10-11ccwl: Factorize out CWL generation code to separate file.Arun Isaac
This factorization is required to support other compilation targets such as graphviz, bash, scheme, etc. * ccwl/cwl.scm: New file. * Makefile.am (SOURCES): Register it. * ccwl/ccwl.scm (ccwl): Export command?, command-inputs, command-outputs, command-args, command-stdin, command-other, workflow?, workflow-steps, workflow-inputs, workflow-outputs, workflow-other, input?, input-id, input-type, input-label, input-default, input-position, input-prefix, input-other, output?, output-id, output-type, output-binding, output-source, output-other, step?, step-id, step-run, step-in, step-out, unspecified-default?. (<workflow>): New type. (filter-alist): Move to cwl.scm. (make-workflow): Refactor into workflow->cwl-scm in cwl.scm. (output->cwl): Move to cwl.scm as output->cwl-scm. (command->cwl): Move to cwl.scm as command->cwl-scm. (workflow-steps): Rename to collect-steps. Clarify docstring. (workflow): Use collect-steps instead of workflow-steps. Explicitly pass empty list as other argument of make-workflow. Add TODO note to implement it properly. * scripts/ccwl.in: Import (ccwl cwl) instead of (ccwl yaml). Use workflow->cwl instead of scm->yaml. * tests/ccwl.scm ("stdin input should not have inputBinding"): Use command->cwl-scm from (ccwl cwl) instead of command->cwl from (ccwl ccwl).
2021-10-11ccwl: Remove unused write-cwl function.Arun Isaac
* ccwl/ccwl.scm: Do not export write-cwl. (write-cwl): Delete function.
2021-10-07ccwl: Pass workflow inputs through every command.Arun Isaac
We pass workflow inputs through all commands and constructs (pipe, tee, etc.). Thus, these parameters are globally visible to all steps, and are a kind of "global variable". * ccwl/ccwl.scm (workflow-steps): Pass to the output, input keys that correspond to workflow inputs.
2021-10-06ccwl: Fix the docstring of workflow-steps.Arun Isaac
Before this commit, the docstring of workflow-steps did not correctly describe its function. * ccwl/ccwl.scm (workflow-steps): Fix docstring.
2021-10-04ccwl: Quote source code in error messages.Arun Isaac
This makes it easier to distinct source code from the regular text of the error messages. * ccwl/ccwl.scm (workflow-steps): Quote source code in error messages.
2021-10-04ccwl: Support #:allow-other-keys in lambda** and syntax-lambda**.Arun Isaac
* ccwl/utils.scm (lambda**): Support #:allow-other-keys. Update docstring. (syntax-lambda**): Update docstring. * tests/utils.scm ("Allow other keys in lambda**", "Allow other keys in syntax-lambda**"): New tests.
2021-10-04ccwl: Error out on invalid keywords to lambda**.Arun Isaac
* ccwl/utils.scm (lambda**): Error out on invalid keywords (that is, keywords other than #:key, #:key* and #:allow-other-keys). * tests/utils.scm ("lambda** should error out on unrecognized keywords in arguments"): New test.
2021-10-04tests: Remove stray syntax-lambda** form.Arun Isaac
* tests/utils.scm: Remove stray syntax-lambda** form.
2021-10-04Revert "In pipe, pass through input keys to all expressions."Arun Isaac
This reverts commit 35bcaaa67efbe9b60e69b0f7c17acc186c74e7c3. This was not such a good idea. It is better to introduce the notion of global parameters.
2021-10-04website: Upcase SVG in comment.Arun Isaac
* website/style.css (object): Upcase SVG in comment.
2021-09-29README: Add a Download section using a dynamic block.Arun Isaac
In addition, we link to the GitHub repo in this new Download section rather than in the Contributing section. * README.org (download): Add dynamic block. (Contributing): Delete github-link dynamic block. * build-aux/build-home-page.el (org-dblock-write:github-link): Delete function. (org-dblock-write:download): New function.
2021-09-29README: Add GitHub link using an org dynamic block.Arun Isaac
* README.org (Contributing): Add github-link dynamic block. * build-aux/build-home-page.el (org-dblock-write:github-link): New function. (build-website): Update all org dynamic blocks. Do not insert GitHub link using `search-forward' and `insert'.
2021-09-29Makefile: Record dependency on build-home-page.el.Arun Isaac
* Makefile.am (website/index.html): Depend on build-aux/build-home-page.el.
2021-08-17build-aux: Remove redundant beginning-of-line.Arun Isaac
* build-aux/build-home-page.el (build-website): Remove redundant beginning-of-line.
2021-08-17build-aux: Link to GitHub repo on website.Arun Isaac
We programmatically add a link to the GitHub repo before building the website. This way, the GitHub link will appear only on the website, and not on the README.org rendered on GitHub. * build-aux/build-home-page.el (build-website): Add a link to the GitHub repo before building the website.
2021-08-17ccwl: Define output objects using a macro instead of a function.Arun Isaac
This allows us to do sophisticated syntax checking at an early stage, very close to the user interface. That way error messages from ccwl will make a lot more sense. * ccwl/ccwl.scm (output): Re-implement as macro. (command): Use the new macro interface. * doc/capture-output-file-with-parameter-reference.scm, doc/capture-output-file.scm, doc/capture-stdout.scm, doc/checksum.scm, doc/decompress-compile-run.scm: Use new quoting syntax for output types.
2021-08-17build-aux: Preserve only the LIBRARY_PATH environment in cwltool runs.Arun Isaac
* build-aux/generate-cwl-output.sh.in: Preserve only the LIBRARY_PATH environment variable.
2021-08-16Makefile: Generate sample output when building documentation.Arun Isaac
* Makefile.am (CLEANFILES): Add doc/*.out. (CLEAN_DIRECTORIES): Add doc/cwl-output. (GENERATE_CWL_OUTPUT): New variable. (doc/capture-output-file.out, doc/capture-output-file-with-parameter-reference.out, doc/capture-stdout.out, doc/checksum.out, doc/decompress-compile-run.out, doc/hello-world.out, doc/pass-stdin.out, doc/hello.tar.out): New targets. * doc/capture-output-file-with-parameter-reference.out, doc/capture-output-file.out, doc/capture-stdout.out, doc/checksum.out, doc/decompress-compile-run.out, doc/hello-world.out, doc/hello.tar.out, doc/pass-stdin.out: Delete files. * build-aux/generate-cwl-output.sh.in, doc/hello.c.gz, doc/hello.tar, doc/hello.txt: New files. * configure.ac: Configure build-aux/generate-cwl-output.sh. * doc/ccwl.skb (Tutorial)[Passing input into the standard input stream of a command]: Replace file "foo" with "hello.txt". * .gitignore: Add build-aux/generate-cwl-output.sh, doc/*.out and doc/cwl-output.
2021-08-16Makefile: Clean dot files correctly.Arun Isaac
* Makefile.am (CLEANFILES): Clean *.dot, not %.dot.
2021-08-16Makefile: Allow tabs when editing in Emacs.Arun Isaac
* Makefile.am: Set indent-tabs-mode to t.
2021-08-16ccwl: Define input objects using a macro instead of a function.Arun Isaac
This allows us to do sophisticated syntax checking at an early stage, very close to the user interface. That way error messages from ccwl will make a lot more sense. * ccwl/ccwl.scm (input): Re-implement as macro. (<input>): Add new functional setters set-input-position and set-input-prefix. (input-spec-id, run-arg-position, run-arg-prefix): New functions. (command, workflow): Use the new macro interface. * doc/capture-output-file-with-parameter-reference.scm, doc/capture-output-file.scm, doc/capture-stdout.scm, doc/checksum.scm, doc/decompress-compile-run.scm, doc/hello-world.scm, doc/pass-stdin.scm: Use new quoting syntax for input types.
2021-07-27ccwl: Make syntax-lambda** more like lambda**.Arun Isaac
I have tripped up several times on the differences between lambda** and syntax-lambda**. No longer! Making syntax-lambda** as close as possible to lambda** makes the code much more readable and align better with common sense. * ccwl/utils.scm (syntax-lambda**): Do not ignore the first identifier. Accept multiple values as arguments, not a single syntax object. * ccwl/ccwl.scm (command): Update use of syntax-lambda**. * tests/utils.scm ("syntax-lambda**", "syntax-lambda** with default values"): Update tests.
2021-07-27build-aux: Use #t as the expected value for test-assert tests.Arun Isaac
* build-aux/test-driver.scm.in: Import (ice-9 match). (my-gnu-runner): Use #t as the expected value for test-assert tests.
2021-07-20ccwl: Do not specify '() as the default value for n-ary arguments.Arun Isaac
Specifying '() as the default value for n-ary arguments is now equivalent to specifying '(()) as the default value. This is wrong. * ccwl/ccwl.scm (command): Do not explicitly specify the emtpy list as the default value for n-ary arguments.
2021-07-20ccwl: Set default value of lambda** n-ary arguments to '().Arun Isaac
* ccwl/utils.scm (lambda**): Set default value of lambda** n-ary arguments to the empty list. Document this in the docstring. * tests/utils.scm ("default value of lambda** unary argument should be #f", "default value of lambda** n-ary argument should be the empty list"): New tests.
2021-07-20ccwl: Document syntax-lambda** support for default arguments.Arun Isaac
* ccwl/utils.scm (syntax-lambda**): Add example to docstring documenting support for default arguments. * tests/utils.scm ("syntax-lambda** with default values"): New test.
2021-07-20ccwl: Clarify difference between and lambda** and syntax-lambda**.Arun Isaac
* ccwl/utils.scm (syntax-lambda**): Clarify difference between and lambda** and syntax-lambda**.
2021-07-20ccwl: Support default values for arguments in lambda**.Arun Isaac
* ccwl/utils.scm (lambda**): Support default values for arguments, both unary and n-ary. * tests/utils.scm ("lambda** with default values"): New test.
2021-07-20tests: Add tests for ccwl/utils.scm.Arun Isaac
* tests/utils.scm: New file. * Makefile.am (SCM_TESTS): Register it.