From: Ricardo Wurmus <rekado@elephly.net>
To: zimoun <zimon.toutoune@gmail.com>
Cc: gwl-devel@gnu.org
Subject: Re: merging “processes” and “restrictions”
Date: Mon, 21 Jan 2019 15:43:42 +0100 [thread overview]
Message-ID: <87a7judqap.fsf@elephly.net> (raw)
In-Reply-To: <878szgg9bi.fsf@elephly.net>
Ricardo Wurmus <rekado@elephly.net> writes:
> Hi simon,
>
>> I am not clear yet about how to manage the inputs/outputs
>> (fixed in the definition of the process or fixed in the workflow)
> […]
>> I am still failing to write a macro that inplements my "view":
>> - write the graph
>> - collect the inputs/outputs
>
> This is interesting and it might be a solution to this conundrum. If
> the processes can declare their inputs without refering to other
> processes then we have a solution: the graph can be built from the
> inputs and outputs of the provided processes without having to specify
> any dependencies manually.
>
> We need a procedure that takes any number of processes as inputs and
> matches inputs with outputs to generate an adjacency list of processes.
> This shouldn’t be difficult.
This works now:
--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---
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.
--
Ricardo
next prev parent reply other threads:[~2019-01-21 14:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-19 8:55 merging “processes” and “restrictions” Ricardo Wurmus
2019-01-19 10:26 ` zimoun
2019-01-19 11:45 ` Ricardo Wurmus
2019-01-19 17:55 ` zimoun
2019-01-19 20:51 ` Ricardo Wurmus
2019-01-21 18:45 ` zimoun
2019-01-21 22:51 ` Ricardo Wurmus
2019-01-22 8:49 ` zimoun
2019-01-21 14:43 ` Ricardo Wurmus [this message]
2019-01-21 18:53 ` zimoun
2019-01-21 15:32 ` Ricardo Wurmus
2019-01-21 18:55 ` zimoun
2019-01-21 19:33 ` Ricardo Wurmus
2019-01-21 19:59 ` zimoun
2019-01-26 21:49 ` Ricardo Wurmus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a7judqap.fsf@elephly.net \
--to=rekado@elephly.net \
--cc=gwl-devel@gnu.org \
--cc=zimon.toutoune@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.