Skip to content

Commit

Permalink
Syntax enhancement aka DLS-2 nextflow-io#984
Browse files Browse the repository at this point in the history
This commit implements a major enhancenent for Nextflow DLS
that provides support for:
- module libraries and processes inclusion
- ability to use an outout channel multiple times as input
- implicit process output variable
- pipe style process and operator compositon
  • Loading branch information
pditommaso authored and sivkovic committed Jun 6, 2019
1 parent 28d135b commit de3ca91
Show file tree
Hide file tree
Showing 150 changed files with 7,663 additions and 2,364 deletions.
9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ before_script:
- make assemble
script:
- |
set -e;
(set -e;
make test install;
./integration-tests.sh
after_script:
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash pub-tests.sh travis; fi
./integration-tests.sh)
test_status=$?
if [[ "$test_status" != 0 && "$TRAVIS_PULL_REQUEST" == false ]]; then bash pub-tests.sh travis; fi
exit $test_status
30 changes: 15 additions & 15 deletions docs/channel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,11 @@ Binding values
Since in `Nextflow` channels are implemented using `dataflow` variables or queues. Thus sending a message
is equivalent to `bind` a value to object representing the communication channel.

bind( )
-------

.. _channel-bind1:

bind
----

Channel objects provide a `bind( )` method which is the basic operation to send a message over the channel.
For example::
Expand All @@ -428,10 +431,12 @@ For example::
myChannel.bind( 'Hello world' )


.. _channel-bind2:

operator <<
-----------

The operator ``<<`` is just a syntax sugar for the `bind( )` method. Thus, the following example produce
The operator ``<<`` is just a syntax sugar for the `bind` method. Thus, the following example produce
an identical result as the previous one::

myChannel = Channel.create()
Expand All @@ -445,10 +450,10 @@ Observing events

.. _channel-subscribe:

subscribe( )
------------
subscribe
---------

The ``subscribe( )`` method permits to execute a user define function each time a new value is emitted by the source channel.
The ``subscribe`` method permits to execute a user define function each time a new value is emitted by the source channel.

The emitted value is passed implicitly to the specified function. For example::

Expand Down Expand Up @@ -489,10 +494,10 @@ Read :ref:`script-closure` paragraph to learn more about `closure` feature.
onNext, onComplete, and onError
-------------------------------

The ``subscribe()`` method may accept one or more of the following event handlers:
The ``subscribe`` method may accept one or more of the following event handlers:

* ``onNext``: registers a function that is invoked whenever the channel emits a value.
This is the same as using the ``subscribe( )`` with a `plain` closure as describe in the examples above.
This is the same as using the ``subscribe`` with a `plain` closure as describe in the examples above.

* ``onComplete``: registers a function that is invoked after the `last` value is emitted by the channel.

Expand All @@ -505,19 +510,14 @@ For example::

Channel
.from( 1, 2, 3 )
.subscribe onNext: { println it }, onComplete: { println 'Done.' }
.subscribe onNext: { println it }, onComplete: { println 'Done' }

::

1
2
3
Done.


.. Special messages
.. STOP
.. VOID
Done



Expand Down
Loading

0 comments on commit de3ca91

Please sign in to comment.