From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1glevF-0008IN-5Y for mharc-gwl-devel@gnu.org; Mon, 21 Jan 2019 14:07:49 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39097) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1glevD-000888-76 for gwl-devel@gnu.org; Mon, 21 Jan 2019 14:07:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1glehK-0003fW-TJ for gwl-devel@gnu.org; Mon, 21 Jan 2019 13:53:29 -0500 Received: from mail-qk1-x731.google.com ([2607:f8b0:4864:20::731]:43331) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1glehI-0003dW-Ev for gwl-devel@gnu.org; Mon, 21 Jan 2019 13:53:24 -0500 Received: by mail-qk1-x731.google.com with SMTP id z18so12837876qkj.10 for ; Mon, 21 Jan 2019 10:53:21 -0800 (PST) MIME-Version: 1.0 References: <87bm4df2ld.fsf@elephly.net> <878szgg9bi.fsf@elephly.net> <87a7judqap.fsf@elephly.net> In-Reply-To: <87a7judqap.fsf@elephly.net> From: zimoun Date: Mon, 21 Jan 2019 19:53:09 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: =?UTF-8?B?UmU6IG1lcmdpbmcg4oCccHJvY2Vzc2Vz4oCdIGFuZCDigJxyZXN0?= =?UTF-8?B?cmljdGlvbnPigJ0=?= List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ricardo Wurmus Cc: gwl-devel@gnu.org 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 vi= a 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 =E2=80=9Cgraph=E2=80=9D call could disap= pear, but that > would make it impossible to specify an adjacency list as a simple alist, > which I=E2=80=99d 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