GitHub user 1ambda opened a pull request:
https://github.com/apache/zeppelin/pull/1940
[ZEPPELIN-2008] Introduce Spell
### What is this PR for?
Implemented **Spell** to Helium categories. *Technically, it's the frontend
interpreter* runs on browser not backend.
Spell can provide many benefits.
1. Anyone can install, remove using helium package registry by #1936
2. Implementing spell is extremely easier rather than adding backend
interpreter
3. Can use existing javsacript libraries. (e.g
[flowchart.js](http://flowchart.js.org/), [sequence diagram
js](https://github.com/bramp/js-sequence-diagrams), ...). This enable us to add
many visualization tools. Assume that you can implement whatever you want to
visualize in few lines of code like
[flowchart-spell-example](https://github.com/apache/zeppelin/compare/master...1ambda:ZEPPELIN-2008/introduce-spell?expand=1#diff-364845b20d68e4d94688e44fef03da98)
4. The most important thing is, spell can be not only interpreter but also
display system. Because it runs on browser. This enable us to combining
existing backend interpreter with spell display like
```
// if we have markdown spell
%spark
val calculated = doSomething()
println(s"%markdown _${calculated})
```
I added some examples. Checkout `echo`, `markdown`, `translator`,
`flowchart` spells.
### What type of PR is it?
[Feature]
### Todos
* [x] - Add `SPELL` as one of Helium categories.
* [x] - Implement framework code (`zeppelin-spell`)
* [x] - Make some examples (flowchart, google translator, markdown, echo)
* [x] - Support custom display system
* [x] - Fix some bugs in `HeliumBundleFactory`
* [x] - Save spell rendering result into `note.json` while broadcasting to
other websocket clients
### What is the Jira issue?
[ZEPPELIN-2008](https://issues.apache.org/jira/browse/ZEPPELIN-2008)
### How should this be tested?
See the screenshots below.
### Screenshots (if appropriate)
### Questions:
* Does the licenses files need update - NO
* Is there breaking changes for older versions? - NO
* Does this needs documentation? - YES, but framework can be enhanced so i
would like to defer to write document right now.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/1ambda/zeppelin ZEPPELIN-2008/introduce-spell
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/zeppelin/pull/1940.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1940
commit de220b36d39a535f097f6d49820973738be079cc
Author: 1ambda <1am...@gmail.com>
Date: 2017-01-17T10:40:12Z
feat: Support FRONTEND_INTERPRETER type in backend
commit 1c57cb626d9006cdbd59722022de0a798b345a03
Author: 1ambda <1am...@gmail.com>
Date: 2017-01-17T10:41:10Z
feat: Support FRONTEND_INTERPRETER type in frontend
commit 62b2e880ddb02157b25236f1cd3afaad2ba3ac15
Author: 1ambda <1am...@gmail.com>
Date: 2017-01-17T10:41:32Z
feat: Add frontend interpreter framework
commit 4a1e42d662cebbcf87242fb743b9bf6c8d5e8b8f
Author: 1ambda <1am...@gmail.com>
Date: 2017-01-17T10:41:59Z
feat: Add flowchart, translator examples
commit 150ab44b2710f34b93d938038d1063ec10aecfd3
Author: 1ambda <1am...@gmail.com>
Date: 2017-01-17T10:42:26Z
feat: Apply frontend interpreter to paragraph
commit 921b1774137f4cb7c58e90e4a609a7f85e9c400e
Author: 1ambda <1am...@gmail.com>
Date: 2017-01-20T23:22:22Z
feat: Automated display type checking in result
commit 07d944209a26e9f375d5f16d8956cb54f0dc86b5
Author: 1ambda <1am...@gmail.com>
Date: 2017-01-21T00:18:26Z
feat: Update examples to use single FrontIntpRes
commit 1cd8910be6dd48024e9845f50c3e2cec7f0e7ab2
Author: 1ambda <1am...@gmail.com>
Date: 2017-01-23T17:52:40Z
feat: Support custom display
commit ccd57a60ab5b1b7fac30b7e23b4eb5e61bd664e0
Author: 1ambda <1am...@gmail.com>
Date: 2017-01-23T17:54:36Z
example: Add echo, markdown
commit fc2780cd62ece92e18f3305a9fefaca3ca1da62c
Author: 1ambda <1am...@gmail.com>
Date: 2017-01-23T20:09:27Z
style: Rename to Spell
commit ed328ce74fd9e60b9732d89259cc7d1af34293e5
Author: 1ambda <1am...@gmail.com>
Date: 2017-01-23T20:22:26Z
style: Rename generator -> data
commit bf62f4af21d634a7eb7d6f77003e750cc4cdb1f2
Author: 1ambda <1am...@gmail.com>
Date: 2017-01-23T20:48:39Z
feat: Enhance translator spell
commit 7814d7882462e9c52c1758d8e591ee222e2fd263
Author: 1ambda <1am...@gmail.com>
Date: 2017-01-23T22:01:34Z
fix: NPM installation error
commit c270bfd5c3aa20d1a4b0fe9873d2a27e8195c0d9
Author: 1ambda <1am...@gmail.com>
Date: 2017-01-24T13:13:16Z
feat: Save spell result and propagate
commit