guix-devel
[Top][All Lists]
Advanced

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

Re: Guix Workflow Language ?


From: Ricardo Wurmus
Subject: Re: Guix Workflow Language ?
Date: Thu, 25 Jan 2018 21:36:04 +0100
User-agent: mu4e 1.0-alpha3; emacs 25.3.1

Hi,

zimoun <address@hidden> writes:

> In this context, since 'lispy' syntax is not mainstream (and will
> never be), it appears to me as a hard position.

We’ve got you covered here: the GWL has built-in support for Wisp, a
pretty language extension for Guile.  It also comes with a bunch of
extra syntax support to make the definition of workflows easier.

Here’s a convoluted artificial example:

--8<---------------cut here---------------start------------->8---
define-module
    test

use-modules
    guix workflows
    guix processes
    gnu packages bioinformatics
    gnu packages python

process: simple-test
    package-inputs
        list python samtools
    data-inputs
        list "sample.bam" "hg38.fa" "abc"
    procedure #---{python}
import os

def hello():
  print "hello from python 3"
  print GWL['data-inputs']
  print GWL['name']

hello()
---

workflow: example-workflow
    processes
        list simple-test
--8<---------------cut here---------------end--------------->8---

Put this in a file called “test.wisp” and add the directory to the
GUIX_WORKFLOW_PATH and you’re good to go.

Note that the “simple-test” process definition embeds Python code.  A
number of other languages can be supported easily.

I don’t think syntax should hold you back.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net





reply via email to

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