gwl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gwl-devel] merging “processes” and “restrictions”


From: zimoun
Subject: Re: [gwl-devel] merging “processes” and “restrictions”
Date: Mon, 21 Jan 2019 19:53:09 +0100

Hi Ricardo,


> This works now:

Awesome !!
Even if python and bash is less funny than cookie and fruits ;-)

>
> --8<---------------cut here---------------start------------->8---
> define-module : simple-wisp
>
> use-modules
>   gwl workflows
>   gwl processes
>   gwl sugar
>
> process: hello
>   package-inputs
>     list "hello"
>   synopsis "Run hello"
>   procedure '(system* "hello")
>
> process: python-test
>   package-inputs
>     list "python2"
>   data-inputs
>     list "sample.bam" "hg38.fa" "abc"
>   synopsis "Run Python"
>   description
>     . "Run Python and demonstrate that it can access process information via 
> environment variables."
>   procedure ## python
> import os
>
> def hello():
>   print "hello from python 2"
>   print os.environ["_GWL_PROCESS_DATA_INPUTS"]
>   print os.environ["_GWL_PROCESS_NAME"]
>
> hello()
> ##
>
> process: bash-test
>   package-inputs : list "bash"
>   synopsis "Run Bash"
>   description
>     . "Run Bash and demonstrate that it can access process information via 
> environment variables."
>   procedure ## /bin/bash -c
> echo "${_GWL_PROCESS_DATA_INPUTS}"
> echo "${_GWL_PROCESS_NAME}"
> ##
>
> workflow: simple-wisp
>   processes
>     graph
>       python-test -> hello
>       bash-test   -> hello
> --8<---------------cut here---------------end--------------->8---


How to I try that?


> With a little more macrology the “graph” call could disappear, but that
> would make it impossible to specify an adjacency list as a simple alist,
> which I’d like to keep supporting as it is useful when combining
> workflows.

I am not sure that `graph' should disappear.
Because it provides useful information when reading what is going on.

I mean if the aim of workflow is understandable from the graph and
then I can easily explain it to colleagues and/or collaborator.
For example, Bob writes processes and Alice writes the workflow based
on the description without diving in all the details to compose them.


Thank you for all your work!

Cheers,
simon



reply via email to

[Prev in Thread] Current Thread [Next in Thread]