Skip to content
This repository has been archived by the owner on Jun 23, 2018. It is now read-only.

Commit

Permalink
Fix syntax in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
lanthias committed Apr 12, 2017
1 parent 5109ac1 commit 014ac4e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions features/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ For instance, we could combine ``Iris.Classify.predict`` and ``demo.numChars`` f
import Iris.Classify:0.0.1-SNAPSHOT as Classifier;
import Demo:0.0.1-SNAPSHOT as Demo;
def speciesLength = Classifier.predict | Demo.numChars
def speciesLength = Classifier.predict | Demo.numChars;
}
Because our workflow ``Iris.Workflow.speciesLength`` has not been connected to a source or a sink, it in itself is still a function. If we build this workflow, we can see ``speciesLength`` alongside our other functions by using the ``list`` command:
Expand All @@ -66,18 +66,18 @@ As we would expect, the input type of the workflow is the input type of ``Iris.C
module Iris.Endpoint:0.0.1-SNAPSHOT {
import Iris.Workflow:0.0.1-SNAPSHOT as IrisWF;
def http = Sources.http<(Double, Double, Double, Double) | IrisWF.speciesLength | Sinks.log<Integer>;
def http = Sources.http<(Double, Double, Double, Double)> | IrisWF.speciesLength | Sinks.log<Integer>;
}
Often times you want to re-use a source or a sink without reconfiguring them. To do this, we can similarly separate the sources and sinks into separate workflows, like so:

.. code :: java
module Iris.Workflow:0.0.1-SNAPSHOT {
import Iris.Classify:0.0.1-SNAPSHOT as Classifier
import Iris.Classify:0.0.1-SNAPSHOT as Classifier;
def httpEndpoint = sources.http<(Double, Double, Double, Double)> { http_path = "speciesLength" };
def logSink = sinks.log<Text>
def logSink = sinks.log<Text>;
def speciesWf = httpEndpoint | Classifier.predict | logSink;
}
Expand Down

0 comments on commit 014ac4e

Please sign in to comment.