zeppelin/docs/interpreter/python.md

312 lines
9 KiB
Markdown
Raw Normal View History

[ZEPPELIN-502] Python interpreter group ### What is this PR for? Adding a python 2 &3 interpreter. It's a basic implementation (no py4j for example), with a java ProcessBuilder object used to instantiate a python REPL. The interpreter doesn't bring it own python binary but uses the python specified by python.path configutation. Thus, you can still use your specific installed python modules (scikit-learn, matplotlib...) and the interpreter is able to work with python 2 & 3 without change. I had a python helper function (zeppelin_show() ) to easily display matplotlib graph as SVG. ### What type of PR is it? [Feature] ### Todos * [x] - Code review * [x] - Improve bootstrap.py : choose available helper functions and their names * [x] - Unit / IT tests ? * [x] documentation updates needed, that AhyoungRyu pointed out * [X] LICENSE needs to be updated to include all non-apache licensed dependencies (i.e AFAIK Py4j is BSD ) in bin-license * [x] double-check that code formatting conforms project style guide * [x] the branch need to be rebased on latest master. ### What is the Jira issue? [ZEPPELIN-502](https://issues.apache.org/jira/browse/ZEPPELIN-502?jql=project%20%3D%20ZEPPELIN%20AND%20text%20~%20%22python%22) ### How should this be tested? 1. In interpreter screen, in Python section, specify in python.path the python binary you want to use 2. In a paragraph, you can use the interpreter with **_%python_**. Calling help() will describe you the interpreter functionnalities. 3. Install py4j (pip install py4j) if you want to use input form ### Screenshots ![image](https://cloud.githubusercontent.com/assets/12515751/14936724/5108fb60-0ef4-11e6-93ea-232a037f7957.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14943716/98a75c4a-0fe0-11e6-9d4b-e10c39d53a15.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14936715/0eec90de-0ef4-11e6-811b-7ebe46f0d279.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14943722/b89b7824-0fe0-11e6-9c73-c12f7372d487.png) ### Questions: * Does the licenses files need update? Yes, only bin-license (py4j) * Is there breaking changes for older versions? No * Does this needs documentation? Yes Author: Hervé RIVIERE <hriviere@users.noreply.github.com> Closes #869 from hriviere/PR_interpreter_python and squashes the following commits: 80b6e75 [Hervé RIVIERE] [ZEPPELIN-502] move BSD py4j license to zeppelin-distribution/src/bin_license/license a4b82a5 [Hervé RIVIERE] [ZEPPELIN-502]Improving doc following @AhyoungRyu review 3252353 [Hervé RIVIERE] [ZEPPELIN-502] Formatting code to respect project convention 54ec4f1 [Hervé RIVIERE] [ZEPPELIN-502]Improving doc following @AhyoungRyu review 6a831bc [Hervé RIVIERE] [ZEPPELIN-502] Add BSD py4j license 11e1b9c [Hervé RIVIERE] [ZEPPELIN-502] minor changes in python.md e5d0bdb [Hervé RIVIERE] [ZEPPELIN-502] change PYTHON_PATH to ZEPPELIN_PYTHON c62ac98 [Hervé RIVIERE] [ZEPPELIN-502] Improve python.md 5008125 [Hervé RIVIERE] [ZEPPELIN-502] Improve python.md with features not yet supported and technical description 7d533e1 [Hervé RIVIERE] [ZEPPELIN-502] Add tests and reformating code to help tests writing fecaf25 [Hervé RIVIERE] [ZEPPELIN-502] Rename python.path to python and default from /usr/bin/python to python 02d1320 [Hervé RIVIERE] [ZEPPELIN-502] Input form, change from simple input form to native (pyspark syntax) 60d2956 [Hervé RIVIERE] [ZEPPELIN-502] Indent as pep8 convention 9bdb192 [Hervé RIVIERE] [ZEPPELIN-502] Add python.md to _navigation.html 7142aa5 [Hervé RIVIERE] [ZEPPELIN-502] Catch exception in logger.error 1a86ad7 [Hervé RIVIERE] [ZEPPELIN-502] Python interpreter group
2016-05-30 20:07:26 +00:00
---
layout: page
[ZEPPELIN-1219] Add searching feature to Zeppelin docs site ### What is this PR for? As more and more document pages are added, it's really hard to find specific pages. So I added searching feature to Zeppelin documentation site([jekyll](https://jekyllrb.com/) based site) using [lunr.js](http://lunrjs.com/). - **How does it work?** I created [`search_data.json`](https://github.com/AhyoungRyu/zeppelin/blob/6e02423f541cc406e4e41031629609a276a9f481/docs/search_data.json) which is used for docs info template. `lunr.js` combines all of the text from all of the docs in `docs/` into `_site/search_data.json`. It looks like below. ![screen shot 2016-08-03 at 4 49 59 am](https://cloud.githubusercontent.com/assets/10060731/17342828/f2908be8-5935-11e6-8eee-b189677c0531.png) All the info are comes from [Jekyll YAML front matter](https://jekyllrb.com/docs/frontmatter/) variables. (i.e. title, group, description.. that's why I rewrote all docs' title and description.) [search.js](https://github.com/AhyoungRyu/zeppelin/blob/6e02423f541cc406e4e41031629609a276a9f481/docs/assets/themes/zeppelin/js/search.js) will do this job using this data! ### What type of PR is it? Improvement & Feature ### Todos * [x] - Keep consistency for all docs pages' `Title` * [x] - Add some overview sentences to all docs pages' `Description` section (this will be used as the result preview) * [x] - Add apache license header to all docs page (some pages are missing the license header currently) * [x] - Add LICENSE for `lunr.min.js` ### What is the Jira issue? [ZEPPELIN-1219](https://issues.apache.org/jira/browse/ZEPPELIN-1219) ### How should this be tested? 1. Apply this patch and build `ZEPPELIN_HOME/docs` dir -> please see [docs/README.md#build-documentation](https://github.com/apache/zeppelin/tree/master/docs#build-documentation) 2. Click `search` icon in navbar and go to `search.html` page 3. Type anything you want to search in the search bar (i.e. type `python`, `spark`, `dynamic` ... ) ### Screenshots (if appropriate) ![screen shot 2016-08-03 at 4 42 28 pm](https://cloud.githubusercontent.com/assets/10060731/17357851/d092e2ca-5999-11e6-9917-a3d4113e6e43.png) ![search](https://cloud.githubusercontent.com/assets/10060731/17357828/b2486cd6-5999-11e6-873b-121fac033b03.gif) ### Questions: * Does the licenses files need update? Yes, for `lunr.min.js` * Is there breaking changes for older versions? no * Does this needs documentation? no Author: AhyoungRyu <fbdkdud93@hanmail.net> Closes #1266 from AhyoungRyu/ZEPPELIN-1219 and squashes the following commits: 7ec8854 [AhyoungRyu] Modify 'no result' sentence 91b71a7 [AhyoungRyu] Remove Apache license header since JSON doesn't allow comment 34afd5d [AhyoungRyu] Add Apache license header to search_data.json 6784282 [AhyoungRyu] Minor search page UI update 0389d28 [AhyoungRyu] Make index.md not to be searched 9f1ba42 [AhyoungRyu] Disable enterkey press & change icon bd4956a [AhyoungRyu] Add docs.js & search.js to exclude list in pom.xml 624b051 [AhyoungRyu] Add Apache license header to search.js 1381152 [AhyoungRyu] Fix search result skipping issue 6e775f5 [AhyoungRyu] Make pleasecontribute.md not to be searched ee11136 [AhyoungRyu] Fix some typos fa01299 [AhyoungRyu] Refine 'description' in some docs as @bzz suggested da0cff9 [AhyoungRyu] Exclude lunr.min.js 36ba7f1 [AhyoungRyu] Add lunr.min.js license info f6a05a6 [AhyoungRyu] Apply css style for the search results 68eb997 [AhyoungRyu] Attach 'Apache Zeppelin ZEPPELIN_VERSION Documentation: ' to title d908c37 [AhyoungRyu] Add searching page a951fa6 [AhyoungRyu] Add search icon to navbar 0688a79 [AhyoungRyu] Keep consistency all docs' front matter for the right search result 040f532 [AhyoungRyu] Add template for storing docs info based on jekyll front matter 0705bd6 [AhyoungRyu] Add js files: lunr.min.js & search.js
2016-08-06 05:50:25 +00:00
title: "Python 2 & 3 Interpreter for Apache Zeppelin"
description: "Python is a programming language that lets you work quickly and integrate systems more effectively."
group: interpreter
[ZEPPELIN-502] Python interpreter group ### What is this PR for? Adding a python 2 &3 interpreter. It's a basic implementation (no py4j for example), with a java ProcessBuilder object used to instantiate a python REPL. The interpreter doesn't bring it own python binary but uses the python specified by python.path configutation. Thus, you can still use your specific installed python modules (scikit-learn, matplotlib...) and the interpreter is able to work with python 2 & 3 without change. I had a python helper function (zeppelin_show() ) to easily display matplotlib graph as SVG. ### What type of PR is it? [Feature] ### Todos * [x] - Code review * [x] - Improve bootstrap.py : choose available helper functions and their names * [x] - Unit / IT tests ? * [x] documentation updates needed, that AhyoungRyu pointed out * [X] LICENSE needs to be updated to include all non-apache licensed dependencies (i.e AFAIK Py4j is BSD ) in bin-license * [x] double-check that code formatting conforms project style guide * [x] the branch need to be rebased on latest master. ### What is the Jira issue? [ZEPPELIN-502](https://issues.apache.org/jira/browse/ZEPPELIN-502?jql=project%20%3D%20ZEPPELIN%20AND%20text%20~%20%22python%22) ### How should this be tested? 1. In interpreter screen, in Python section, specify in python.path the python binary you want to use 2. In a paragraph, you can use the interpreter with **_%python_**. Calling help() will describe you the interpreter functionnalities. 3. Install py4j (pip install py4j) if you want to use input form ### Screenshots ![image](https://cloud.githubusercontent.com/assets/12515751/14936724/5108fb60-0ef4-11e6-93ea-232a037f7957.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14943716/98a75c4a-0fe0-11e6-9d4b-e10c39d53a15.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14936715/0eec90de-0ef4-11e6-811b-7ebe46f0d279.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14943722/b89b7824-0fe0-11e6-9c73-c12f7372d487.png) ### Questions: * Does the licenses files need update? Yes, only bin-license (py4j) * Is there breaking changes for older versions? No * Does this needs documentation? Yes Author: Hervé RIVIERE <hriviere@users.noreply.github.com> Closes #869 from hriviere/PR_interpreter_python and squashes the following commits: 80b6e75 [Hervé RIVIERE] [ZEPPELIN-502] move BSD py4j license to zeppelin-distribution/src/bin_license/license a4b82a5 [Hervé RIVIERE] [ZEPPELIN-502]Improving doc following @AhyoungRyu review 3252353 [Hervé RIVIERE] [ZEPPELIN-502] Formatting code to respect project convention 54ec4f1 [Hervé RIVIERE] [ZEPPELIN-502]Improving doc following @AhyoungRyu review 6a831bc [Hervé RIVIERE] [ZEPPELIN-502] Add BSD py4j license 11e1b9c [Hervé RIVIERE] [ZEPPELIN-502] minor changes in python.md e5d0bdb [Hervé RIVIERE] [ZEPPELIN-502] change PYTHON_PATH to ZEPPELIN_PYTHON c62ac98 [Hervé RIVIERE] [ZEPPELIN-502] Improve python.md 5008125 [Hervé RIVIERE] [ZEPPELIN-502] Improve python.md with features not yet supported and technical description 7d533e1 [Hervé RIVIERE] [ZEPPELIN-502] Add tests and reformating code to help tests writing fecaf25 [Hervé RIVIERE] [ZEPPELIN-502] Rename python.path to python and default from /usr/bin/python to python 02d1320 [Hervé RIVIERE] [ZEPPELIN-502] Input form, change from simple input form to native (pyspark syntax) 60d2956 [Hervé RIVIERE] [ZEPPELIN-502] Indent as pep8 convention 9bdb192 [Hervé RIVIERE] [ZEPPELIN-502] Add python.md to _navigation.html 7142aa5 [Hervé RIVIERE] [ZEPPELIN-502] Catch exception in logger.error 1a86ad7 [Hervé RIVIERE] [ZEPPELIN-502] Python interpreter group
2016-05-30 20:07:26 +00:00
---
[ZEPPELIN-1219] Add searching feature to Zeppelin docs site ### What is this PR for? As more and more document pages are added, it's really hard to find specific pages. So I added searching feature to Zeppelin documentation site([jekyll](https://jekyllrb.com/) based site) using [lunr.js](http://lunrjs.com/). - **How does it work?** I created [`search_data.json`](https://github.com/AhyoungRyu/zeppelin/blob/6e02423f541cc406e4e41031629609a276a9f481/docs/search_data.json) which is used for docs info template. `lunr.js` combines all of the text from all of the docs in `docs/` into `_site/search_data.json`. It looks like below. ![screen shot 2016-08-03 at 4 49 59 am](https://cloud.githubusercontent.com/assets/10060731/17342828/f2908be8-5935-11e6-8eee-b189677c0531.png) All the info are comes from [Jekyll YAML front matter](https://jekyllrb.com/docs/frontmatter/) variables. (i.e. title, group, description.. that's why I rewrote all docs' title and description.) [search.js](https://github.com/AhyoungRyu/zeppelin/blob/6e02423f541cc406e4e41031629609a276a9f481/docs/assets/themes/zeppelin/js/search.js) will do this job using this data! ### What type of PR is it? Improvement & Feature ### Todos * [x] - Keep consistency for all docs pages' `Title` * [x] - Add some overview sentences to all docs pages' `Description` section (this will be used as the result preview) * [x] - Add apache license header to all docs page (some pages are missing the license header currently) * [x] - Add LICENSE for `lunr.min.js` ### What is the Jira issue? [ZEPPELIN-1219](https://issues.apache.org/jira/browse/ZEPPELIN-1219) ### How should this be tested? 1. Apply this patch and build `ZEPPELIN_HOME/docs` dir -> please see [docs/README.md#build-documentation](https://github.com/apache/zeppelin/tree/master/docs#build-documentation) 2. Click `search` icon in navbar and go to `search.html` page 3. Type anything you want to search in the search bar (i.e. type `python`, `spark`, `dynamic` ... ) ### Screenshots (if appropriate) ![screen shot 2016-08-03 at 4 42 28 pm](https://cloud.githubusercontent.com/assets/10060731/17357851/d092e2ca-5999-11e6-9917-a3d4113e6e43.png) ![search](https://cloud.githubusercontent.com/assets/10060731/17357828/b2486cd6-5999-11e6-873b-121fac033b03.gif) ### Questions: * Does the licenses files need update? Yes, for `lunr.min.js` * Is there breaking changes for older versions? no * Does this needs documentation? no Author: AhyoungRyu <fbdkdud93@hanmail.net> Closes #1266 from AhyoungRyu/ZEPPELIN-1219 and squashes the following commits: 7ec8854 [AhyoungRyu] Modify 'no result' sentence 91b71a7 [AhyoungRyu] Remove Apache license header since JSON doesn't allow comment 34afd5d [AhyoungRyu] Add Apache license header to search_data.json 6784282 [AhyoungRyu] Minor search page UI update 0389d28 [AhyoungRyu] Make index.md not to be searched 9f1ba42 [AhyoungRyu] Disable enterkey press & change icon bd4956a [AhyoungRyu] Add docs.js & search.js to exclude list in pom.xml 624b051 [AhyoungRyu] Add Apache license header to search.js 1381152 [AhyoungRyu] Fix search result skipping issue 6e775f5 [AhyoungRyu] Make pleasecontribute.md not to be searched ee11136 [AhyoungRyu] Fix some typos fa01299 [AhyoungRyu] Refine 'description' in some docs as @bzz suggested da0cff9 [AhyoungRyu] Exclude lunr.min.js 36ba7f1 [AhyoungRyu] Add lunr.min.js license info f6a05a6 [AhyoungRyu] Apply css style for the search results 68eb997 [AhyoungRyu] Attach 'Apache Zeppelin ZEPPELIN_VERSION Documentation: ' to title d908c37 [AhyoungRyu] Add searching page a951fa6 [AhyoungRyu] Add search icon to navbar 0688a79 [AhyoungRyu] Keep consistency all docs' front matter for the right search result 040f532 [AhyoungRyu] Add template for storing docs info based on jekyll front matter 0705bd6 [AhyoungRyu] Add js files: lunr.min.js & search.js
2016-08-06 05:50:25 +00:00
<!--
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
[ZEPPELIN-502] Python interpreter group ### What is this PR for? Adding a python 2 &3 interpreter. It's a basic implementation (no py4j for example), with a java ProcessBuilder object used to instantiate a python REPL. The interpreter doesn't bring it own python binary but uses the python specified by python.path configutation. Thus, you can still use your specific installed python modules (scikit-learn, matplotlib...) and the interpreter is able to work with python 2 & 3 without change. I had a python helper function (zeppelin_show() ) to easily display matplotlib graph as SVG. ### What type of PR is it? [Feature] ### Todos * [x] - Code review * [x] - Improve bootstrap.py : choose available helper functions and their names * [x] - Unit / IT tests ? * [x] documentation updates needed, that AhyoungRyu pointed out * [X] LICENSE needs to be updated to include all non-apache licensed dependencies (i.e AFAIK Py4j is BSD ) in bin-license * [x] double-check that code formatting conforms project style guide * [x] the branch need to be rebased on latest master. ### What is the Jira issue? [ZEPPELIN-502](https://issues.apache.org/jira/browse/ZEPPELIN-502?jql=project%20%3D%20ZEPPELIN%20AND%20text%20~%20%22python%22) ### How should this be tested? 1. In interpreter screen, in Python section, specify in python.path the python binary you want to use 2. In a paragraph, you can use the interpreter with **_%python_**. Calling help() will describe you the interpreter functionnalities. 3. Install py4j (pip install py4j) if you want to use input form ### Screenshots ![image](https://cloud.githubusercontent.com/assets/12515751/14936724/5108fb60-0ef4-11e6-93ea-232a037f7957.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14943716/98a75c4a-0fe0-11e6-9d4b-e10c39d53a15.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14936715/0eec90de-0ef4-11e6-811b-7ebe46f0d279.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14943722/b89b7824-0fe0-11e6-9c73-c12f7372d487.png) ### Questions: * Does the licenses files need update? Yes, only bin-license (py4j) * Is there breaking changes for older versions? No * Does this needs documentation? Yes Author: Hervé RIVIERE <hriviere@users.noreply.github.com> Closes #869 from hriviere/PR_interpreter_python and squashes the following commits: 80b6e75 [Hervé RIVIERE] [ZEPPELIN-502] move BSD py4j license to zeppelin-distribution/src/bin_license/license a4b82a5 [Hervé RIVIERE] [ZEPPELIN-502]Improving doc following @AhyoungRyu review 3252353 [Hervé RIVIERE] [ZEPPELIN-502] Formatting code to respect project convention 54ec4f1 [Hervé RIVIERE] [ZEPPELIN-502]Improving doc following @AhyoungRyu review 6a831bc [Hervé RIVIERE] [ZEPPELIN-502] Add BSD py4j license 11e1b9c [Hervé RIVIERE] [ZEPPELIN-502] minor changes in python.md e5d0bdb [Hervé RIVIERE] [ZEPPELIN-502] change PYTHON_PATH to ZEPPELIN_PYTHON c62ac98 [Hervé RIVIERE] [ZEPPELIN-502] Improve python.md 5008125 [Hervé RIVIERE] [ZEPPELIN-502] Improve python.md with features not yet supported and technical description 7d533e1 [Hervé RIVIERE] [ZEPPELIN-502] Add tests and reformating code to help tests writing fecaf25 [Hervé RIVIERE] [ZEPPELIN-502] Rename python.path to python and default from /usr/bin/python to python 02d1320 [Hervé RIVIERE] [ZEPPELIN-502] Input form, change from simple input form to native (pyspark syntax) 60d2956 [Hervé RIVIERE] [ZEPPELIN-502] Indent as pep8 convention 9bdb192 [Hervé RIVIERE] [ZEPPELIN-502] Add python.md to _navigation.html 7142aa5 [Hervé RIVIERE] [ZEPPELIN-502] Catch exception in logger.error 1a86ad7 [Hervé RIVIERE] [ZEPPELIN-502] Python interpreter group
2016-05-30 20:07:26 +00:00
{% include JB/setup %}
[ZEPPELIN-1018] Apply auto "Table of Contents" generator to Zeppelin docs website ### What is this PR for? I added auto TOC(Table of Contents) generator for Zeppelin documentation website. TOC can help people looking through whole contents at a glance and finding what they want quickly. I just added `<div id="toc"></div>` to the each documentation header. [`toc`](https://github.com/apache/zeppelin/compare/master...AhyoungRyu:ZEPPELIN-1018?expand=1#diff-85af09fb498a5667ea455391533f945dR3) recognize `<h2>` & `<h3>` as a title in the docs and it automatically generate TOC. So I set a rule for this work. (I'll write this rule on `docs/CONTRIBUTING.md` or [docs/howtocontributewebsite](https://zeppelin.apache.org/docs/0.6.0-SNAPSHOT/development/howtocontributewebsite.html)). ``` # Level-1 Heading <- Use only for the main title of the page ## Level-2 Heading <- Start with this one ### Level-3 heading <- Only use this one for child of Level-2 toc only recognize Level-2 & Level-3 ``` Please see the below attached screenshot image. ### What type of PR is it? Improvement & Documentation ### Todos * [x] - Add TOC generator * [x] - Apply TOC(`<div id="toc"></div>`) to every documentation and reorganize each headers(apply the above rule) * [x] - Fix some broken code block in several docs * [x] - Apply TOC to `r.md` (Currently R docs has some duplicated info since [this one](https://github.com/apache/zeppelin/commit/d5e87fb8ba98f08db5b0a4995104ce19f182c678) and [this one](https://github.com/apache/zeppelin/commit/7d6cc7e99154e2d337c11fdf8be1a874ed3e9ada) ) * [x] - Apply TOC to `install.md` after #1010 merged * [x] - Apply TOC to `interpreterinstallation.md` after #1042 merged ### What is the Jira issue? [ZEPPELIN-1018](https://issues.apache.org/jira/browse/ZEPPELIN-1018) ### How should this be tested? 1. Apply this patch and build `docs/` with [this guide](https://github.com/apache/zeppelin/tree/master/docs#build-documentation) 2. Visit some docs page. Then you can see TOC in the header of page. ### Screenshots (if appropriate) - Automatically generated TOC in Spark interpreter docs page <img width="831" alt="screen shot 2016-06-16 at 9 37 18 pm" src="https://cloud.githubusercontent.com/assets/10060731/16140902/945b9c7a-340a-11e6-91f3-b6174738bed0.png"> ### Questions: * Does the licenses files need update? No. Actually I used [jekyll-table-of-contents#copyright](https://github.com/ghiculescu/jekyll-table-of-contents#copyright). But I don't need to add a license for this :) * Is there breaking changes for older versions? No * Does this needs documentation? Maybe Author: AhyoungRyu <fbdkdud93@hanmail.net> Closes #1031 from AhyoungRyu/ZEPPELIN-1018 and squashes the following commits: e66397b [AhyoungRyu] Apply TOC to interpreterinstallation.md 009579b [AhyoungRyu] Add more info to 'What is the next?' in install.md 04cf501 [AhyoungRyu] Revert 'where to start' section b7cbe5f [AhyoungRyu] Fix typo cf0911c [AhyoungRyu] Rename license file 388f35a [AhyoungRyu] Add jekyll-table-of-contents license info 6394c70 [AhyoungRyu] Fix image path in python.md d00e4b1 [AhyoungRyu] Move interpreter/screenshot/ -> asset/../img/docs-img/ 3ffb383 [AhyoungRyu] Remove duplicated info in r.md & apply toc a03ca99 [AhyoungRyu] Exclude toc.js from pom.xml 3fae7df [AhyoungRyu] Apply auto generated toc to install.md d114a9d [AhyoungRyu] Address @felixcheung feedback 6a788fe [AhyoungRyu] Resize TOC tab indent 6760c00 [AhyoungRyu] Apply auto TOC to all of docs under docs/storage/ fbde57f [AhyoungRyu] Apply auto TOC to all of docs under docs/quickstart/ db76eb6 [AhyoungRyu] Apply auto TOC to all of docs under docs/install/ f35db47 [AhyoungRyu] Apply auto TOC to all of docs under docs/displaysystem/ b05365f [AhyoungRyu] Apply auto TOC to all of docs under docs/rest-api/ 163691c [AhyoungRyu] Apply auto TOC to all of docs under docs/manual/ bef398e [AhyoungRyu] Apply auto TOC to all of docs under docs/development/ 9c5f76b [AhyoungRyu] Apply auto TOC to all of docs under docs/interpreter/ 587d4ba [AhyoungRyu] Apply auto TOC to all of docs under docs/security/ 1f10b97 [AhyoungRyu] Change toc configuration 78dca9e [AhyoungRyu] Add toc.js for auto generating TOC
2016-06-25 19:44:53 +00:00
# Python 2 & 3 Interpreter for Apache Zeppelin
<div id="toc"></div>
[ZEPPELIN-502] Python interpreter group ### What is this PR for? Adding a python 2 &3 interpreter. It's a basic implementation (no py4j for example), with a java ProcessBuilder object used to instantiate a python REPL. The interpreter doesn't bring it own python binary but uses the python specified by python.path configutation. Thus, you can still use your specific installed python modules (scikit-learn, matplotlib...) and the interpreter is able to work with python 2 & 3 without change. I had a python helper function (zeppelin_show() ) to easily display matplotlib graph as SVG. ### What type of PR is it? [Feature] ### Todos * [x] - Code review * [x] - Improve bootstrap.py : choose available helper functions and their names * [x] - Unit / IT tests ? * [x] documentation updates needed, that AhyoungRyu pointed out * [X] LICENSE needs to be updated to include all non-apache licensed dependencies (i.e AFAIK Py4j is BSD ) in bin-license * [x] double-check that code formatting conforms project style guide * [x] the branch need to be rebased on latest master. ### What is the Jira issue? [ZEPPELIN-502](https://issues.apache.org/jira/browse/ZEPPELIN-502?jql=project%20%3D%20ZEPPELIN%20AND%20text%20~%20%22python%22) ### How should this be tested? 1. In interpreter screen, in Python section, specify in python.path the python binary you want to use 2. In a paragraph, you can use the interpreter with **_%python_**. Calling help() will describe you the interpreter functionnalities. 3. Install py4j (pip install py4j) if you want to use input form ### Screenshots ![image](https://cloud.githubusercontent.com/assets/12515751/14936724/5108fb60-0ef4-11e6-93ea-232a037f7957.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14943716/98a75c4a-0fe0-11e6-9d4b-e10c39d53a15.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14936715/0eec90de-0ef4-11e6-811b-7ebe46f0d279.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14943722/b89b7824-0fe0-11e6-9c73-c12f7372d487.png) ### Questions: * Does the licenses files need update? Yes, only bin-license (py4j) * Is there breaking changes for older versions? No * Does this needs documentation? Yes Author: Hervé RIVIERE <hriviere@users.noreply.github.com> Closes #869 from hriviere/PR_interpreter_python and squashes the following commits: 80b6e75 [Hervé RIVIERE] [ZEPPELIN-502] move BSD py4j license to zeppelin-distribution/src/bin_license/license a4b82a5 [Hervé RIVIERE] [ZEPPELIN-502]Improving doc following @AhyoungRyu review 3252353 [Hervé RIVIERE] [ZEPPELIN-502] Formatting code to respect project convention 54ec4f1 [Hervé RIVIERE] [ZEPPELIN-502]Improving doc following @AhyoungRyu review 6a831bc [Hervé RIVIERE] [ZEPPELIN-502] Add BSD py4j license 11e1b9c [Hervé RIVIERE] [ZEPPELIN-502] minor changes in python.md e5d0bdb [Hervé RIVIERE] [ZEPPELIN-502] change PYTHON_PATH to ZEPPELIN_PYTHON c62ac98 [Hervé RIVIERE] [ZEPPELIN-502] Improve python.md 5008125 [Hervé RIVIERE] [ZEPPELIN-502] Improve python.md with features not yet supported and technical description 7d533e1 [Hervé RIVIERE] [ZEPPELIN-502] Add tests and reformating code to help tests writing fecaf25 [Hervé RIVIERE] [ZEPPELIN-502] Rename python.path to python and default from /usr/bin/python to python 02d1320 [Hervé RIVIERE] [ZEPPELIN-502] Input form, change from simple input form to native (pyspark syntax) 60d2956 [Hervé RIVIERE] [ZEPPELIN-502] Indent as pep8 convention 9bdb192 [Hervé RIVIERE] [ZEPPELIN-502] Add python.md to _navigation.html 7142aa5 [Hervé RIVIERE] [ZEPPELIN-502] Catch exception in logger.error 1a86ad7 [Hervé RIVIERE] [ZEPPELIN-502] Python interpreter group
2016-05-30 20:07:26 +00:00
## Configuration
<table class="table-configuration">
<tr>
<th>Property</th>
<th>Default</th>
<th>Description</th>
</tr>
<tr>
<td>zeppelin.python</td>
[ZEPPELIN-502] Python interpreter group ### What is this PR for? Adding a python 2 &3 interpreter. It's a basic implementation (no py4j for example), with a java ProcessBuilder object used to instantiate a python REPL. The interpreter doesn't bring it own python binary but uses the python specified by python.path configutation. Thus, you can still use your specific installed python modules (scikit-learn, matplotlib...) and the interpreter is able to work with python 2 & 3 without change. I had a python helper function (zeppelin_show() ) to easily display matplotlib graph as SVG. ### What type of PR is it? [Feature] ### Todos * [x] - Code review * [x] - Improve bootstrap.py : choose available helper functions and their names * [x] - Unit / IT tests ? * [x] documentation updates needed, that AhyoungRyu pointed out * [X] LICENSE needs to be updated to include all non-apache licensed dependencies (i.e AFAIK Py4j is BSD ) in bin-license * [x] double-check that code formatting conforms project style guide * [x] the branch need to be rebased on latest master. ### What is the Jira issue? [ZEPPELIN-502](https://issues.apache.org/jira/browse/ZEPPELIN-502?jql=project%20%3D%20ZEPPELIN%20AND%20text%20~%20%22python%22) ### How should this be tested? 1. In interpreter screen, in Python section, specify in python.path the python binary you want to use 2. In a paragraph, you can use the interpreter with **_%python_**. Calling help() will describe you the interpreter functionnalities. 3. Install py4j (pip install py4j) if you want to use input form ### Screenshots ![image](https://cloud.githubusercontent.com/assets/12515751/14936724/5108fb60-0ef4-11e6-93ea-232a037f7957.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14943716/98a75c4a-0fe0-11e6-9d4b-e10c39d53a15.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14936715/0eec90de-0ef4-11e6-811b-7ebe46f0d279.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14943722/b89b7824-0fe0-11e6-9c73-c12f7372d487.png) ### Questions: * Does the licenses files need update? Yes, only bin-license (py4j) * Is there breaking changes for older versions? No * Does this needs documentation? Yes Author: Hervé RIVIERE <hriviere@users.noreply.github.com> Closes #869 from hriviere/PR_interpreter_python and squashes the following commits: 80b6e75 [Hervé RIVIERE] [ZEPPELIN-502] move BSD py4j license to zeppelin-distribution/src/bin_license/license a4b82a5 [Hervé RIVIERE] [ZEPPELIN-502]Improving doc following @AhyoungRyu review 3252353 [Hervé RIVIERE] [ZEPPELIN-502] Formatting code to respect project convention 54ec4f1 [Hervé RIVIERE] [ZEPPELIN-502]Improving doc following @AhyoungRyu review 6a831bc [Hervé RIVIERE] [ZEPPELIN-502] Add BSD py4j license 11e1b9c [Hervé RIVIERE] [ZEPPELIN-502] minor changes in python.md e5d0bdb [Hervé RIVIERE] [ZEPPELIN-502] change PYTHON_PATH to ZEPPELIN_PYTHON c62ac98 [Hervé RIVIERE] [ZEPPELIN-502] Improve python.md 5008125 [Hervé RIVIERE] [ZEPPELIN-502] Improve python.md with features not yet supported and technical description 7d533e1 [Hervé RIVIERE] [ZEPPELIN-502] Add tests and reformating code to help tests writing fecaf25 [Hervé RIVIERE] [ZEPPELIN-502] Rename python.path to python and default from /usr/bin/python to python 02d1320 [Hervé RIVIERE] [ZEPPELIN-502] Input form, change from simple input form to native (pyspark syntax) 60d2956 [Hervé RIVIERE] [ZEPPELIN-502] Indent as pep8 convention 9bdb192 [Hervé RIVIERE] [ZEPPELIN-502] Add python.md to _navigation.html 7142aa5 [Hervé RIVIERE] [ZEPPELIN-502] Catch exception in logger.error 1a86ad7 [Hervé RIVIERE] [ZEPPELIN-502] Python interpreter group
2016-05-30 20:07:26 +00:00
<td>python</td>
<td>Path of the already installed Python binary (could be python2 or python3).
If python is not in your $PATH you can set the absolute directory (example : /usr/bin/python)
</td>
</tr>
<tr>
<td>zeppelin.python.maxResult</td>
<td>1000</td>
<td>Max number of dataframe rows to display.</td>
</tr>
[ZEPPELIN-502] Python interpreter group ### What is this PR for? Adding a python 2 &3 interpreter. It's a basic implementation (no py4j for example), with a java ProcessBuilder object used to instantiate a python REPL. The interpreter doesn't bring it own python binary but uses the python specified by python.path configutation. Thus, you can still use your specific installed python modules (scikit-learn, matplotlib...) and the interpreter is able to work with python 2 & 3 without change. I had a python helper function (zeppelin_show() ) to easily display matplotlib graph as SVG. ### What type of PR is it? [Feature] ### Todos * [x] - Code review * [x] - Improve bootstrap.py : choose available helper functions and their names * [x] - Unit / IT tests ? * [x] documentation updates needed, that AhyoungRyu pointed out * [X] LICENSE needs to be updated to include all non-apache licensed dependencies (i.e AFAIK Py4j is BSD ) in bin-license * [x] double-check that code formatting conforms project style guide * [x] the branch need to be rebased on latest master. ### What is the Jira issue? [ZEPPELIN-502](https://issues.apache.org/jira/browse/ZEPPELIN-502?jql=project%20%3D%20ZEPPELIN%20AND%20text%20~%20%22python%22) ### How should this be tested? 1. In interpreter screen, in Python section, specify in python.path the python binary you want to use 2. In a paragraph, you can use the interpreter with **_%python_**. Calling help() will describe you the interpreter functionnalities. 3. Install py4j (pip install py4j) if you want to use input form ### Screenshots ![image](https://cloud.githubusercontent.com/assets/12515751/14936724/5108fb60-0ef4-11e6-93ea-232a037f7957.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14943716/98a75c4a-0fe0-11e6-9d4b-e10c39d53a15.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14936715/0eec90de-0ef4-11e6-811b-7ebe46f0d279.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14943722/b89b7824-0fe0-11e6-9c73-c12f7372d487.png) ### Questions: * Does the licenses files need update? Yes, only bin-license (py4j) * Is there breaking changes for older versions? No * Does this needs documentation? Yes Author: Hervé RIVIERE <hriviere@users.noreply.github.com> Closes #869 from hriviere/PR_interpreter_python and squashes the following commits: 80b6e75 [Hervé RIVIERE] [ZEPPELIN-502] move BSD py4j license to zeppelin-distribution/src/bin_license/license a4b82a5 [Hervé RIVIERE] [ZEPPELIN-502]Improving doc following @AhyoungRyu review 3252353 [Hervé RIVIERE] [ZEPPELIN-502] Formatting code to respect project convention 54ec4f1 [Hervé RIVIERE] [ZEPPELIN-502]Improving doc following @AhyoungRyu review 6a831bc [Hervé RIVIERE] [ZEPPELIN-502] Add BSD py4j license 11e1b9c [Hervé RIVIERE] [ZEPPELIN-502] minor changes in python.md e5d0bdb [Hervé RIVIERE] [ZEPPELIN-502] change PYTHON_PATH to ZEPPELIN_PYTHON c62ac98 [Hervé RIVIERE] [ZEPPELIN-502] Improve python.md 5008125 [Hervé RIVIERE] [ZEPPELIN-502] Improve python.md with features not yet supported and technical description 7d533e1 [Hervé RIVIERE] [ZEPPELIN-502] Add tests and reformating code to help tests writing fecaf25 [Hervé RIVIERE] [ZEPPELIN-502] Rename python.path to python and default from /usr/bin/python to python 02d1320 [Hervé RIVIERE] [ZEPPELIN-502] Input form, change from simple input form to native (pyspark syntax) 60d2956 [Hervé RIVIERE] [ZEPPELIN-502] Indent as pep8 convention 9bdb192 [Hervé RIVIERE] [ZEPPELIN-502] Add python.md to _navigation.html 7142aa5 [Hervé RIVIERE] [ZEPPELIN-502] Catch exception in logger.error 1a86ad7 [Hervé RIVIERE] [ZEPPELIN-502] Python interpreter group
2016-05-30 20:07:26 +00:00
</table>
## Enabling Python Interpreter
In a notebook, to enable the **Python** interpreter, click on the **Gear** icon and select **Python**
## Using the Python Interpreter
In a paragraph, use **_%python_** to select the **Python** interpreter and then input all commands.
The interpreter can only work if you already have python installed (the interpreter doesn't bring it own python binaries).
To access the help, type **help()**
## Python environments
### Default
By default, PythonInterpreter will use python command defined in `zeppelin.python` property to run python process.
[ZEPPELIN-502] Python interpreter group ### What is this PR for? Adding a python 2 &3 interpreter. It's a basic implementation (no py4j for example), with a java ProcessBuilder object used to instantiate a python REPL. The interpreter doesn't bring it own python binary but uses the python specified by python.path configutation. Thus, you can still use your specific installed python modules (scikit-learn, matplotlib...) and the interpreter is able to work with python 2 & 3 without change. I had a python helper function (zeppelin_show() ) to easily display matplotlib graph as SVG. ### What type of PR is it? [Feature] ### Todos * [x] - Code review * [x] - Improve bootstrap.py : choose available helper functions and their names * [x] - Unit / IT tests ? * [x] documentation updates needed, that AhyoungRyu pointed out * [X] LICENSE needs to be updated to include all non-apache licensed dependencies (i.e AFAIK Py4j is BSD ) in bin-license * [x] double-check that code formatting conforms project style guide * [x] the branch need to be rebased on latest master. ### What is the Jira issue? [ZEPPELIN-502](https://issues.apache.org/jira/browse/ZEPPELIN-502?jql=project%20%3D%20ZEPPELIN%20AND%20text%20~%20%22python%22) ### How should this be tested? 1. In interpreter screen, in Python section, specify in python.path the python binary you want to use 2. In a paragraph, you can use the interpreter with **_%python_**. Calling help() will describe you the interpreter functionnalities. 3. Install py4j (pip install py4j) if you want to use input form ### Screenshots ![image](https://cloud.githubusercontent.com/assets/12515751/14936724/5108fb60-0ef4-11e6-93ea-232a037f7957.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14943716/98a75c4a-0fe0-11e6-9d4b-e10c39d53a15.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14936715/0eec90de-0ef4-11e6-811b-7ebe46f0d279.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14943722/b89b7824-0fe0-11e6-9c73-c12f7372d487.png) ### Questions: * Does the licenses files need update? Yes, only bin-license (py4j) * Is there breaking changes for older versions? No * Does this needs documentation? Yes Author: Hervé RIVIERE <hriviere@users.noreply.github.com> Closes #869 from hriviere/PR_interpreter_python and squashes the following commits: 80b6e75 [Hervé RIVIERE] [ZEPPELIN-502] move BSD py4j license to zeppelin-distribution/src/bin_license/license a4b82a5 [Hervé RIVIERE] [ZEPPELIN-502]Improving doc following @AhyoungRyu review 3252353 [Hervé RIVIERE] [ZEPPELIN-502] Formatting code to respect project convention 54ec4f1 [Hervé RIVIERE] [ZEPPELIN-502]Improving doc following @AhyoungRyu review 6a831bc [Hervé RIVIERE] [ZEPPELIN-502] Add BSD py4j license 11e1b9c [Hervé RIVIERE] [ZEPPELIN-502] minor changes in python.md e5d0bdb [Hervé RIVIERE] [ZEPPELIN-502] change PYTHON_PATH to ZEPPELIN_PYTHON c62ac98 [Hervé RIVIERE] [ZEPPELIN-502] Improve python.md 5008125 [Hervé RIVIERE] [ZEPPELIN-502] Improve python.md with features not yet supported and technical description 7d533e1 [Hervé RIVIERE] [ZEPPELIN-502] Add tests and reformating code to help tests writing fecaf25 [Hervé RIVIERE] [ZEPPELIN-502] Rename python.path to python and default from /usr/bin/python to python 02d1320 [Hervé RIVIERE] [ZEPPELIN-502] Input form, change from simple input form to native (pyspark syntax) 60d2956 [Hervé RIVIERE] [ZEPPELIN-502] Indent as pep8 convention 9bdb192 [Hervé RIVIERE] [ZEPPELIN-502] Add python.md to _navigation.html 7142aa5 [Hervé RIVIERE] [ZEPPELIN-502] Catch exception in logger.error 1a86ad7 [Hervé RIVIERE] [ZEPPELIN-502] Python interpreter group
2016-05-30 20:07:26 +00:00
The interpreter can use all modules already installed (with pip, easy_install...)
### Conda
[Conda](http://conda.pydata.org/) is an package management system and environment management system for python.
`%python.conda` interpreter lets you change between environments.
#### Usage
[ZEPPELIN-2596] Improving documentation page ### What is this PR for? Improving documentation page. Please check *TODO* and *Screenshots* sections for detail. The motivation is described in [the JIRA ticket](https://issues.apache.org/jira/browse/ZEPPELIN-2583) and discussion is ongoing on the mailing list. ### What type of PR is it? [Improvement | Documentation] ### Todos * [x] - improved the navbar style * [x] - improved the main page * [x] - re-organized content structure * [x] - added tutorial pages: `spark_with_zeppelin.md`, `python_with_zeppelin.md`, `sql_with_zeppelin.md` for overview * [x] - added `multi_user_support.md` page to provide overview * [x] - added the empty `interpreter_binding_mode` page. This will be handed in the different issue: [ZEPPELIN-2582](https://issues.apache.org/jira/browse/ZEPPELIN-2582) * [x] - added the empty `trouble_shooting` page. This can be filled in the following PRs. * [x] - added the empty `useful_developer_tools` page. This can be filled in the following PRs. ### What is the Jira issue? [ZEPPELIN-2596](https://issues.apache.org/jira/browse/ZEPPELIN-2596) ### How should this be tested? 1. checkout 2. `cd docs` 3. `bundle install` (make sure that you have ruby 2.1.0+ and bundle) 4. `bundle exec jekyll serve --watch` 5. open `localhost:4000` ### Screenshots (if appropriate) #### better navbar: before ![2596_before_nav](https://cloud.githubusercontent.com/assets/4968473/26542353/89004e7a-4494-11e7-89c0-28d608f5f375.gif) #### better navbar: after ![2596_after_nav](https://cloud.githubusercontent.com/assets/4968473/26542356/8bfb7b90-4494-11e7-9979-0bcaef8ba97b.gif) #### improved main page: before ![2596_before_main](https://cloud.githubusercontent.com/assets/4968473/26542358/8f35b0be-4494-11e7-8a6c-e74ec52fc384.gif) #### improved main page: after ![2596_after_main](https://cloud.githubusercontent.com/assets/4968473/26542366/93b333c8-4494-11e7-981f-3f7b4545868f.gif) #### organized content structure: before ![2596_before_content](https://cloud.githubusercontent.com/assets/4968473/26542398/ad81ac26-4494-11e7-9a17-70dff41396fb.gif) #### organized content structure: after ![2596_after_content](https://cloud.githubusercontent.com/assets/4968473/26542403/b0a42ad2-4494-11e7-8bd3-8a5bd194c6af.gif) ### Questions: * Does the licenses files need update? - NO * Is there breaking changes for older versions? - NO * Does this needs documentation? - related with docs Author: 1ambda <1amb4a@gmail.com> Closes #2371 from 1ambda/updating-version-doc and squashes the following commits: eb02fa967 [1ambda] fix: navbar focus color applies after folding 026379ed6 [1ambda] fix: Remove docs/.listen_test a7dd4737b [1ambda] fix: sora's comment 1.2 18c5058f7 [1ambda] fix: resolve description in python_with_zeppelin.md d3ad67c73 [1ambda] fix: sora's comment 4 d133dbbcc [1ambda] fix: resolve sora's comment 3 513c6ff2c [1ambda] fix: resolve sora's comment 1.1 4c2946928 [1ambda] fix: resovle sora's comment 2 1c3946ac6 [1ambda] fix: sora's comment 1 4d6e4267f [1ambda] fix: Resolve sola's comment 3 d0524cafe [1ambda] fix: Set less shadow for nav 5f1f998ba [1ambda] docs: Add useful_develop_tools.md 9dfd62c74 [1ambda] fix: Typo in installation.md 30f7d7e06 [1ambda] fix: Typo in helium ctrl d6877e792 [1ambda] docs: Add python_with_zeppelin.md 7027e96c0 [1ambda] docs: Improve python conda, docker doc style e55b50a9d [1ambda] fix: Invalid URLs 75ddeeaff [1ambda] docs: replace URIs in interpreter 5b43993a4 [1ambda] docs: Add sql_with_zeppelin 053794e84 [1ambda] docs: Add spark_with_zeppelin.md d4d88b9c7 [1ambda] docs: Improve proxy doc b46cdd126 [1ambda] docs: Add empty interpreter_binding_mode.md 06fcb239e [1ambda] docs: Add empty personalized_mode.md 4991cf0a7 [1ambda] docs: Update upgrading.md 53142b7a0 [1ambda] fix: Simplify install.md 8a5c1e721 [1ambda] docs: Add multi_user_support.md 34095775e [1ambda] fix: Increase font size to 15px a03b04b33 [1ambda] fix: Remove sample text from trouble_shooting.md 199842590 [1ambda] fix: Remove docker doc link 66a2a7d26 [1ambda] docs: Improve impersonation page 0a6e3fc1d [1ambda] docs: Improve install doc ccd999ed5 [1ambda] docs: Improve helium doc f8d742d08 [1ambda] fix: an invalid link in navbar b7aa5f884 [1ambda] fix: URLs in development 61a175d94 [1ambda] docs: Update install.md 4c56de5c4 [1ambda] fix: URLs in setup 0b1d63513 [1ambda] fix: URLs in quickstart 28970a4fe [1ambda] feat: Add docs/usage 735946bca [1ambda] feat: rename /quickstart b351cf237 [1ambda] fix: Add missing links b70770b4f [1ambda] feat: Change URLs in nav, index 94e80aef6 [1ambda] fix: doens't display navbar version in small 6e0cab110 [1ambda] feat: Update doc section names b9ce256ff [1ambda] feat: Hide version in navbar when md f8bab52be [1ambda] fix: Better image display in index.md eeb37d5b5 [1ambda] fix: Add RL padding for mobile browser ceb60b5ee [1ambda] feat: Style collapsed nav for mobile browser 4ebafb4b6 [1ambda] commit
2017-06-19 10:13:57 +00:00
- get the Conda Infomation:
[ZEPPELIN-2596] Improving documentation page ### What is this PR for? Improving documentation page. Please check *TODO* and *Screenshots* sections for detail. The motivation is described in [the JIRA ticket](https://issues.apache.org/jira/browse/ZEPPELIN-2583) and discussion is ongoing on the mailing list. ### What type of PR is it? [Improvement | Documentation] ### Todos * [x] - improved the navbar style * [x] - improved the main page * [x] - re-organized content structure * [x] - added tutorial pages: `spark_with_zeppelin.md`, `python_with_zeppelin.md`, `sql_with_zeppelin.md` for overview * [x] - added `multi_user_support.md` page to provide overview * [x] - added the empty `interpreter_binding_mode` page. This will be handed in the different issue: [ZEPPELIN-2582](https://issues.apache.org/jira/browse/ZEPPELIN-2582) * [x] - added the empty `trouble_shooting` page. This can be filled in the following PRs. * [x] - added the empty `useful_developer_tools` page. This can be filled in the following PRs. ### What is the Jira issue? [ZEPPELIN-2596](https://issues.apache.org/jira/browse/ZEPPELIN-2596) ### How should this be tested? 1. checkout 2. `cd docs` 3. `bundle install` (make sure that you have ruby 2.1.0+ and bundle) 4. `bundle exec jekyll serve --watch` 5. open `localhost:4000` ### Screenshots (if appropriate) #### better navbar: before ![2596_before_nav](https://cloud.githubusercontent.com/assets/4968473/26542353/89004e7a-4494-11e7-89c0-28d608f5f375.gif) #### better navbar: after ![2596_after_nav](https://cloud.githubusercontent.com/assets/4968473/26542356/8bfb7b90-4494-11e7-9979-0bcaef8ba97b.gif) #### improved main page: before ![2596_before_main](https://cloud.githubusercontent.com/assets/4968473/26542358/8f35b0be-4494-11e7-8a6c-e74ec52fc384.gif) #### improved main page: after ![2596_after_main](https://cloud.githubusercontent.com/assets/4968473/26542366/93b333c8-4494-11e7-981f-3f7b4545868f.gif) #### organized content structure: before ![2596_before_content](https://cloud.githubusercontent.com/assets/4968473/26542398/ad81ac26-4494-11e7-9a17-70dff41396fb.gif) #### organized content structure: after ![2596_after_content](https://cloud.githubusercontent.com/assets/4968473/26542403/b0a42ad2-4494-11e7-8bd3-8a5bd194c6af.gif) ### Questions: * Does the licenses files need update? - NO * Is there breaking changes for older versions? - NO * Does this needs documentation? - related with docs Author: 1ambda <1amb4a@gmail.com> Closes #2371 from 1ambda/updating-version-doc and squashes the following commits: eb02fa967 [1ambda] fix: navbar focus color applies after folding 026379ed6 [1ambda] fix: Remove docs/.listen_test a7dd4737b [1ambda] fix: sora's comment 1.2 18c5058f7 [1ambda] fix: resolve description in python_with_zeppelin.md d3ad67c73 [1ambda] fix: sora's comment 4 d133dbbcc [1ambda] fix: resolve sora's comment 3 513c6ff2c [1ambda] fix: resolve sora's comment 1.1 4c2946928 [1ambda] fix: resovle sora's comment 2 1c3946ac6 [1ambda] fix: sora's comment 1 4d6e4267f [1ambda] fix: Resolve sola's comment 3 d0524cafe [1ambda] fix: Set less shadow for nav 5f1f998ba [1ambda] docs: Add useful_develop_tools.md 9dfd62c74 [1ambda] fix: Typo in installation.md 30f7d7e06 [1ambda] fix: Typo in helium ctrl d6877e792 [1ambda] docs: Add python_with_zeppelin.md 7027e96c0 [1ambda] docs: Improve python conda, docker doc style e55b50a9d [1ambda] fix: Invalid URLs 75ddeeaff [1ambda] docs: replace URIs in interpreter 5b43993a4 [1ambda] docs: Add sql_with_zeppelin 053794e84 [1ambda] docs: Add spark_with_zeppelin.md d4d88b9c7 [1ambda] docs: Improve proxy doc b46cdd126 [1ambda] docs: Add empty interpreter_binding_mode.md 06fcb239e [1ambda] docs: Add empty personalized_mode.md 4991cf0a7 [1ambda] docs: Update upgrading.md 53142b7a0 [1ambda] fix: Simplify install.md 8a5c1e721 [1ambda] docs: Add multi_user_support.md 34095775e [1ambda] fix: Increase font size to 15px a03b04b33 [1ambda] fix: Remove sample text from trouble_shooting.md 199842590 [1ambda] fix: Remove docker doc link 66a2a7d26 [1ambda] docs: Improve impersonation page 0a6e3fc1d [1ambda] docs: Improve install doc ccd999ed5 [1ambda] docs: Improve helium doc f8d742d08 [1ambda] fix: an invalid link in navbar b7aa5f884 [1ambda] fix: URLs in development 61a175d94 [1ambda] docs: Update install.md 4c56de5c4 [1ambda] fix: URLs in setup 0b1d63513 [1ambda] fix: URLs in quickstart 28970a4fe [1ambda] feat: Add docs/usage 735946bca [1ambda] feat: rename /quickstart b351cf237 [1ambda] fix: Add missing links b70770b4f [1ambda] feat: Change URLs in nav, index 94e80aef6 [1ambda] fix: doens't display navbar version in small 6e0cab110 [1ambda] feat: Update doc section names b9ce256ff [1ambda] feat: Hide version in navbar when md f8bab52be [1ambda] fix: Better image display in index.md eeb37d5b5 [1ambda] fix: Add RL padding for mobile browser ceb60b5ee [1ambda] feat: Style collapsed nav for mobile browser 4ebafb4b6 [1ambda] commit
2017-06-19 10:13:57 +00:00
```%python.conda info```
- list the Conda environments:
[ZEPPELIN-2596] Improving documentation page ### What is this PR for? Improving documentation page. Please check *TODO* and *Screenshots* sections for detail. The motivation is described in [the JIRA ticket](https://issues.apache.org/jira/browse/ZEPPELIN-2583) and discussion is ongoing on the mailing list. ### What type of PR is it? [Improvement | Documentation] ### Todos * [x] - improved the navbar style * [x] - improved the main page * [x] - re-organized content structure * [x] - added tutorial pages: `spark_with_zeppelin.md`, `python_with_zeppelin.md`, `sql_with_zeppelin.md` for overview * [x] - added `multi_user_support.md` page to provide overview * [x] - added the empty `interpreter_binding_mode` page. This will be handed in the different issue: [ZEPPELIN-2582](https://issues.apache.org/jira/browse/ZEPPELIN-2582) * [x] - added the empty `trouble_shooting` page. This can be filled in the following PRs. * [x] - added the empty `useful_developer_tools` page. This can be filled in the following PRs. ### What is the Jira issue? [ZEPPELIN-2596](https://issues.apache.org/jira/browse/ZEPPELIN-2596) ### How should this be tested? 1. checkout 2. `cd docs` 3. `bundle install` (make sure that you have ruby 2.1.0+ and bundle) 4. `bundle exec jekyll serve --watch` 5. open `localhost:4000` ### Screenshots (if appropriate) #### better navbar: before ![2596_before_nav](https://cloud.githubusercontent.com/assets/4968473/26542353/89004e7a-4494-11e7-89c0-28d608f5f375.gif) #### better navbar: after ![2596_after_nav](https://cloud.githubusercontent.com/assets/4968473/26542356/8bfb7b90-4494-11e7-9979-0bcaef8ba97b.gif) #### improved main page: before ![2596_before_main](https://cloud.githubusercontent.com/assets/4968473/26542358/8f35b0be-4494-11e7-8a6c-e74ec52fc384.gif) #### improved main page: after ![2596_after_main](https://cloud.githubusercontent.com/assets/4968473/26542366/93b333c8-4494-11e7-981f-3f7b4545868f.gif) #### organized content structure: before ![2596_before_content](https://cloud.githubusercontent.com/assets/4968473/26542398/ad81ac26-4494-11e7-9a17-70dff41396fb.gif) #### organized content structure: after ![2596_after_content](https://cloud.githubusercontent.com/assets/4968473/26542403/b0a42ad2-4494-11e7-8bd3-8a5bd194c6af.gif) ### Questions: * Does the licenses files need update? - NO * Is there breaking changes for older versions? - NO * Does this needs documentation? - related with docs Author: 1ambda <1amb4a@gmail.com> Closes #2371 from 1ambda/updating-version-doc and squashes the following commits: eb02fa967 [1ambda] fix: navbar focus color applies after folding 026379ed6 [1ambda] fix: Remove docs/.listen_test a7dd4737b [1ambda] fix: sora's comment 1.2 18c5058f7 [1ambda] fix: resolve description in python_with_zeppelin.md d3ad67c73 [1ambda] fix: sora's comment 4 d133dbbcc [1ambda] fix: resolve sora's comment 3 513c6ff2c [1ambda] fix: resolve sora's comment 1.1 4c2946928 [1ambda] fix: resovle sora's comment 2 1c3946ac6 [1ambda] fix: sora's comment 1 4d6e4267f [1ambda] fix: Resolve sola's comment 3 d0524cafe [1ambda] fix: Set less shadow for nav 5f1f998ba [1ambda] docs: Add useful_develop_tools.md 9dfd62c74 [1ambda] fix: Typo in installation.md 30f7d7e06 [1ambda] fix: Typo in helium ctrl d6877e792 [1ambda] docs: Add python_with_zeppelin.md 7027e96c0 [1ambda] docs: Improve python conda, docker doc style e55b50a9d [1ambda] fix: Invalid URLs 75ddeeaff [1ambda] docs: replace URIs in interpreter 5b43993a4 [1ambda] docs: Add sql_with_zeppelin 053794e84 [1ambda] docs: Add spark_with_zeppelin.md d4d88b9c7 [1ambda] docs: Improve proxy doc b46cdd126 [1ambda] docs: Add empty interpreter_binding_mode.md 06fcb239e [1ambda] docs: Add empty personalized_mode.md 4991cf0a7 [1ambda] docs: Update upgrading.md 53142b7a0 [1ambda] fix: Simplify install.md 8a5c1e721 [1ambda] docs: Add multi_user_support.md 34095775e [1ambda] fix: Increase font size to 15px a03b04b33 [1ambda] fix: Remove sample text from trouble_shooting.md 199842590 [1ambda] fix: Remove docker doc link 66a2a7d26 [1ambda] docs: Improve impersonation page 0a6e3fc1d [1ambda] docs: Improve install doc ccd999ed5 [1ambda] docs: Improve helium doc f8d742d08 [1ambda] fix: an invalid link in navbar b7aa5f884 [1ambda] fix: URLs in development 61a175d94 [1ambda] docs: Update install.md 4c56de5c4 [1ambda] fix: URLs in setup 0b1d63513 [1ambda] fix: URLs in quickstart 28970a4fe [1ambda] feat: Add docs/usage 735946bca [1ambda] feat: rename /quickstart b351cf237 [1ambda] fix: Add missing links b70770b4f [1ambda] feat: Change URLs in nav, index 94e80aef6 [1ambda] fix: doens't display navbar version in small 6e0cab110 [1ambda] feat: Update doc section names b9ce256ff [1ambda] feat: Hide version in navbar when md f8bab52be [1ambda] fix: Better image display in index.md eeb37d5b5 [1ambda] fix: Add RL padding for mobile browser ceb60b5ee [1ambda] feat: Style collapsed nav for mobile browser 4ebafb4b6 [1ambda] commit
2017-06-19 10:13:57 +00:00
```%python.conda env list```
[ZEPPELIN-2596] Improving documentation page ### What is this PR for? Improving documentation page. Please check *TODO* and *Screenshots* sections for detail. The motivation is described in [the JIRA ticket](https://issues.apache.org/jira/browse/ZEPPELIN-2583) and discussion is ongoing on the mailing list. ### What type of PR is it? [Improvement | Documentation] ### Todos * [x] - improved the navbar style * [x] - improved the main page * [x] - re-organized content structure * [x] - added tutorial pages: `spark_with_zeppelin.md`, `python_with_zeppelin.md`, `sql_with_zeppelin.md` for overview * [x] - added `multi_user_support.md` page to provide overview * [x] - added the empty `interpreter_binding_mode` page. This will be handed in the different issue: [ZEPPELIN-2582](https://issues.apache.org/jira/browse/ZEPPELIN-2582) * [x] - added the empty `trouble_shooting` page. This can be filled in the following PRs. * [x] - added the empty `useful_developer_tools` page. This can be filled in the following PRs. ### What is the Jira issue? [ZEPPELIN-2596](https://issues.apache.org/jira/browse/ZEPPELIN-2596) ### How should this be tested? 1. checkout 2. `cd docs` 3. `bundle install` (make sure that you have ruby 2.1.0+ and bundle) 4. `bundle exec jekyll serve --watch` 5. open `localhost:4000` ### Screenshots (if appropriate) #### better navbar: before ![2596_before_nav](https://cloud.githubusercontent.com/assets/4968473/26542353/89004e7a-4494-11e7-89c0-28d608f5f375.gif) #### better navbar: after ![2596_after_nav](https://cloud.githubusercontent.com/assets/4968473/26542356/8bfb7b90-4494-11e7-9979-0bcaef8ba97b.gif) #### improved main page: before ![2596_before_main](https://cloud.githubusercontent.com/assets/4968473/26542358/8f35b0be-4494-11e7-8a6c-e74ec52fc384.gif) #### improved main page: after ![2596_after_main](https://cloud.githubusercontent.com/assets/4968473/26542366/93b333c8-4494-11e7-981f-3f7b4545868f.gif) #### organized content structure: before ![2596_before_content](https://cloud.githubusercontent.com/assets/4968473/26542398/ad81ac26-4494-11e7-9a17-70dff41396fb.gif) #### organized content structure: after ![2596_after_content](https://cloud.githubusercontent.com/assets/4968473/26542403/b0a42ad2-4494-11e7-8bd3-8a5bd194c6af.gif) ### Questions: * Does the licenses files need update? - NO * Is there breaking changes for older versions? - NO * Does this needs documentation? - related with docs Author: 1ambda <1amb4a@gmail.com> Closes #2371 from 1ambda/updating-version-doc and squashes the following commits: eb02fa967 [1ambda] fix: navbar focus color applies after folding 026379ed6 [1ambda] fix: Remove docs/.listen_test a7dd4737b [1ambda] fix: sora's comment 1.2 18c5058f7 [1ambda] fix: resolve description in python_with_zeppelin.md d3ad67c73 [1ambda] fix: sora's comment 4 d133dbbcc [1ambda] fix: resolve sora's comment 3 513c6ff2c [1ambda] fix: resolve sora's comment 1.1 4c2946928 [1ambda] fix: resovle sora's comment 2 1c3946ac6 [1ambda] fix: sora's comment 1 4d6e4267f [1ambda] fix: Resolve sola's comment 3 d0524cafe [1ambda] fix: Set less shadow for nav 5f1f998ba [1ambda] docs: Add useful_develop_tools.md 9dfd62c74 [1ambda] fix: Typo in installation.md 30f7d7e06 [1ambda] fix: Typo in helium ctrl d6877e792 [1ambda] docs: Add python_with_zeppelin.md 7027e96c0 [1ambda] docs: Improve python conda, docker doc style e55b50a9d [1ambda] fix: Invalid URLs 75ddeeaff [1ambda] docs: replace URIs in interpreter 5b43993a4 [1ambda] docs: Add sql_with_zeppelin 053794e84 [1ambda] docs: Add spark_with_zeppelin.md d4d88b9c7 [1ambda] docs: Improve proxy doc b46cdd126 [1ambda] docs: Add empty interpreter_binding_mode.md 06fcb239e [1ambda] docs: Add empty personalized_mode.md 4991cf0a7 [1ambda] docs: Update upgrading.md 53142b7a0 [1ambda] fix: Simplify install.md 8a5c1e721 [1ambda] docs: Add multi_user_support.md 34095775e [1ambda] fix: Increase font size to 15px a03b04b33 [1ambda] fix: Remove sample text from trouble_shooting.md 199842590 [1ambda] fix: Remove docker doc link 66a2a7d26 [1ambda] docs: Improve impersonation page 0a6e3fc1d [1ambda] docs: Improve install doc ccd999ed5 [1ambda] docs: Improve helium doc f8d742d08 [1ambda] fix: an invalid link in navbar b7aa5f884 [1ambda] fix: URLs in development 61a175d94 [1ambda] docs: Update install.md 4c56de5c4 [1ambda] fix: URLs in setup 0b1d63513 [1ambda] fix: URLs in quickstart 28970a4fe [1ambda] feat: Add docs/usage 735946bca [1ambda] feat: rename /quickstart b351cf237 [1ambda] fix: Add missing links b70770b4f [1ambda] feat: Change URLs in nav, index 94e80aef6 [1ambda] fix: doens't display navbar version in small 6e0cab110 [1ambda] feat: Update doc section names b9ce256ff [1ambda] feat: Hide version in navbar when md f8bab52be [1ambda] fix: Better image display in index.md eeb37d5b5 [1ambda] fix: Add RL padding for mobile browser ceb60b5ee [1ambda] feat: Style collapsed nav for mobile browser 4ebafb4b6 [1ambda] commit
2017-06-19 10:13:57 +00:00
- create a conda enviornment:
```%python.conda create --name [ENV NAME]```
- activate an environment (python interpreter will be restarted):
[ZEPPELIN-2596] Improving documentation page ### What is this PR for? Improving documentation page. Please check *TODO* and *Screenshots* sections for detail. The motivation is described in [the JIRA ticket](https://issues.apache.org/jira/browse/ZEPPELIN-2583) and discussion is ongoing on the mailing list. ### What type of PR is it? [Improvement | Documentation] ### Todos * [x] - improved the navbar style * [x] - improved the main page * [x] - re-organized content structure * [x] - added tutorial pages: `spark_with_zeppelin.md`, `python_with_zeppelin.md`, `sql_with_zeppelin.md` for overview * [x] - added `multi_user_support.md` page to provide overview * [x] - added the empty `interpreter_binding_mode` page. This will be handed in the different issue: [ZEPPELIN-2582](https://issues.apache.org/jira/browse/ZEPPELIN-2582) * [x] - added the empty `trouble_shooting` page. This can be filled in the following PRs. * [x] - added the empty `useful_developer_tools` page. This can be filled in the following PRs. ### What is the Jira issue? [ZEPPELIN-2596](https://issues.apache.org/jira/browse/ZEPPELIN-2596) ### How should this be tested? 1. checkout 2. `cd docs` 3. `bundle install` (make sure that you have ruby 2.1.0+ and bundle) 4. `bundle exec jekyll serve --watch` 5. open `localhost:4000` ### Screenshots (if appropriate) #### better navbar: before ![2596_before_nav](https://cloud.githubusercontent.com/assets/4968473/26542353/89004e7a-4494-11e7-89c0-28d608f5f375.gif) #### better navbar: after ![2596_after_nav](https://cloud.githubusercontent.com/assets/4968473/26542356/8bfb7b90-4494-11e7-9979-0bcaef8ba97b.gif) #### improved main page: before ![2596_before_main](https://cloud.githubusercontent.com/assets/4968473/26542358/8f35b0be-4494-11e7-8a6c-e74ec52fc384.gif) #### improved main page: after ![2596_after_main](https://cloud.githubusercontent.com/assets/4968473/26542366/93b333c8-4494-11e7-981f-3f7b4545868f.gif) #### organized content structure: before ![2596_before_content](https://cloud.githubusercontent.com/assets/4968473/26542398/ad81ac26-4494-11e7-9a17-70dff41396fb.gif) #### organized content structure: after ![2596_after_content](https://cloud.githubusercontent.com/assets/4968473/26542403/b0a42ad2-4494-11e7-8bd3-8a5bd194c6af.gif) ### Questions: * Does the licenses files need update? - NO * Is there breaking changes for older versions? - NO * Does this needs documentation? - related with docs Author: 1ambda <1amb4a@gmail.com> Closes #2371 from 1ambda/updating-version-doc and squashes the following commits: eb02fa967 [1ambda] fix: navbar focus color applies after folding 026379ed6 [1ambda] fix: Remove docs/.listen_test a7dd4737b [1ambda] fix: sora's comment 1.2 18c5058f7 [1ambda] fix: resolve description in python_with_zeppelin.md d3ad67c73 [1ambda] fix: sora's comment 4 d133dbbcc [1ambda] fix: resolve sora's comment 3 513c6ff2c [1ambda] fix: resolve sora's comment 1.1 4c2946928 [1ambda] fix: resovle sora's comment 2 1c3946ac6 [1ambda] fix: sora's comment 1 4d6e4267f [1ambda] fix: Resolve sola's comment 3 d0524cafe [1ambda] fix: Set less shadow for nav 5f1f998ba [1ambda] docs: Add useful_develop_tools.md 9dfd62c74 [1ambda] fix: Typo in installation.md 30f7d7e06 [1ambda] fix: Typo in helium ctrl d6877e792 [1ambda] docs: Add python_with_zeppelin.md 7027e96c0 [1ambda] docs: Improve python conda, docker doc style e55b50a9d [1ambda] fix: Invalid URLs 75ddeeaff [1ambda] docs: replace URIs in interpreter 5b43993a4 [1ambda] docs: Add sql_with_zeppelin 053794e84 [1ambda] docs: Add spark_with_zeppelin.md d4d88b9c7 [1ambda] docs: Improve proxy doc b46cdd126 [1ambda] docs: Add empty interpreter_binding_mode.md 06fcb239e [1ambda] docs: Add empty personalized_mode.md 4991cf0a7 [1ambda] docs: Update upgrading.md 53142b7a0 [1ambda] fix: Simplify install.md 8a5c1e721 [1ambda] docs: Add multi_user_support.md 34095775e [1ambda] fix: Increase font size to 15px a03b04b33 [1ambda] fix: Remove sample text from trouble_shooting.md 199842590 [1ambda] fix: Remove docker doc link 66a2a7d26 [1ambda] docs: Improve impersonation page 0a6e3fc1d [1ambda] docs: Improve install doc ccd999ed5 [1ambda] docs: Improve helium doc f8d742d08 [1ambda] fix: an invalid link in navbar b7aa5f884 [1ambda] fix: URLs in development 61a175d94 [1ambda] docs: Update install.md 4c56de5c4 [1ambda] fix: URLs in setup 0b1d63513 [1ambda] fix: URLs in quickstart 28970a4fe [1ambda] feat: Add docs/usage 735946bca [1ambda] feat: rename /quickstart b351cf237 [1ambda] fix: Add missing links b70770b4f [1ambda] feat: Change URLs in nav, index 94e80aef6 [1ambda] fix: doens't display navbar version in small 6e0cab110 [1ambda] feat: Update doc section names b9ce256ff [1ambda] feat: Hide version in navbar when md f8bab52be [1ambda] fix: Better image display in index.md eeb37d5b5 [1ambda] fix: Add RL padding for mobile browser ceb60b5ee [1ambda] feat: Style collapsed nav for mobile browser 4ebafb4b6 [1ambda] commit
2017-06-19 10:13:57 +00:00
```%python.conda activate [ENV NAME]```
[ZEPPELIN-2596] Improving documentation page ### What is this PR for? Improving documentation page. Please check *TODO* and *Screenshots* sections for detail. The motivation is described in [the JIRA ticket](https://issues.apache.org/jira/browse/ZEPPELIN-2583) and discussion is ongoing on the mailing list. ### What type of PR is it? [Improvement | Documentation] ### Todos * [x] - improved the navbar style * [x] - improved the main page * [x] - re-organized content structure * [x] - added tutorial pages: `spark_with_zeppelin.md`, `python_with_zeppelin.md`, `sql_with_zeppelin.md` for overview * [x] - added `multi_user_support.md` page to provide overview * [x] - added the empty `interpreter_binding_mode` page. This will be handed in the different issue: [ZEPPELIN-2582](https://issues.apache.org/jira/browse/ZEPPELIN-2582) * [x] - added the empty `trouble_shooting` page. This can be filled in the following PRs. * [x] - added the empty `useful_developer_tools` page. This can be filled in the following PRs. ### What is the Jira issue? [ZEPPELIN-2596](https://issues.apache.org/jira/browse/ZEPPELIN-2596) ### How should this be tested? 1. checkout 2. `cd docs` 3. `bundle install` (make sure that you have ruby 2.1.0+ and bundle) 4. `bundle exec jekyll serve --watch` 5. open `localhost:4000` ### Screenshots (if appropriate) #### better navbar: before ![2596_before_nav](https://cloud.githubusercontent.com/assets/4968473/26542353/89004e7a-4494-11e7-89c0-28d608f5f375.gif) #### better navbar: after ![2596_after_nav](https://cloud.githubusercontent.com/assets/4968473/26542356/8bfb7b90-4494-11e7-9979-0bcaef8ba97b.gif) #### improved main page: before ![2596_before_main](https://cloud.githubusercontent.com/assets/4968473/26542358/8f35b0be-4494-11e7-8a6c-e74ec52fc384.gif) #### improved main page: after ![2596_after_main](https://cloud.githubusercontent.com/assets/4968473/26542366/93b333c8-4494-11e7-981f-3f7b4545868f.gif) #### organized content structure: before ![2596_before_content](https://cloud.githubusercontent.com/assets/4968473/26542398/ad81ac26-4494-11e7-9a17-70dff41396fb.gif) #### organized content structure: after ![2596_after_content](https://cloud.githubusercontent.com/assets/4968473/26542403/b0a42ad2-4494-11e7-8bd3-8a5bd194c6af.gif) ### Questions: * Does the licenses files need update? - NO * Is there breaking changes for older versions? - NO * Does this needs documentation? - related with docs Author: 1ambda <1amb4a@gmail.com> Closes #2371 from 1ambda/updating-version-doc and squashes the following commits: eb02fa967 [1ambda] fix: navbar focus color applies after folding 026379ed6 [1ambda] fix: Remove docs/.listen_test a7dd4737b [1ambda] fix: sora's comment 1.2 18c5058f7 [1ambda] fix: resolve description in python_with_zeppelin.md d3ad67c73 [1ambda] fix: sora's comment 4 d133dbbcc [1ambda] fix: resolve sora's comment 3 513c6ff2c [1ambda] fix: resolve sora's comment 1.1 4c2946928 [1ambda] fix: resovle sora's comment 2 1c3946ac6 [1ambda] fix: sora's comment 1 4d6e4267f [1ambda] fix: Resolve sola's comment 3 d0524cafe [1ambda] fix: Set less shadow for nav 5f1f998ba [1ambda] docs: Add useful_develop_tools.md 9dfd62c74 [1ambda] fix: Typo in installation.md 30f7d7e06 [1ambda] fix: Typo in helium ctrl d6877e792 [1ambda] docs: Add python_with_zeppelin.md 7027e96c0 [1ambda] docs: Improve python conda, docker doc style e55b50a9d [1ambda] fix: Invalid URLs 75ddeeaff [1ambda] docs: replace URIs in interpreter 5b43993a4 [1ambda] docs: Add sql_with_zeppelin 053794e84 [1ambda] docs: Add spark_with_zeppelin.md d4d88b9c7 [1ambda] docs: Improve proxy doc b46cdd126 [1ambda] docs: Add empty interpreter_binding_mode.md 06fcb239e [1ambda] docs: Add empty personalized_mode.md 4991cf0a7 [1ambda] docs: Update upgrading.md 53142b7a0 [1ambda] fix: Simplify install.md 8a5c1e721 [1ambda] docs: Add multi_user_support.md 34095775e [1ambda] fix: Increase font size to 15px a03b04b33 [1ambda] fix: Remove sample text from trouble_shooting.md 199842590 [1ambda] fix: Remove docker doc link 66a2a7d26 [1ambda] docs: Improve impersonation page 0a6e3fc1d [1ambda] docs: Improve install doc ccd999ed5 [1ambda] docs: Improve helium doc f8d742d08 [1ambda] fix: an invalid link in navbar b7aa5f884 [1ambda] fix: URLs in development 61a175d94 [1ambda] docs: Update install.md 4c56de5c4 [1ambda] fix: URLs in setup 0b1d63513 [1ambda] fix: URLs in quickstart 28970a4fe [1ambda] feat: Add docs/usage 735946bca [1ambda] feat: rename /quickstart b351cf237 [1ambda] fix: Add missing links b70770b4f [1ambda] feat: Change URLs in nav, index 94e80aef6 [1ambda] fix: doens't display navbar version in small 6e0cab110 [1ambda] feat: Update doc section names b9ce256ff [1ambda] feat: Hide version in navbar when md f8bab52be [1ambda] fix: Better image display in index.md eeb37d5b5 [1ambda] fix: Add RL padding for mobile browser ceb60b5ee [1ambda] feat: Style collapsed nav for mobile browser 4ebafb4b6 [1ambda] commit
2017-06-19 10:13:57 +00:00
- deactivate
```%python.conda deactivate```
- get installed package list inside the current environment
```%python.conda list```
- install package
```%python.conda install [PACKAGE NAME]```
- uninstall package
```%python.conda uninstall [PACKAGE NAME]```
### Docker
`%python.docker` interpreter allows PythonInterpreter creates python process in a specified docker container.
#### Usage
[ZEPPELIN-2596] Improving documentation page ### What is this PR for? Improving documentation page. Please check *TODO* and *Screenshots* sections for detail. The motivation is described in [the JIRA ticket](https://issues.apache.org/jira/browse/ZEPPELIN-2583) and discussion is ongoing on the mailing list. ### What type of PR is it? [Improvement | Documentation] ### Todos * [x] - improved the navbar style * [x] - improved the main page * [x] - re-organized content structure * [x] - added tutorial pages: `spark_with_zeppelin.md`, `python_with_zeppelin.md`, `sql_with_zeppelin.md` for overview * [x] - added `multi_user_support.md` page to provide overview * [x] - added the empty `interpreter_binding_mode` page. This will be handed in the different issue: [ZEPPELIN-2582](https://issues.apache.org/jira/browse/ZEPPELIN-2582) * [x] - added the empty `trouble_shooting` page. This can be filled in the following PRs. * [x] - added the empty `useful_developer_tools` page. This can be filled in the following PRs. ### What is the Jira issue? [ZEPPELIN-2596](https://issues.apache.org/jira/browse/ZEPPELIN-2596) ### How should this be tested? 1. checkout 2. `cd docs` 3. `bundle install` (make sure that you have ruby 2.1.0+ and bundle) 4. `bundle exec jekyll serve --watch` 5. open `localhost:4000` ### Screenshots (if appropriate) #### better navbar: before ![2596_before_nav](https://cloud.githubusercontent.com/assets/4968473/26542353/89004e7a-4494-11e7-89c0-28d608f5f375.gif) #### better navbar: after ![2596_after_nav](https://cloud.githubusercontent.com/assets/4968473/26542356/8bfb7b90-4494-11e7-9979-0bcaef8ba97b.gif) #### improved main page: before ![2596_before_main](https://cloud.githubusercontent.com/assets/4968473/26542358/8f35b0be-4494-11e7-8a6c-e74ec52fc384.gif) #### improved main page: after ![2596_after_main](https://cloud.githubusercontent.com/assets/4968473/26542366/93b333c8-4494-11e7-981f-3f7b4545868f.gif) #### organized content structure: before ![2596_before_content](https://cloud.githubusercontent.com/assets/4968473/26542398/ad81ac26-4494-11e7-9a17-70dff41396fb.gif) #### organized content structure: after ![2596_after_content](https://cloud.githubusercontent.com/assets/4968473/26542403/b0a42ad2-4494-11e7-8bd3-8a5bd194c6af.gif) ### Questions: * Does the licenses files need update? - NO * Is there breaking changes for older versions? - NO * Does this needs documentation? - related with docs Author: 1ambda <1amb4a@gmail.com> Closes #2371 from 1ambda/updating-version-doc and squashes the following commits: eb02fa967 [1ambda] fix: navbar focus color applies after folding 026379ed6 [1ambda] fix: Remove docs/.listen_test a7dd4737b [1ambda] fix: sora's comment 1.2 18c5058f7 [1ambda] fix: resolve description in python_with_zeppelin.md d3ad67c73 [1ambda] fix: sora's comment 4 d133dbbcc [1ambda] fix: resolve sora's comment 3 513c6ff2c [1ambda] fix: resolve sora's comment 1.1 4c2946928 [1ambda] fix: resovle sora's comment 2 1c3946ac6 [1ambda] fix: sora's comment 1 4d6e4267f [1ambda] fix: Resolve sola's comment 3 d0524cafe [1ambda] fix: Set less shadow for nav 5f1f998ba [1ambda] docs: Add useful_develop_tools.md 9dfd62c74 [1ambda] fix: Typo in installation.md 30f7d7e06 [1ambda] fix: Typo in helium ctrl d6877e792 [1ambda] docs: Add python_with_zeppelin.md 7027e96c0 [1ambda] docs: Improve python conda, docker doc style e55b50a9d [1ambda] fix: Invalid URLs 75ddeeaff [1ambda] docs: replace URIs in interpreter 5b43993a4 [1ambda] docs: Add sql_with_zeppelin 053794e84 [1ambda] docs: Add spark_with_zeppelin.md d4d88b9c7 [1ambda] docs: Improve proxy doc b46cdd126 [1ambda] docs: Add empty interpreter_binding_mode.md 06fcb239e [1ambda] docs: Add empty personalized_mode.md 4991cf0a7 [1ambda] docs: Update upgrading.md 53142b7a0 [1ambda] fix: Simplify install.md 8a5c1e721 [1ambda] docs: Add multi_user_support.md 34095775e [1ambda] fix: Increase font size to 15px a03b04b33 [1ambda] fix: Remove sample text from trouble_shooting.md 199842590 [1ambda] fix: Remove docker doc link 66a2a7d26 [1ambda] docs: Improve impersonation page 0a6e3fc1d [1ambda] docs: Improve install doc ccd999ed5 [1ambda] docs: Improve helium doc f8d742d08 [1ambda] fix: an invalid link in navbar b7aa5f884 [1ambda] fix: URLs in development 61a175d94 [1ambda] docs: Update install.md 4c56de5c4 [1ambda] fix: URLs in setup 0b1d63513 [1ambda] fix: URLs in quickstart 28970a4fe [1ambda] feat: Add docs/usage 735946bca [1ambda] feat: rename /quickstart b351cf237 [1ambda] fix: Add missing links b70770b4f [1ambda] feat: Change URLs in nav, index 94e80aef6 [1ambda] fix: doens't display navbar version in small 6e0cab110 [1ambda] feat: Update doc section names b9ce256ff [1ambda] feat: Hide version in navbar when md f8bab52be [1ambda] fix: Better image display in index.md eeb37d5b5 [1ambda] fix: Add RL padding for mobile browser ceb60b5ee [1ambda] feat: Style collapsed nav for mobile browser 4ebafb4b6 [1ambda] commit
2017-06-19 10:13:57 +00:00
- activate an environment
[ZEPPELIN-2596] Improving documentation page ### What is this PR for? Improving documentation page. Please check *TODO* and *Screenshots* sections for detail. The motivation is described in [the JIRA ticket](https://issues.apache.org/jira/browse/ZEPPELIN-2583) and discussion is ongoing on the mailing list. ### What type of PR is it? [Improvement | Documentation] ### Todos * [x] - improved the navbar style * [x] - improved the main page * [x] - re-organized content structure * [x] - added tutorial pages: `spark_with_zeppelin.md`, `python_with_zeppelin.md`, `sql_with_zeppelin.md` for overview * [x] - added `multi_user_support.md` page to provide overview * [x] - added the empty `interpreter_binding_mode` page. This will be handed in the different issue: [ZEPPELIN-2582](https://issues.apache.org/jira/browse/ZEPPELIN-2582) * [x] - added the empty `trouble_shooting` page. This can be filled in the following PRs. * [x] - added the empty `useful_developer_tools` page. This can be filled in the following PRs. ### What is the Jira issue? [ZEPPELIN-2596](https://issues.apache.org/jira/browse/ZEPPELIN-2596) ### How should this be tested? 1. checkout 2. `cd docs` 3. `bundle install` (make sure that you have ruby 2.1.0+ and bundle) 4. `bundle exec jekyll serve --watch` 5. open `localhost:4000` ### Screenshots (if appropriate) #### better navbar: before ![2596_before_nav](https://cloud.githubusercontent.com/assets/4968473/26542353/89004e7a-4494-11e7-89c0-28d608f5f375.gif) #### better navbar: after ![2596_after_nav](https://cloud.githubusercontent.com/assets/4968473/26542356/8bfb7b90-4494-11e7-9979-0bcaef8ba97b.gif) #### improved main page: before ![2596_before_main](https://cloud.githubusercontent.com/assets/4968473/26542358/8f35b0be-4494-11e7-8a6c-e74ec52fc384.gif) #### improved main page: after ![2596_after_main](https://cloud.githubusercontent.com/assets/4968473/26542366/93b333c8-4494-11e7-981f-3f7b4545868f.gif) #### organized content structure: before ![2596_before_content](https://cloud.githubusercontent.com/assets/4968473/26542398/ad81ac26-4494-11e7-9a17-70dff41396fb.gif) #### organized content structure: after ![2596_after_content](https://cloud.githubusercontent.com/assets/4968473/26542403/b0a42ad2-4494-11e7-8bd3-8a5bd194c6af.gif) ### Questions: * Does the licenses files need update? - NO * Is there breaking changes for older versions? - NO * Does this needs documentation? - related with docs Author: 1ambda <1amb4a@gmail.com> Closes #2371 from 1ambda/updating-version-doc and squashes the following commits: eb02fa967 [1ambda] fix: navbar focus color applies after folding 026379ed6 [1ambda] fix: Remove docs/.listen_test a7dd4737b [1ambda] fix: sora's comment 1.2 18c5058f7 [1ambda] fix: resolve description in python_with_zeppelin.md d3ad67c73 [1ambda] fix: sora's comment 4 d133dbbcc [1ambda] fix: resolve sora's comment 3 513c6ff2c [1ambda] fix: resolve sora's comment 1.1 4c2946928 [1ambda] fix: resovle sora's comment 2 1c3946ac6 [1ambda] fix: sora's comment 1 4d6e4267f [1ambda] fix: Resolve sola's comment 3 d0524cafe [1ambda] fix: Set less shadow for nav 5f1f998ba [1ambda] docs: Add useful_develop_tools.md 9dfd62c74 [1ambda] fix: Typo in installation.md 30f7d7e06 [1ambda] fix: Typo in helium ctrl d6877e792 [1ambda] docs: Add python_with_zeppelin.md 7027e96c0 [1ambda] docs: Improve python conda, docker doc style e55b50a9d [1ambda] fix: Invalid URLs 75ddeeaff [1ambda] docs: replace URIs in interpreter 5b43993a4 [1ambda] docs: Add sql_with_zeppelin 053794e84 [1ambda] docs: Add spark_with_zeppelin.md d4d88b9c7 [1ambda] docs: Improve proxy doc b46cdd126 [1ambda] docs: Add empty interpreter_binding_mode.md 06fcb239e [1ambda] docs: Add empty personalized_mode.md 4991cf0a7 [1ambda] docs: Update upgrading.md 53142b7a0 [1ambda] fix: Simplify install.md 8a5c1e721 [1ambda] docs: Add multi_user_support.md 34095775e [1ambda] fix: Increase font size to 15px a03b04b33 [1ambda] fix: Remove sample text from trouble_shooting.md 199842590 [1ambda] fix: Remove docker doc link 66a2a7d26 [1ambda] docs: Improve impersonation page 0a6e3fc1d [1ambda] docs: Improve install doc ccd999ed5 [1ambda] docs: Improve helium doc f8d742d08 [1ambda] fix: an invalid link in navbar b7aa5f884 [1ambda] fix: URLs in development 61a175d94 [1ambda] docs: Update install.md 4c56de5c4 [1ambda] fix: URLs in setup 0b1d63513 [1ambda] fix: URLs in quickstart 28970a4fe [1ambda] feat: Add docs/usage 735946bca [1ambda] feat: rename /quickstart b351cf237 [1ambda] fix: Add missing links b70770b4f [1ambda] feat: Change URLs in nav, index 94e80aef6 [1ambda] fix: doens't display navbar version in small 6e0cab110 [1ambda] feat: Update doc section names b9ce256ff [1ambda] feat: Hide version in navbar when md f8bab52be [1ambda] fix: Better image display in index.md eeb37d5b5 [1ambda] fix: Add RL padding for mobile browser ceb60b5ee [1ambda] feat: Style collapsed nav for mobile browser 4ebafb4b6 [1ambda] commit
2017-06-19 10:13:57 +00:00
```
%python.docker activate [Repository]
%python.docker activate [Repository:Tag]
%python.docker activate [Image Id]
```
[ZEPPELIN-2596] Improving documentation page ### What is this PR for? Improving documentation page. Please check *TODO* and *Screenshots* sections for detail. The motivation is described in [the JIRA ticket](https://issues.apache.org/jira/browse/ZEPPELIN-2583) and discussion is ongoing on the mailing list. ### What type of PR is it? [Improvement | Documentation] ### Todos * [x] - improved the navbar style * [x] - improved the main page * [x] - re-organized content structure * [x] - added tutorial pages: `spark_with_zeppelin.md`, `python_with_zeppelin.md`, `sql_with_zeppelin.md` for overview * [x] - added `multi_user_support.md` page to provide overview * [x] - added the empty `interpreter_binding_mode` page. This will be handed in the different issue: [ZEPPELIN-2582](https://issues.apache.org/jira/browse/ZEPPELIN-2582) * [x] - added the empty `trouble_shooting` page. This can be filled in the following PRs. * [x] - added the empty `useful_developer_tools` page. This can be filled in the following PRs. ### What is the Jira issue? [ZEPPELIN-2596](https://issues.apache.org/jira/browse/ZEPPELIN-2596) ### How should this be tested? 1. checkout 2. `cd docs` 3. `bundle install` (make sure that you have ruby 2.1.0+ and bundle) 4. `bundle exec jekyll serve --watch` 5. open `localhost:4000` ### Screenshots (if appropriate) #### better navbar: before ![2596_before_nav](https://cloud.githubusercontent.com/assets/4968473/26542353/89004e7a-4494-11e7-89c0-28d608f5f375.gif) #### better navbar: after ![2596_after_nav](https://cloud.githubusercontent.com/assets/4968473/26542356/8bfb7b90-4494-11e7-9979-0bcaef8ba97b.gif) #### improved main page: before ![2596_before_main](https://cloud.githubusercontent.com/assets/4968473/26542358/8f35b0be-4494-11e7-8a6c-e74ec52fc384.gif) #### improved main page: after ![2596_after_main](https://cloud.githubusercontent.com/assets/4968473/26542366/93b333c8-4494-11e7-981f-3f7b4545868f.gif) #### organized content structure: before ![2596_before_content](https://cloud.githubusercontent.com/assets/4968473/26542398/ad81ac26-4494-11e7-9a17-70dff41396fb.gif) #### organized content structure: after ![2596_after_content](https://cloud.githubusercontent.com/assets/4968473/26542403/b0a42ad2-4494-11e7-8bd3-8a5bd194c6af.gif) ### Questions: * Does the licenses files need update? - NO * Is there breaking changes for older versions? - NO * Does this needs documentation? - related with docs Author: 1ambda <1amb4a@gmail.com> Closes #2371 from 1ambda/updating-version-doc and squashes the following commits: eb02fa967 [1ambda] fix: navbar focus color applies after folding 026379ed6 [1ambda] fix: Remove docs/.listen_test a7dd4737b [1ambda] fix: sora's comment 1.2 18c5058f7 [1ambda] fix: resolve description in python_with_zeppelin.md d3ad67c73 [1ambda] fix: sora's comment 4 d133dbbcc [1ambda] fix: resolve sora's comment 3 513c6ff2c [1ambda] fix: resolve sora's comment 1.1 4c2946928 [1ambda] fix: resovle sora's comment 2 1c3946ac6 [1ambda] fix: sora's comment 1 4d6e4267f [1ambda] fix: Resolve sola's comment 3 d0524cafe [1ambda] fix: Set less shadow for nav 5f1f998ba [1ambda] docs: Add useful_develop_tools.md 9dfd62c74 [1ambda] fix: Typo in installation.md 30f7d7e06 [1ambda] fix: Typo in helium ctrl d6877e792 [1ambda] docs: Add python_with_zeppelin.md 7027e96c0 [1ambda] docs: Improve python conda, docker doc style e55b50a9d [1ambda] fix: Invalid URLs 75ddeeaff [1ambda] docs: replace URIs in interpreter 5b43993a4 [1ambda] docs: Add sql_with_zeppelin 053794e84 [1ambda] docs: Add spark_with_zeppelin.md d4d88b9c7 [1ambda] docs: Improve proxy doc b46cdd126 [1ambda] docs: Add empty interpreter_binding_mode.md 06fcb239e [1ambda] docs: Add empty personalized_mode.md 4991cf0a7 [1ambda] docs: Update upgrading.md 53142b7a0 [1ambda] fix: Simplify install.md 8a5c1e721 [1ambda] docs: Add multi_user_support.md 34095775e [1ambda] fix: Increase font size to 15px a03b04b33 [1ambda] fix: Remove sample text from trouble_shooting.md 199842590 [1ambda] fix: Remove docker doc link 66a2a7d26 [1ambda] docs: Improve impersonation page 0a6e3fc1d [1ambda] docs: Improve install doc ccd999ed5 [1ambda] docs: Improve helium doc f8d742d08 [1ambda] fix: an invalid link in navbar b7aa5f884 [1ambda] fix: URLs in development 61a175d94 [1ambda] docs: Update install.md 4c56de5c4 [1ambda] fix: URLs in setup 0b1d63513 [1ambda] fix: URLs in quickstart 28970a4fe [1ambda] feat: Add docs/usage 735946bca [1ambda] feat: rename /quickstart b351cf237 [1ambda] fix: Add missing links b70770b4f [1ambda] feat: Change URLs in nav, index 94e80aef6 [1ambda] fix: doens't display navbar version in small 6e0cab110 [1ambda] feat: Update doc section names b9ce256ff [1ambda] feat: Hide version in navbar when md f8bab52be [1ambda] fix: Better image display in index.md eeb37d5b5 [1ambda] fix: Add RL padding for mobile browser ceb60b5ee [1ambda] feat: Style collapsed nav for mobile browser 4ebafb4b6 [1ambda] commit
2017-06-19 10:13:57 +00:00
- deactivate
[ZEPPELIN-2596] Improving documentation page ### What is this PR for? Improving documentation page. Please check *TODO* and *Screenshots* sections for detail. The motivation is described in [the JIRA ticket](https://issues.apache.org/jira/browse/ZEPPELIN-2583) and discussion is ongoing on the mailing list. ### What type of PR is it? [Improvement | Documentation] ### Todos * [x] - improved the navbar style * [x] - improved the main page * [x] - re-organized content structure * [x] - added tutorial pages: `spark_with_zeppelin.md`, `python_with_zeppelin.md`, `sql_with_zeppelin.md` for overview * [x] - added `multi_user_support.md` page to provide overview * [x] - added the empty `interpreter_binding_mode` page. This will be handed in the different issue: [ZEPPELIN-2582](https://issues.apache.org/jira/browse/ZEPPELIN-2582) * [x] - added the empty `trouble_shooting` page. This can be filled in the following PRs. * [x] - added the empty `useful_developer_tools` page. This can be filled in the following PRs. ### What is the Jira issue? [ZEPPELIN-2596](https://issues.apache.org/jira/browse/ZEPPELIN-2596) ### How should this be tested? 1. checkout 2. `cd docs` 3. `bundle install` (make sure that you have ruby 2.1.0+ and bundle) 4. `bundle exec jekyll serve --watch` 5. open `localhost:4000` ### Screenshots (if appropriate) #### better navbar: before ![2596_before_nav](https://cloud.githubusercontent.com/assets/4968473/26542353/89004e7a-4494-11e7-89c0-28d608f5f375.gif) #### better navbar: after ![2596_after_nav](https://cloud.githubusercontent.com/assets/4968473/26542356/8bfb7b90-4494-11e7-9979-0bcaef8ba97b.gif) #### improved main page: before ![2596_before_main](https://cloud.githubusercontent.com/assets/4968473/26542358/8f35b0be-4494-11e7-8a6c-e74ec52fc384.gif) #### improved main page: after ![2596_after_main](https://cloud.githubusercontent.com/assets/4968473/26542366/93b333c8-4494-11e7-981f-3f7b4545868f.gif) #### organized content structure: before ![2596_before_content](https://cloud.githubusercontent.com/assets/4968473/26542398/ad81ac26-4494-11e7-9a17-70dff41396fb.gif) #### organized content structure: after ![2596_after_content](https://cloud.githubusercontent.com/assets/4968473/26542403/b0a42ad2-4494-11e7-8bd3-8a5bd194c6af.gif) ### Questions: * Does the licenses files need update? - NO * Is there breaking changes for older versions? - NO * Does this needs documentation? - related with docs Author: 1ambda <1amb4a@gmail.com> Closes #2371 from 1ambda/updating-version-doc and squashes the following commits: eb02fa967 [1ambda] fix: navbar focus color applies after folding 026379ed6 [1ambda] fix: Remove docs/.listen_test a7dd4737b [1ambda] fix: sora's comment 1.2 18c5058f7 [1ambda] fix: resolve description in python_with_zeppelin.md d3ad67c73 [1ambda] fix: sora's comment 4 d133dbbcc [1ambda] fix: resolve sora's comment 3 513c6ff2c [1ambda] fix: resolve sora's comment 1.1 4c2946928 [1ambda] fix: resovle sora's comment 2 1c3946ac6 [1ambda] fix: sora's comment 1 4d6e4267f [1ambda] fix: Resolve sola's comment 3 d0524cafe [1ambda] fix: Set less shadow for nav 5f1f998ba [1ambda] docs: Add useful_develop_tools.md 9dfd62c74 [1ambda] fix: Typo in installation.md 30f7d7e06 [1ambda] fix: Typo in helium ctrl d6877e792 [1ambda] docs: Add python_with_zeppelin.md 7027e96c0 [1ambda] docs: Improve python conda, docker doc style e55b50a9d [1ambda] fix: Invalid URLs 75ddeeaff [1ambda] docs: replace URIs in interpreter 5b43993a4 [1ambda] docs: Add sql_with_zeppelin 053794e84 [1ambda] docs: Add spark_with_zeppelin.md d4d88b9c7 [1ambda] docs: Improve proxy doc b46cdd126 [1ambda] docs: Add empty interpreter_binding_mode.md 06fcb239e [1ambda] docs: Add empty personalized_mode.md 4991cf0a7 [1ambda] docs: Update upgrading.md 53142b7a0 [1ambda] fix: Simplify install.md 8a5c1e721 [1ambda] docs: Add multi_user_support.md 34095775e [1ambda] fix: Increase font size to 15px a03b04b33 [1ambda] fix: Remove sample text from trouble_shooting.md 199842590 [1ambda] fix: Remove docker doc link 66a2a7d26 [1ambda] docs: Improve impersonation page 0a6e3fc1d [1ambda] docs: Improve install doc ccd999ed5 [1ambda] docs: Improve helium doc f8d742d08 [1ambda] fix: an invalid link in navbar b7aa5f884 [1ambda] fix: URLs in development 61a175d94 [1ambda] docs: Update install.md 4c56de5c4 [1ambda] fix: URLs in setup 0b1d63513 [1ambda] fix: URLs in quickstart 28970a4fe [1ambda] feat: Add docs/usage 735946bca [1ambda] feat: rename /quickstart b351cf237 [1ambda] fix: Add missing links b70770b4f [1ambda] feat: Change URLs in nav, index 94e80aef6 [1ambda] fix: doens't display navbar version in small 6e0cab110 [1ambda] feat: Update doc section names b9ce256ff [1ambda] feat: Hide version in navbar when md f8bab52be [1ambda] fix: Better image display in index.md eeb37d5b5 [1ambda] fix: Add RL padding for mobile browser ceb60b5ee [1ambda] feat: Style collapsed nav for mobile browser 4ebafb4b6 [1ambda] commit
2017-06-19 10:13:57 +00:00
```
%python.docker deactivate
```
[ZEPPELIN-2596] Improving documentation page ### What is this PR for? Improving documentation page. Please check *TODO* and *Screenshots* sections for detail. The motivation is described in [the JIRA ticket](https://issues.apache.org/jira/browse/ZEPPELIN-2583) and discussion is ongoing on the mailing list. ### What type of PR is it? [Improvement | Documentation] ### Todos * [x] - improved the navbar style * [x] - improved the main page * [x] - re-organized content structure * [x] - added tutorial pages: `spark_with_zeppelin.md`, `python_with_zeppelin.md`, `sql_with_zeppelin.md` for overview * [x] - added `multi_user_support.md` page to provide overview * [x] - added the empty `interpreter_binding_mode` page. This will be handed in the different issue: [ZEPPELIN-2582](https://issues.apache.org/jira/browse/ZEPPELIN-2582) * [x] - added the empty `trouble_shooting` page. This can be filled in the following PRs. * [x] - added the empty `useful_developer_tools` page. This can be filled in the following PRs. ### What is the Jira issue? [ZEPPELIN-2596](https://issues.apache.org/jira/browse/ZEPPELIN-2596) ### How should this be tested? 1. checkout 2. `cd docs` 3. `bundle install` (make sure that you have ruby 2.1.0+ and bundle) 4. `bundle exec jekyll serve --watch` 5. open `localhost:4000` ### Screenshots (if appropriate) #### better navbar: before ![2596_before_nav](https://cloud.githubusercontent.com/assets/4968473/26542353/89004e7a-4494-11e7-89c0-28d608f5f375.gif) #### better navbar: after ![2596_after_nav](https://cloud.githubusercontent.com/assets/4968473/26542356/8bfb7b90-4494-11e7-9979-0bcaef8ba97b.gif) #### improved main page: before ![2596_before_main](https://cloud.githubusercontent.com/assets/4968473/26542358/8f35b0be-4494-11e7-8a6c-e74ec52fc384.gif) #### improved main page: after ![2596_after_main](https://cloud.githubusercontent.com/assets/4968473/26542366/93b333c8-4494-11e7-981f-3f7b4545868f.gif) #### organized content structure: before ![2596_before_content](https://cloud.githubusercontent.com/assets/4968473/26542398/ad81ac26-4494-11e7-9a17-70dff41396fb.gif) #### organized content structure: after ![2596_after_content](https://cloud.githubusercontent.com/assets/4968473/26542403/b0a42ad2-4494-11e7-8bd3-8a5bd194c6af.gif) ### Questions: * Does the licenses files need update? - NO * Is there breaking changes for older versions? - NO * Does this needs documentation? - related with docs Author: 1ambda <1amb4a@gmail.com> Closes #2371 from 1ambda/updating-version-doc and squashes the following commits: eb02fa967 [1ambda] fix: navbar focus color applies after folding 026379ed6 [1ambda] fix: Remove docs/.listen_test a7dd4737b [1ambda] fix: sora's comment 1.2 18c5058f7 [1ambda] fix: resolve description in python_with_zeppelin.md d3ad67c73 [1ambda] fix: sora's comment 4 d133dbbcc [1ambda] fix: resolve sora's comment 3 513c6ff2c [1ambda] fix: resolve sora's comment 1.1 4c2946928 [1ambda] fix: resovle sora's comment 2 1c3946ac6 [1ambda] fix: sora's comment 1 4d6e4267f [1ambda] fix: Resolve sola's comment 3 d0524cafe [1ambda] fix: Set less shadow for nav 5f1f998ba [1ambda] docs: Add useful_develop_tools.md 9dfd62c74 [1ambda] fix: Typo in installation.md 30f7d7e06 [1ambda] fix: Typo in helium ctrl d6877e792 [1ambda] docs: Add python_with_zeppelin.md 7027e96c0 [1ambda] docs: Improve python conda, docker doc style e55b50a9d [1ambda] fix: Invalid URLs 75ddeeaff [1ambda] docs: replace URIs in interpreter 5b43993a4 [1ambda] docs: Add sql_with_zeppelin 053794e84 [1ambda] docs: Add spark_with_zeppelin.md d4d88b9c7 [1ambda] docs: Improve proxy doc b46cdd126 [1ambda] docs: Add empty interpreter_binding_mode.md 06fcb239e [1ambda] docs: Add empty personalized_mode.md 4991cf0a7 [1ambda] docs: Update upgrading.md 53142b7a0 [1ambda] fix: Simplify install.md 8a5c1e721 [1ambda] docs: Add multi_user_support.md 34095775e [1ambda] fix: Increase font size to 15px a03b04b33 [1ambda] fix: Remove sample text from trouble_shooting.md 199842590 [1ambda] fix: Remove docker doc link 66a2a7d26 [1ambda] docs: Improve impersonation page 0a6e3fc1d [1ambda] docs: Improve install doc ccd999ed5 [1ambda] docs: Improve helium doc f8d742d08 [1ambda] fix: an invalid link in navbar b7aa5f884 [1ambda] fix: URLs in development 61a175d94 [1ambda] docs: Update install.md 4c56de5c4 [1ambda] fix: URLs in setup 0b1d63513 [1ambda] fix: URLs in quickstart 28970a4fe [1ambda] feat: Add docs/usage 735946bca [1ambda] feat: rename /quickstart b351cf237 [1ambda] fix: Add missing links b70770b4f [1ambda] feat: Change URLs in nav, index 94e80aef6 [1ambda] fix: doens't display navbar version in small 6e0cab110 [1ambda] feat: Update doc section names b9ce256ff [1ambda] feat: Hide version in navbar when md f8bab52be [1ambda] fix: Better image display in index.md eeb37d5b5 [1ambda] fix: Add RL padding for mobile browser ceb60b5ee [1ambda] feat: Style collapsed nav for mobile browser 4ebafb4b6 [1ambda] commit
2017-06-19 10:13:57 +00:00
<br/>
Here is an example
```
# activate latest tensorflow image as a python environment
%python.docker activate gcr.io/tensorflow/tensorflow:latest
```
ZEPPELIN-1115: Python - interpreter for SQL over DataFrame ### What is this PR for? Add new interpreter to Python group: `%python.sql` for SQL over DataFrame support ### What type of PR is it? Improvement ### TODOs * [x] add new interpreter `%python.sql` * [x] add test * [x] make Python-dependant tests, excluded from CI * PythonInterpreterWithPythonInstalledTest * PythonPandasSqlInterpreterTest * run manually by `mvn -Dpython.test.exclude='' test -pl python -am` * [x] add docs `%python.sql` * [x] make `%python.sql` fail gracefully in case there is no Pandas or PandaSQL installed * [x] after #747 is merged - rebase and remove `-Dpython.test.exclude=''` from both profiles ### What is the Jira issue? [ZEPPELIN-1115](https://issues.apache.org/jira/browse/ZEPPELIN-1115) ### How should this be tested? `mvn -Dpython.test.exclude='' test -pl python -am` should pass or manually run - Given the DataFrame i.e ``` %python import pandas as pd rates = pd.read_csv("bank.csv", sep=";") ``` - SQL query it like ``` %python.sql SELECT * FROM rates LIMIT 10 ``` ### Screenshots (if appropriate) ![screen shot 2016-07-11 at 23 56 04](https://cloud.githubusercontent.com/assets/5582506/16735171/1ebb9354-47c3-11e6-9354-6364e9374a20.png) ### Questions: * Does the licenses files need update? No, no dependencies were included in source or binary release * Is there breaking changes for older versions? No * Does this needs documentation? Yes Author: Alexander Bezzubov <bzz@apache.org> Closes #1164 from bzz/ZEPPELIN-1115/python/add-sql-for-dataframes and squashes the following commits: 0f2f852 [Alexander Bezzubov] Fail SQL gracefully if no python dependencies installed aca2bdf [Alexander Bezzubov] Fix typos in docs :zap: 158ba6a [Alexander Bezzubov] Remove third-party dependant test from CI 5fe46fc [Alexander Bezzubov] Update Python Matplotlib notebook example 72884c8 [Alexander Bezzubov] Add docs for %python.sql feature e931dc4 [Alexander Bezzubov] Make test for PythonPandasSqlInterpreter usable 76bbb44 [Alexander Bezzubov] Complete implementation of the PythonPandasSqlInterpreter f6ca1eb [Alexander Bezzubov] Add %python.sql to interpreter menue 11ba490 [Alexander Bezzubov] Add draft implementation of %python.sql for DataFrames
2016-07-14 05:15:42 +00:00
## Using Zeppelin Dynamic Forms
[ZEPPELIN-2596] Improving documentation page ### What is this PR for? Improving documentation page. Please check *TODO* and *Screenshots* sections for detail. The motivation is described in [the JIRA ticket](https://issues.apache.org/jira/browse/ZEPPELIN-2583) and discussion is ongoing on the mailing list. ### What type of PR is it? [Improvement | Documentation] ### Todos * [x] - improved the navbar style * [x] - improved the main page * [x] - re-organized content structure * [x] - added tutorial pages: `spark_with_zeppelin.md`, `python_with_zeppelin.md`, `sql_with_zeppelin.md` for overview * [x] - added `multi_user_support.md` page to provide overview * [x] - added the empty `interpreter_binding_mode` page. This will be handed in the different issue: [ZEPPELIN-2582](https://issues.apache.org/jira/browse/ZEPPELIN-2582) * [x] - added the empty `trouble_shooting` page. This can be filled in the following PRs. * [x] - added the empty `useful_developer_tools` page. This can be filled in the following PRs. ### What is the Jira issue? [ZEPPELIN-2596](https://issues.apache.org/jira/browse/ZEPPELIN-2596) ### How should this be tested? 1. checkout 2. `cd docs` 3. `bundle install` (make sure that you have ruby 2.1.0+ and bundle) 4. `bundle exec jekyll serve --watch` 5. open `localhost:4000` ### Screenshots (if appropriate) #### better navbar: before ![2596_before_nav](https://cloud.githubusercontent.com/assets/4968473/26542353/89004e7a-4494-11e7-89c0-28d608f5f375.gif) #### better navbar: after ![2596_after_nav](https://cloud.githubusercontent.com/assets/4968473/26542356/8bfb7b90-4494-11e7-9979-0bcaef8ba97b.gif) #### improved main page: before ![2596_before_main](https://cloud.githubusercontent.com/assets/4968473/26542358/8f35b0be-4494-11e7-8a6c-e74ec52fc384.gif) #### improved main page: after ![2596_after_main](https://cloud.githubusercontent.com/assets/4968473/26542366/93b333c8-4494-11e7-981f-3f7b4545868f.gif) #### organized content structure: before ![2596_before_content](https://cloud.githubusercontent.com/assets/4968473/26542398/ad81ac26-4494-11e7-9a17-70dff41396fb.gif) #### organized content structure: after ![2596_after_content](https://cloud.githubusercontent.com/assets/4968473/26542403/b0a42ad2-4494-11e7-8bd3-8a5bd194c6af.gif) ### Questions: * Does the licenses files need update? - NO * Is there breaking changes for older versions? - NO * Does this needs documentation? - related with docs Author: 1ambda <1amb4a@gmail.com> Closes #2371 from 1ambda/updating-version-doc and squashes the following commits: eb02fa967 [1ambda] fix: navbar focus color applies after folding 026379ed6 [1ambda] fix: Remove docs/.listen_test a7dd4737b [1ambda] fix: sora's comment 1.2 18c5058f7 [1ambda] fix: resolve description in python_with_zeppelin.md d3ad67c73 [1ambda] fix: sora's comment 4 d133dbbcc [1ambda] fix: resolve sora's comment 3 513c6ff2c [1ambda] fix: resolve sora's comment 1.1 4c2946928 [1ambda] fix: resovle sora's comment 2 1c3946ac6 [1ambda] fix: sora's comment 1 4d6e4267f [1ambda] fix: Resolve sola's comment 3 d0524cafe [1ambda] fix: Set less shadow for nav 5f1f998ba [1ambda] docs: Add useful_develop_tools.md 9dfd62c74 [1ambda] fix: Typo in installation.md 30f7d7e06 [1ambda] fix: Typo in helium ctrl d6877e792 [1ambda] docs: Add python_with_zeppelin.md 7027e96c0 [1ambda] docs: Improve python conda, docker doc style e55b50a9d [1ambda] fix: Invalid URLs 75ddeeaff [1ambda] docs: replace URIs in interpreter 5b43993a4 [1ambda] docs: Add sql_with_zeppelin 053794e84 [1ambda] docs: Add spark_with_zeppelin.md d4d88b9c7 [1ambda] docs: Improve proxy doc b46cdd126 [1ambda] docs: Add empty interpreter_binding_mode.md 06fcb239e [1ambda] docs: Add empty personalized_mode.md 4991cf0a7 [1ambda] docs: Update upgrading.md 53142b7a0 [1ambda] fix: Simplify install.md 8a5c1e721 [1ambda] docs: Add multi_user_support.md 34095775e [1ambda] fix: Increase font size to 15px a03b04b33 [1ambda] fix: Remove sample text from trouble_shooting.md 199842590 [1ambda] fix: Remove docker doc link 66a2a7d26 [1ambda] docs: Improve impersonation page 0a6e3fc1d [1ambda] docs: Improve install doc ccd999ed5 [1ambda] docs: Improve helium doc f8d742d08 [1ambda] fix: an invalid link in navbar b7aa5f884 [1ambda] fix: URLs in development 61a175d94 [1ambda] docs: Update install.md 4c56de5c4 [1ambda] fix: URLs in setup 0b1d63513 [1ambda] fix: URLs in quickstart 28970a4fe [1ambda] feat: Add docs/usage 735946bca [1ambda] feat: rename /quickstart b351cf237 [1ambda] fix: Add missing links b70770b4f [1ambda] feat: Change URLs in nav, index 94e80aef6 [1ambda] fix: doens't display navbar version in small 6e0cab110 [1ambda] feat: Update doc section names b9ce256ff [1ambda] feat: Hide version in navbar when md f8bab52be [1ambda] fix: Better image display in index.md eeb37d5b5 [1ambda] fix: Add RL padding for mobile browser ceb60b5ee [1ambda] feat: Style collapsed nav for mobile browser 4ebafb4b6 [1ambda] commit
2017-06-19 10:13:57 +00:00
You can leverage [Zeppelin Dynamic Form]({{BASE_PATH}}/usage/dynamic_form/intro.html) inside your Python code.
[ZEPPELIN-502] Python interpreter group ### What is this PR for? Adding a python 2 &3 interpreter. It's a basic implementation (no py4j for example), with a java ProcessBuilder object used to instantiate a python REPL. The interpreter doesn't bring it own python binary but uses the python specified by python.path configutation. Thus, you can still use your specific installed python modules (scikit-learn, matplotlib...) and the interpreter is able to work with python 2 & 3 without change. I had a python helper function (zeppelin_show() ) to easily display matplotlib graph as SVG. ### What type of PR is it? [Feature] ### Todos * [x] - Code review * [x] - Improve bootstrap.py : choose available helper functions and their names * [x] - Unit / IT tests ? * [x] documentation updates needed, that AhyoungRyu pointed out * [X] LICENSE needs to be updated to include all non-apache licensed dependencies (i.e AFAIK Py4j is BSD ) in bin-license * [x] double-check that code formatting conforms project style guide * [x] the branch need to be rebased on latest master. ### What is the Jira issue? [ZEPPELIN-502](https://issues.apache.org/jira/browse/ZEPPELIN-502?jql=project%20%3D%20ZEPPELIN%20AND%20text%20~%20%22python%22) ### How should this be tested? 1. In interpreter screen, in Python section, specify in python.path the python binary you want to use 2. In a paragraph, you can use the interpreter with **_%python_**. Calling help() will describe you the interpreter functionnalities. 3. Install py4j (pip install py4j) if you want to use input form ### Screenshots ![image](https://cloud.githubusercontent.com/assets/12515751/14936724/5108fb60-0ef4-11e6-93ea-232a037f7957.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14943716/98a75c4a-0fe0-11e6-9d4b-e10c39d53a15.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14936715/0eec90de-0ef4-11e6-811b-7ebe46f0d279.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14943722/b89b7824-0fe0-11e6-9c73-c12f7372d487.png) ### Questions: * Does the licenses files need update? Yes, only bin-license (py4j) * Is there breaking changes for older versions? No * Does this needs documentation? Yes Author: Hervé RIVIERE <hriviere@users.noreply.github.com> Closes #869 from hriviere/PR_interpreter_python and squashes the following commits: 80b6e75 [Hervé RIVIERE] [ZEPPELIN-502] move BSD py4j license to zeppelin-distribution/src/bin_license/license a4b82a5 [Hervé RIVIERE] [ZEPPELIN-502]Improving doc following @AhyoungRyu review 3252353 [Hervé RIVIERE] [ZEPPELIN-502] Formatting code to respect project convention 54ec4f1 [Hervé RIVIERE] [ZEPPELIN-502]Improving doc following @AhyoungRyu review 6a831bc [Hervé RIVIERE] [ZEPPELIN-502] Add BSD py4j license 11e1b9c [Hervé RIVIERE] [ZEPPELIN-502] minor changes in python.md e5d0bdb [Hervé RIVIERE] [ZEPPELIN-502] change PYTHON_PATH to ZEPPELIN_PYTHON c62ac98 [Hervé RIVIERE] [ZEPPELIN-502] Improve python.md 5008125 [Hervé RIVIERE] [ZEPPELIN-502] Improve python.md with features not yet supported and technical description 7d533e1 [Hervé RIVIERE] [ZEPPELIN-502] Add tests and reformating code to help tests writing fecaf25 [Hervé RIVIERE] [ZEPPELIN-502] Rename python.path to python and default from /usr/bin/python to python 02d1320 [Hervé RIVIERE] [ZEPPELIN-502] Input form, change from simple input form to native (pyspark syntax) 60d2956 [Hervé RIVIERE] [ZEPPELIN-502] Indent as pep8 convention 9bdb192 [Hervé RIVIERE] [ZEPPELIN-502] Add python.md to _navigation.html 7142aa5 [Hervé RIVIERE] [ZEPPELIN-502] Catch exception in logger.error 1a86ad7 [Hervé RIVIERE] [ZEPPELIN-502] Python interpreter group
2016-05-30 20:07:26 +00:00
**Zeppelin Dynamic Form can only be used if py4j Python library is installed in your system. If not, you can install it with `pip install py4j`.**
Example :
```python
%python
### Input form
print (z.input("f1","defaultValue"))
### Select form
print (z.select("f1",[("o1","1"),("o2","2")],"2"))
### Checkbox form
print("".join(z.checkbox("f3", [("o1","1"), ("o2","2")],["1"])))
```
## Matplotlib integration
ZEPPELIN-1345 - Create a custom matplotlib backend that natively supports inline plotting in a python interpreter cell ### What is this PR for? This PR is the first of two major steps needed to improve matplotlib integration in Zeppelin (ZEPPELIN-1344). The latter, which is a plotting backend with fully interactive tools enabled, will be done afterwards in a separate PR. This PR specifically for automatically displaying output from calls to matplotlib plotting functions inline with each paragraph. Thanks to the addition of post-execute hooks (ZEPPELIN-1423), there is no need to call any `show()` function to display an inline plot, just like in Jupyter. ### What type of PR is it? Improvement ### Todos The main code has been written and anyone who reads this is encouraged to test it, but there are a few minor todos: - [x] - Add unit tests - [x] - Add documentation - [x] - Add screenshot showing iterative plotting with angular mode ### What is the Jira issue? [ZEPPELIN-1345](https://issues.apache.org/jira/browse/ZEPPELIN-1345) ### How should this be tested? In a pyspark or python paragraph, enter and run ``` python import matplotlib.pyplot as plt plt.plot([1, 2, 3]) ``` The plot should be displayed automatically without calling any `show()` function whatsoever. A special method called `configure_mpl()` can also be used to modify the inline plotting behavior. For example, ``` python z.configure_mpl(close=False, angular=True) plt.plot([1, 2, 3]) ``` allows for iterative updates to the plot provided you have PY4J installed for your python installation (which of course is always the case if you use pypsark). To clarify, this feature only currently works with pyspark (not python as there are no `angularBind()` and `angularUnbind()` methods yet). Doing something like: ``` plt.plot([3, 2, 1]) ``` will update the plot that was generated by the previous paragraph by leveraging Zeppelin's Angular Display System. However, by setting `close=False`, matplotlib will no longer automatically close figures so it is now up to the user to explicitly close each figure instance they create. There's quite a bit more options for `z.configure_mpl()`, but I will save that discussion for the documentation. ### Screenshots (if appropriate) ![img](http://i.imgur.com/e1xHKnV.gif) ### Questions: - Does the licenses files need update? No - Is there breaking changes for older versions? No - Does this needs documentation? Yes Author: Alex Goodman <agoodm@users.noreply.github.com> Closes #1534 from agoodm/ZEPPELIN-1345 and squashes the following commits: 9ef6ff7 [Alex Goodman] Move mpl backend files to /interpreter 24f89c6 [Alex Goodman] Catch potential NullPointerExceptions from hook registry bdb584e [Alex Goodman] Make sure expressions are printed when no plots are shown 22b6fe4 [Alex Goodman] Remove unused variable d3d1aa0 [Alex Goodman] Fix CI test failure c90d204 [Alex Goodman] Update spark.md bcf0bf3 [Alex Goodman] Update python.md for new matplotlib integration c9b65a5 [Alex Goodman] Add iterative plotting example image 8029a05 [Alex Goodman] Update python/README.md f2d9e86 [Alex Goodman] Exclude tests are excluded in python/pom.xml 86b1c90 [Alex Goodman] Fix tutorial notebook not loading c37b00f [Alex Goodman] Fix legend in tutorial notebook a321d79 [Alex Goodman] Update python.md 82350e3 [Alex Goodman] Update matplotlib tutorial notebook 9792f97 [Alex Goodman] Add unit tests 8b9b973 [Alex Goodman] Fix NullPointerExceptions in unit tests 82135ad [Alex Goodman] Removed unused variable f9c9498 [Alex Goodman] Added support for Angular Display System edf750a [Alex Goodman] Add new matplotlib backend for python/pyspark interpreters
2016-11-06 06:03:04 +00:00
The python interpreter can display matplotlib figures inline automatically using the `pyplot` module:
[ZEPPELIN-502] Python interpreter group ### What is this PR for? Adding a python 2 &3 interpreter. It's a basic implementation (no py4j for example), with a java ProcessBuilder object used to instantiate a python REPL. The interpreter doesn't bring it own python binary but uses the python specified by python.path configutation. Thus, you can still use your specific installed python modules (scikit-learn, matplotlib...) and the interpreter is able to work with python 2 & 3 without change. I had a python helper function (zeppelin_show() ) to easily display matplotlib graph as SVG. ### What type of PR is it? [Feature] ### Todos * [x] - Code review * [x] - Improve bootstrap.py : choose available helper functions and their names * [x] - Unit / IT tests ? * [x] documentation updates needed, that AhyoungRyu pointed out * [X] LICENSE needs to be updated to include all non-apache licensed dependencies (i.e AFAIK Py4j is BSD ) in bin-license * [x] double-check that code formatting conforms project style guide * [x] the branch need to be rebased on latest master. ### What is the Jira issue? [ZEPPELIN-502](https://issues.apache.org/jira/browse/ZEPPELIN-502?jql=project%20%3D%20ZEPPELIN%20AND%20text%20~%20%22python%22) ### How should this be tested? 1. In interpreter screen, in Python section, specify in python.path the python binary you want to use 2. In a paragraph, you can use the interpreter with **_%python_**. Calling help() will describe you the interpreter functionnalities. 3. Install py4j (pip install py4j) if you want to use input form ### Screenshots ![image](https://cloud.githubusercontent.com/assets/12515751/14936724/5108fb60-0ef4-11e6-93ea-232a037f7957.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14943716/98a75c4a-0fe0-11e6-9d4b-e10c39d53a15.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14936715/0eec90de-0ef4-11e6-811b-7ebe46f0d279.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14943722/b89b7824-0fe0-11e6-9c73-c12f7372d487.png) ### Questions: * Does the licenses files need update? Yes, only bin-license (py4j) * Is there breaking changes for older versions? No * Does this needs documentation? Yes Author: Hervé RIVIERE <hriviere@users.noreply.github.com> Closes #869 from hriviere/PR_interpreter_python and squashes the following commits: 80b6e75 [Hervé RIVIERE] [ZEPPELIN-502] move BSD py4j license to zeppelin-distribution/src/bin_license/license a4b82a5 [Hervé RIVIERE] [ZEPPELIN-502]Improving doc following @AhyoungRyu review 3252353 [Hervé RIVIERE] [ZEPPELIN-502] Formatting code to respect project convention 54ec4f1 [Hervé RIVIERE] [ZEPPELIN-502]Improving doc following @AhyoungRyu review 6a831bc [Hervé RIVIERE] [ZEPPELIN-502] Add BSD py4j license 11e1b9c [Hervé RIVIERE] [ZEPPELIN-502] minor changes in python.md e5d0bdb [Hervé RIVIERE] [ZEPPELIN-502] change PYTHON_PATH to ZEPPELIN_PYTHON c62ac98 [Hervé RIVIERE] [ZEPPELIN-502] Improve python.md 5008125 [Hervé RIVIERE] [ZEPPELIN-502] Improve python.md with features not yet supported and technical description 7d533e1 [Hervé RIVIERE] [ZEPPELIN-502] Add tests and reformating code to help tests writing fecaf25 [Hervé RIVIERE] [ZEPPELIN-502] Rename python.path to python and default from /usr/bin/python to python 02d1320 [Hervé RIVIERE] [ZEPPELIN-502] Input form, change from simple input form to native (pyspark syntax) 60d2956 [Hervé RIVIERE] [ZEPPELIN-502] Indent as pep8 convention 9bdb192 [Hervé RIVIERE] [ZEPPELIN-502] Add python.md to _navigation.html 7142aa5 [Hervé RIVIERE] [ZEPPELIN-502] Catch exception in logger.error 1a86ad7 [Hervé RIVIERE] [ZEPPELIN-502] Python interpreter group
2016-05-30 20:07:26 +00:00
ZEPPELIN-1345 - Create a custom matplotlib backend that natively supports inline plotting in a python interpreter cell ### What is this PR for? This PR is the first of two major steps needed to improve matplotlib integration in Zeppelin (ZEPPELIN-1344). The latter, which is a plotting backend with fully interactive tools enabled, will be done afterwards in a separate PR. This PR specifically for automatically displaying output from calls to matplotlib plotting functions inline with each paragraph. Thanks to the addition of post-execute hooks (ZEPPELIN-1423), there is no need to call any `show()` function to display an inline plot, just like in Jupyter. ### What type of PR is it? Improvement ### Todos The main code has been written and anyone who reads this is encouraged to test it, but there are a few minor todos: - [x] - Add unit tests - [x] - Add documentation - [x] - Add screenshot showing iterative plotting with angular mode ### What is the Jira issue? [ZEPPELIN-1345](https://issues.apache.org/jira/browse/ZEPPELIN-1345) ### How should this be tested? In a pyspark or python paragraph, enter and run ``` python import matplotlib.pyplot as plt plt.plot([1, 2, 3]) ``` The plot should be displayed automatically without calling any `show()` function whatsoever. A special method called `configure_mpl()` can also be used to modify the inline plotting behavior. For example, ``` python z.configure_mpl(close=False, angular=True) plt.plot([1, 2, 3]) ``` allows for iterative updates to the plot provided you have PY4J installed for your python installation (which of course is always the case if you use pypsark). To clarify, this feature only currently works with pyspark (not python as there are no `angularBind()` and `angularUnbind()` methods yet). Doing something like: ``` plt.plot([3, 2, 1]) ``` will update the plot that was generated by the previous paragraph by leveraging Zeppelin's Angular Display System. However, by setting `close=False`, matplotlib will no longer automatically close figures so it is now up to the user to explicitly close each figure instance they create. There's quite a bit more options for `z.configure_mpl()`, but I will save that discussion for the documentation. ### Screenshots (if appropriate) ![img](http://i.imgur.com/e1xHKnV.gif) ### Questions: - Does the licenses files need update? No - Is there breaking changes for older versions? No - Does this needs documentation? Yes Author: Alex Goodman <agoodm@users.noreply.github.com> Closes #1534 from agoodm/ZEPPELIN-1345 and squashes the following commits: 9ef6ff7 [Alex Goodman] Move mpl backend files to /interpreter 24f89c6 [Alex Goodman] Catch potential NullPointerExceptions from hook registry bdb584e [Alex Goodman] Make sure expressions are printed when no plots are shown 22b6fe4 [Alex Goodman] Remove unused variable d3d1aa0 [Alex Goodman] Fix CI test failure c90d204 [Alex Goodman] Update spark.md bcf0bf3 [Alex Goodman] Update python.md for new matplotlib integration c9b65a5 [Alex Goodman] Add iterative plotting example image 8029a05 [Alex Goodman] Update python/README.md f2d9e86 [Alex Goodman] Exclude tests are excluded in python/pom.xml 86b1c90 [Alex Goodman] Fix tutorial notebook not loading c37b00f [Alex Goodman] Fix legend in tutorial notebook a321d79 [Alex Goodman] Update python.md 82350e3 [Alex Goodman] Update matplotlib tutorial notebook 9792f97 [Alex Goodman] Add unit tests 8b9b973 [Alex Goodman] Fix NullPointerExceptions in unit tests 82135ad [Alex Goodman] Removed unused variable f9c9498 [Alex Goodman] Added support for Angular Display System edf750a [Alex Goodman] Add new matplotlib backend for python/pyspark interpreters
2016-11-06 06:03:04 +00:00
```python
%python
import matplotlib.pyplot as plt
plt.plot([1, 2, 3])
```
This is the recommended method for using matplotlib from within a Zeppelin notebook. The output of this command will by default be converted to HTML by implicitly making use of the `%html` magic. Additional configuration can be achieved using the builtin `z.configure_mpl()` method. For example,
```python
z.configure_mpl(width=400, height=300, fmt='svg')
plt.plot([1, 2, 3])
```
[ZEPPELIN-2596] Improving documentation page ### What is this PR for? Improving documentation page. Please check *TODO* and *Screenshots* sections for detail. The motivation is described in [the JIRA ticket](https://issues.apache.org/jira/browse/ZEPPELIN-2583) and discussion is ongoing on the mailing list. ### What type of PR is it? [Improvement | Documentation] ### Todos * [x] - improved the navbar style * [x] - improved the main page * [x] - re-organized content structure * [x] - added tutorial pages: `spark_with_zeppelin.md`, `python_with_zeppelin.md`, `sql_with_zeppelin.md` for overview * [x] - added `multi_user_support.md` page to provide overview * [x] - added the empty `interpreter_binding_mode` page. This will be handed in the different issue: [ZEPPELIN-2582](https://issues.apache.org/jira/browse/ZEPPELIN-2582) * [x] - added the empty `trouble_shooting` page. This can be filled in the following PRs. * [x] - added the empty `useful_developer_tools` page. This can be filled in the following PRs. ### What is the Jira issue? [ZEPPELIN-2596](https://issues.apache.org/jira/browse/ZEPPELIN-2596) ### How should this be tested? 1. checkout 2. `cd docs` 3. `bundle install` (make sure that you have ruby 2.1.0+ and bundle) 4. `bundle exec jekyll serve --watch` 5. open `localhost:4000` ### Screenshots (if appropriate) #### better navbar: before ![2596_before_nav](https://cloud.githubusercontent.com/assets/4968473/26542353/89004e7a-4494-11e7-89c0-28d608f5f375.gif) #### better navbar: after ![2596_after_nav](https://cloud.githubusercontent.com/assets/4968473/26542356/8bfb7b90-4494-11e7-9979-0bcaef8ba97b.gif) #### improved main page: before ![2596_before_main](https://cloud.githubusercontent.com/assets/4968473/26542358/8f35b0be-4494-11e7-8a6c-e74ec52fc384.gif) #### improved main page: after ![2596_after_main](https://cloud.githubusercontent.com/assets/4968473/26542366/93b333c8-4494-11e7-981f-3f7b4545868f.gif) #### organized content structure: before ![2596_before_content](https://cloud.githubusercontent.com/assets/4968473/26542398/ad81ac26-4494-11e7-9a17-70dff41396fb.gif) #### organized content structure: after ![2596_after_content](https://cloud.githubusercontent.com/assets/4968473/26542403/b0a42ad2-4494-11e7-8bd3-8a5bd194c6af.gif) ### Questions: * Does the licenses files need update? - NO * Is there breaking changes for older versions? - NO * Does this needs documentation? - related with docs Author: 1ambda <1amb4a@gmail.com> Closes #2371 from 1ambda/updating-version-doc and squashes the following commits: eb02fa967 [1ambda] fix: navbar focus color applies after folding 026379ed6 [1ambda] fix: Remove docs/.listen_test a7dd4737b [1ambda] fix: sora's comment 1.2 18c5058f7 [1ambda] fix: resolve description in python_with_zeppelin.md d3ad67c73 [1ambda] fix: sora's comment 4 d133dbbcc [1ambda] fix: resolve sora's comment 3 513c6ff2c [1ambda] fix: resolve sora's comment 1.1 4c2946928 [1ambda] fix: resovle sora's comment 2 1c3946ac6 [1ambda] fix: sora's comment 1 4d6e4267f [1ambda] fix: Resolve sola's comment 3 d0524cafe [1ambda] fix: Set less shadow for nav 5f1f998ba [1ambda] docs: Add useful_develop_tools.md 9dfd62c74 [1ambda] fix: Typo in installation.md 30f7d7e06 [1ambda] fix: Typo in helium ctrl d6877e792 [1ambda] docs: Add python_with_zeppelin.md 7027e96c0 [1ambda] docs: Improve python conda, docker doc style e55b50a9d [1ambda] fix: Invalid URLs 75ddeeaff [1ambda] docs: replace URIs in interpreter 5b43993a4 [1ambda] docs: Add sql_with_zeppelin 053794e84 [1ambda] docs: Add spark_with_zeppelin.md d4d88b9c7 [1ambda] docs: Improve proxy doc b46cdd126 [1ambda] docs: Add empty interpreter_binding_mode.md 06fcb239e [1ambda] docs: Add empty personalized_mode.md 4991cf0a7 [1ambda] docs: Update upgrading.md 53142b7a0 [1ambda] fix: Simplify install.md 8a5c1e721 [1ambda] docs: Add multi_user_support.md 34095775e [1ambda] fix: Increase font size to 15px a03b04b33 [1ambda] fix: Remove sample text from trouble_shooting.md 199842590 [1ambda] fix: Remove docker doc link 66a2a7d26 [1ambda] docs: Improve impersonation page 0a6e3fc1d [1ambda] docs: Improve install doc ccd999ed5 [1ambda] docs: Improve helium doc f8d742d08 [1ambda] fix: an invalid link in navbar b7aa5f884 [1ambda] fix: URLs in development 61a175d94 [1ambda] docs: Update install.md 4c56de5c4 [1ambda] fix: URLs in setup 0b1d63513 [1ambda] fix: URLs in quickstart 28970a4fe [1ambda] feat: Add docs/usage 735946bca [1ambda] feat: rename /quickstart b351cf237 [1ambda] fix: Add missing links b70770b4f [1ambda] feat: Change URLs in nav, index 94e80aef6 [1ambda] fix: doens't display navbar version in small 6e0cab110 [1ambda] feat: Update doc section names b9ce256ff [1ambda] feat: Hide version in navbar when md f8bab52be [1ambda] fix: Better image display in index.md eeb37d5b5 [1ambda] fix: Add RL padding for mobile browser ceb60b5ee [1ambda] feat: Style collapsed nav for mobile browser 4ebafb4b6 [1ambda] commit
2017-06-19 10:13:57 +00:00
Will produce a 400x300 image in SVG format, which by default are normally 600x400 and PNG respectively.
In the future, another option called `angular` can be used to make it possible to update a plot produced from one paragraph directly from another
(the output will be `%angular` instead of `%html`). However, this feature is already available in the `pyspark` interpreter.
More details can be found in the included "Zeppelin Tutorial: Python - matplotlib basic" tutorial notebook.
ZEPPELIN-1345 - Create a custom matplotlib backend that natively supports inline plotting in a python interpreter cell ### What is this PR for? This PR is the first of two major steps needed to improve matplotlib integration in Zeppelin (ZEPPELIN-1344). The latter, which is a plotting backend with fully interactive tools enabled, will be done afterwards in a separate PR. This PR specifically for automatically displaying output from calls to matplotlib plotting functions inline with each paragraph. Thanks to the addition of post-execute hooks (ZEPPELIN-1423), there is no need to call any `show()` function to display an inline plot, just like in Jupyter. ### What type of PR is it? Improvement ### Todos The main code has been written and anyone who reads this is encouraged to test it, but there are a few minor todos: - [x] - Add unit tests - [x] - Add documentation - [x] - Add screenshot showing iterative plotting with angular mode ### What is the Jira issue? [ZEPPELIN-1345](https://issues.apache.org/jira/browse/ZEPPELIN-1345) ### How should this be tested? In a pyspark or python paragraph, enter and run ``` python import matplotlib.pyplot as plt plt.plot([1, 2, 3]) ``` The plot should be displayed automatically without calling any `show()` function whatsoever. A special method called `configure_mpl()` can also be used to modify the inline plotting behavior. For example, ``` python z.configure_mpl(close=False, angular=True) plt.plot([1, 2, 3]) ``` allows for iterative updates to the plot provided you have PY4J installed for your python installation (which of course is always the case if you use pypsark). To clarify, this feature only currently works with pyspark (not python as there are no `angularBind()` and `angularUnbind()` methods yet). Doing something like: ``` plt.plot([3, 2, 1]) ``` will update the plot that was generated by the previous paragraph by leveraging Zeppelin's Angular Display System. However, by setting `close=False`, matplotlib will no longer automatically close figures so it is now up to the user to explicitly close each figure instance they create. There's quite a bit more options for `z.configure_mpl()`, but I will save that discussion for the documentation. ### Screenshots (if appropriate) ![img](http://i.imgur.com/e1xHKnV.gif) ### Questions: - Does the licenses files need update? No - Is there breaking changes for older versions? No - Does this needs documentation? Yes Author: Alex Goodman <agoodm@users.noreply.github.com> Closes #1534 from agoodm/ZEPPELIN-1345 and squashes the following commits: 9ef6ff7 [Alex Goodman] Move mpl backend files to /interpreter 24f89c6 [Alex Goodman] Catch potential NullPointerExceptions from hook registry bdb584e [Alex Goodman] Make sure expressions are printed when no plots are shown 22b6fe4 [Alex Goodman] Remove unused variable d3d1aa0 [Alex Goodman] Fix CI test failure c90d204 [Alex Goodman] Update spark.md bcf0bf3 [Alex Goodman] Update python.md for new matplotlib integration c9b65a5 [Alex Goodman] Add iterative plotting example image 8029a05 [Alex Goodman] Update python/README.md f2d9e86 [Alex Goodman] Exclude tests are excluded in python/pom.xml 86b1c90 [Alex Goodman] Fix tutorial notebook not loading c37b00f [Alex Goodman] Fix legend in tutorial notebook a321d79 [Alex Goodman] Update python.md 82350e3 [Alex Goodman] Update matplotlib tutorial notebook 9792f97 [Alex Goodman] Add unit tests 8b9b973 [Alex Goodman] Fix NullPointerExceptions in unit tests 82135ad [Alex Goodman] Removed unused variable f9c9498 [Alex Goodman] Added support for Angular Display System edf750a [Alex Goodman] Add new matplotlib backend for python/pyspark interpreters
2016-11-06 06:03:04 +00:00
[ZEPPELIN-2596] Improving documentation page ### What is this PR for? Improving documentation page. Please check *TODO* and *Screenshots* sections for detail. The motivation is described in [the JIRA ticket](https://issues.apache.org/jira/browse/ZEPPELIN-2583) and discussion is ongoing on the mailing list. ### What type of PR is it? [Improvement | Documentation] ### Todos * [x] - improved the navbar style * [x] - improved the main page * [x] - re-organized content structure * [x] - added tutorial pages: `spark_with_zeppelin.md`, `python_with_zeppelin.md`, `sql_with_zeppelin.md` for overview * [x] - added `multi_user_support.md` page to provide overview * [x] - added the empty `interpreter_binding_mode` page. This will be handed in the different issue: [ZEPPELIN-2582](https://issues.apache.org/jira/browse/ZEPPELIN-2582) * [x] - added the empty `trouble_shooting` page. This can be filled in the following PRs. * [x] - added the empty `useful_developer_tools` page. This can be filled in the following PRs. ### What is the Jira issue? [ZEPPELIN-2596](https://issues.apache.org/jira/browse/ZEPPELIN-2596) ### How should this be tested? 1. checkout 2. `cd docs` 3. `bundle install` (make sure that you have ruby 2.1.0+ and bundle) 4. `bundle exec jekyll serve --watch` 5. open `localhost:4000` ### Screenshots (if appropriate) #### better navbar: before ![2596_before_nav](https://cloud.githubusercontent.com/assets/4968473/26542353/89004e7a-4494-11e7-89c0-28d608f5f375.gif) #### better navbar: after ![2596_after_nav](https://cloud.githubusercontent.com/assets/4968473/26542356/8bfb7b90-4494-11e7-9979-0bcaef8ba97b.gif) #### improved main page: before ![2596_before_main](https://cloud.githubusercontent.com/assets/4968473/26542358/8f35b0be-4494-11e7-8a6c-e74ec52fc384.gif) #### improved main page: after ![2596_after_main](https://cloud.githubusercontent.com/assets/4968473/26542366/93b333c8-4494-11e7-981f-3f7b4545868f.gif) #### organized content structure: before ![2596_before_content](https://cloud.githubusercontent.com/assets/4968473/26542398/ad81ac26-4494-11e7-9a17-70dff41396fb.gif) #### organized content structure: after ![2596_after_content](https://cloud.githubusercontent.com/assets/4968473/26542403/b0a42ad2-4494-11e7-8bd3-8a5bd194c6af.gif) ### Questions: * Does the licenses files need update? - NO * Is there breaking changes for older versions? - NO * Does this needs documentation? - related with docs Author: 1ambda <1amb4a@gmail.com> Closes #2371 from 1ambda/updating-version-doc and squashes the following commits: eb02fa967 [1ambda] fix: navbar focus color applies after folding 026379ed6 [1ambda] fix: Remove docs/.listen_test a7dd4737b [1ambda] fix: sora's comment 1.2 18c5058f7 [1ambda] fix: resolve description in python_with_zeppelin.md d3ad67c73 [1ambda] fix: sora's comment 4 d133dbbcc [1ambda] fix: resolve sora's comment 3 513c6ff2c [1ambda] fix: resolve sora's comment 1.1 4c2946928 [1ambda] fix: resovle sora's comment 2 1c3946ac6 [1ambda] fix: sora's comment 1 4d6e4267f [1ambda] fix: Resolve sola's comment 3 d0524cafe [1ambda] fix: Set less shadow for nav 5f1f998ba [1ambda] docs: Add useful_develop_tools.md 9dfd62c74 [1ambda] fix: Typo in installation.md 30f7d7e06 [1ambda] fix: Typo in helium ctrl d6877e792 [1ambda] docs: Add python_with_zeppelin.md 7027e96c0 [1ambda] docs: Improve python conda, docker doc style e55b50a9d [1ambda] fix: Invalid URLs 75ddeeaff [1ambda] docs: replace URIs in interpreter 5b43993a4 [1ambda] docs: Add sql_with_zeppelin 053794e84 [1ambda] docs: Add spark_with_zeppelin.md d4d88b9c7 [1ambda] docs: Improve proxy doc b46cdd126 [1ambda] docs: Add empty interpreter_binding_mode.md 06fcb239e [1ambda] docs: Add empty personalized_mode.md 4991cf0a7 [1ambda] docs: Update upgrading.md 53142b7a0 [1ambda] fix: Simplify install.md 8a5c1e721 [1ambda] docs: Add multi_user_support.md 34095775e [1ambda] fix: Increase font size to 15px a03b04b33 [1ambda] fix: Remove sample text from trouble_shooting.md 199842590 [1ambda] fix: Remove docker doc link 66a2a7d26 [1ambda] docs: Improve impersonation page 0a6e3fc1d [1ambda] docs: Improve install doc ccd999ed5 [1ambda] docs: Improve helium doc f8d742d08 [1ambda] fix: an invalid link in navbar b7aa5f884 [1ambda] fix: URLs in development 61a175d94 [1ambda] docs: Update install.md 4c56de5c4 [1ambda] fix: URLs in setup 0b1d63513 [1ambda] fix: URLs in quickstart 28970a4fe [1ambda] feat: Add docs/usage 735946bca [1ambda] feat: rename /quickstart b351cf237 [1ambda] fix: Add missing links b70770b4f [1ambda] feat: Change URLs in nav, index 94e80aef6 [1ambda] fix: doens't display navbar version in small 6e0cab110 [1ambda] feat: Update doc section names b9ce256ff [1ambda] feat: Hide version in navbar when md f8bab52be [1ambda] fix: Better image display in index.md eeb37d5b5 [1ambda] fix: Add RL padding for mobile browser ceb60b5ee [1ambda] feat: Style collapsed nav for mobile browser 4ebafb4b6 [1ambda] commit
2017-06-19 10:13:57 +00:00
If Zeppelin cannot find the matplotlib backend files (which should usually be found in `$ZEPPELIN_HOME/interpreter/lib/python`) in your `PYTHONPATH`,
then the backend will automatically be set to agg, and the (otherwise deprecated) instructions below can be used for more limited inline plotting.
ZEPPELIN-1345 - Create a custom matplotlib backend that natively supports inline plotting in a python interpreter cell ### What is this PR for? This PR is the first of two major steps needed to improve matplotlib integration in Zeppelin (ZEPPELIN-1344). The latter, which is a plotting backend with fully interactive tools enabled, will be done afterwards in a separate PR. This PR specifically for automatically displaying output from calls to matplotlib plotting functions inline with each paragraph. Thanks to the addition of post-execute hooks (ZEPPELIN-1423), there is no need to call any `show()` function to display an inline plot, just like in Jupyter. ### What type of PR is it? Improvement ### Todos The main code has been written and anyone who reads this is encouraged to test it, but there are a few minor todos: - [x] - Add unit tests - [x] - Add documentation - [x] - Add screenshot showing iterative plotting with angular mode ### What is the Jira issue? [ZEPPELIN-1345](https://issues.apache.org/jira/browse/ZEPPELIN-1345) ### How should this be tested? In a pyspark or python paragraph, enter and run ``` python import matplotlib.pyplot as plt plt.plot([1, 2, 3]) ``` The plot should be displayed automatically without calling any `show()` function whatsoever. A special method called `configure_mpl()` can also be used to modify the inline plotting behavior. For example, ``` python z.configure_mpl(close=False, angular=True) plt.plot([1, 2, 3]) ``` allows for iterative updates to the plot provided you have PY4J installed for your python installation (which of course is always the case if you use pypsark). To clarify, this feature only currently works with pyspark (not python as there are no `angularBind()` and `angularUnbind()` methods yet). Doing something like: ``` plt.plot([3, 2, 1]) ``` will update the plot that was generated by the previous paragraph by leveraging Zeppelin's Angular Display System. However, by setting `close=False`, matplotlib will no longer automatically close figures so it is now up to the user to explicitly close each figure instance they create. There's quite a bit more options for `z.configure_mpl()`, but I will save that discussion for the documentation. ### Screenshots (if appropriate) ![img](http://i.imgur.com/e1xHKnV.gif) ### Questions: - Does the licenses files need update? No - Is there breaking changes for older versions? No - Does this needs documentation? Yes Author: Alex Goodman <agoodm@users.noreply.github.com> Closes #1534 from agoodm/ZEPPELIN-1345 and squashes the following commits: 9ef6ff7 [Alex Goodman] Move mpl backend files to /interpreter 24f89c6 [Alex Goodman] Catch potential NullPointerExceptions from hook registry bdb584e [Alex Goodman] Make sure expressions are printed when no plots are shown 22b6fe4 [Alex Goodman] Remove unused variable d3d1aa0 [Alex Goodman] Fix CI test failure c90d204 [Alex Goodman] Update spark.md bcf0bf3 [Alex Goodman] Update python.md for new matplotlib integration c9b65a5 [Alex Goodman] Add iterative plotting example image 8029a05 [Alex Goodman] Update python/README.md f2d9e86 [Alex Goodman] Exclude tests are excluded in python/pom.xml 86b1c90 [Alex Goodman] Fix tutorial notebook not loading c37b00f [Alex Goodman] Fix legend in tutorial notebook a321d79 [Alex Goodman] Update python.md 82350e3 [Alex Goodman] Update matplotlib tutorial notebook 9792f97 [Alex Goodman] Add unit tests 8b9b973 [Alex Goodman] Fix NullPointerExceptions in unit tests 82135ad [Alex Goodman] Removed unused variable f9c9498 [Alex Goodman] Added support for Angular Display System edf750a [Alex Goodman] Add new matplotlib backend for python/pyspark interpreters
2016-11-06 06:03:04 +00:00
If you are unable to load the inline backend, use `z.show(plt)`:
[ZEPPELIN-502] Python interpreter group ### What is this PR for? Adding a python 2 &3 interpreter. It's a basic implementation (no py4j for example), with a java ProcessBuilder object used to instantiate a python REPL. The interpreter doesn't bring it own python binary but uses the python specified by python.path configutation. Thus, you can still use your specific installed python modules (scikit-learn, matplotlib...) and the interpreter is able to work with python 2 & 3 without change. I had a python helper function (zeppelin_show() ) to easily display matplotlib graph as SVG. ### What type of PR is it? [Feature] ### Todos * [x] - Code review * [x] - Improve bootstrap.py : choose available helper functions and their names * [x] - Unit / IT tests ? * [x] documentation updates needed, that AhyoungRyu pointed out * [X] LICENSE needs to be updated to include all non-apache licensed dependencies (i.e AFAIK Py4j is BSD ) in bin-license * [x] double-check that code formatting conforms project style guide * [x] the branch need to be rebased on latest master. ### What is the Jira issue? [ZEPPELIN-502](https://issues.apache.org/jira/browse/ZEPPELIN-502?jql=project%20%3D%20ZEPPELIN%20AND%20text%20~%20%22python%22) ### How should this be tested? 1. In interpreter screen, in Python section, specify in python.path the python binary you want to use 2. In a paragraph, you can use the interpreter with **_%python_**. Calling help() will describe you the interpreter functionnalities. 3. Install py4j (pip install py4j) if you want to use input form ### Screenshots ![image](https://cloud.githubusercontent.com/assets/12515751/14936724/5108fb60-0ef4-11e6-93ea-232a037f7957.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14943716/98a75c4a-0fe0-11e6-9d4b-e10c39d53a15.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14936715/0eec90de-0ef4-11e6-811b-7ebe46f0d279.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14943722/b89b7824-0fe0-11e6-9c73-c12f7372d487.png) ### Questions: * Does the licenses files need update? Yes, only bin-license (py4j) * Is there breaking changes for older versions? No * Does this needs documentation? Yes Author: Hervé RIVIERE <hriviere@users.noreply.github.com> Closes #869 from hriviere/PR_interpreter_python and squashes the following commits: 80b6e75 [Hervé RIVIERE] [ZEPPELIN-502] move BSD py4j license to zeppelin-distribution/src/bin_license/license a4b82a5 [Hervé RIVIERE] [ZEPPELIN-502]Improving doc following @AhyoungRyu review 3252353 [Hervé RIVIERE] [ZEPPELIN-502] Formatting code to respect project convention 54ec4f1 [Hervé RIVIERE] [ZEPPELIN-502]Improving doc following @AhyoungRyu review 6a831bc [Hervé RIVIERE] [ZEPPELIN-502] Add BSD py4j license 11e1b9c [Hervé RIVIERE] [ZEPPELIN-502] minor changes in python.md e5d0bdb [Hervé RIVIERE] [ZEPPELIN-502] change PYTHON_PATH to ZEPPELIN_PYTHON c62ac98 [Hervé RIVIERE] [ZEPPELIN-502] Improve python.md 5008125 [Hervé RIVIERE] [ZEPPELIN-502] Improve python.md with features not yet supported and technical description 7d533e1 [Hervé RIVIERE] [ZEPPELIN-502] Add tests and reformating code to help tests writing fecaf25 [Hervé RIVIERE] [ZEPPELIN-502] Rename python.path to python and default from /usr/bin/python to python 02d1320 [Hervé RIVIERE] [ZEPPELIN-502] Input form, change from simple input form to native (pyspark syntax) 60d2956 [Hervé RIVIERE] [ZEPPELIN-502] Indent as pep8 convention 9bdb192 [Hervé RIVIERE] [ZEPPELIN-502] Add python.md to _navigation.html 7142aa5 [Hervé RIVIERE] [ZEPPELIN-502] Catch exception in logger.error 1a86ad7 [Hervé RIVIERE] [ZEPPELIN-502] Python interpreter group
2016-05-30 20:07:26 +00:00
```python
%python
import matplotlib.pyplot as plt
plt.figure()
(.. ..)
ZEPPELIN-1048: Pandas support for python interpreter ### What is this PR for? Display Pandas DataFrame using Zeppelin's Table Display system. ### What type of PR is it? Feature ### Todos * [x] fix NPE in logs on empty paragraph execution * [x] matplotlib: refactor `zeppelin_show(plt)` -> `z.show(plt)` * [x] pandas: support `z.show(df)` * [x] update docs ### What is the Jira issue? [ZEPPELIN-1048](https://issues.apache.org/jira/browse/ZEPPELIN-1048) ### How should this be tested? "Zeppelin Tutorial: Python - matplotlib basic" should work, and ```python import pandas as pd rates = pd.read_csv("bank.csv", sep=";") z.show(rates) ``` ### Screenshots (if appropriate) ![screen shot 2016-06-23 at 10 29 00](https://cloud.githubusercontent.com/assets/5582506/16289133/85f0ddbc-392d-11e6-86a3-28d10e73f68d.png) ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? Yes Author: Alexander Bezzubov <bzz@apache.org> Closes #1067 from bzz/python/pandas-support and squashes the following commits: 3b1ad36 [Alexander Bezzubov] Python: update docs to reffer new API ee6668b [Alexander Bezzubov] Python: update docs, add Pandas integration 71be418 [Alexander Bezzubov] Python: limit 1000 for table display system on DataFrame 52e787d [Alexander Bezzubov] Python: pandas DataFrame using Table display system bc91b86 [Alexander Bezzubov] Python: skip interpreting empty paragraphs a7248cd [Alexander Bezzubov] Python: draft of pandas support 15646a1 [Alexander Bezzubov] Python: refactoring to z.show()
2016-06-23 01:25:49 +00:00
z.show(plt)
[ZEPPELIN-502] Python interpreter group ### What is this PR for? Adding a python 2 &3 interpreter. It's a basic implementation (no py4j for example), with a java ProcessBuilder object used to instantiate a python REPL. The interpreter doesn't bring it own python binary but uses the python specified by python.path configutation. Thus, you can still use your specific installed python modules (scikit-learn, matplotlib...) and the interpreter is able to work with python 2 & 3 without change. I had a python helper function (zeppelin_show() ) to easily display matplotlib graph as SVG. ### What type of PR is it? [Feature] ### Todos * [x] - Code review * [x] - Improve bootstrap.py : choose available helper functions and their names * [x] - Unit / IT tests ? * [x] documentation updates needed, that AhyoungRyu pointed out * [X] LICENSE needs to be updated to include all non-apache licensed dependencies (i.e AFAIK Py4j is BSD ) in bin-license * [x] double-check that code formatting conforms project style guide * [x] the branch need to be rebased on latest master. ### What is the Jira issue? [ZEPPELIN-502](https://issues.apache.org/jira/browse/ZEPPELIN-502?jql=project%20%3D%20ZEPPELIN%20AND%20text%20~%20%22python%22) ### How should this be tested? 1. In interpreter screen, in Python section, specify in python.path the python binary you want to use 2. In a paragraph, you can use the interpreter with **_%python_**. Calling help() will describe you the interpreter functionnalities. 3. Install py4j (pip install py4j) if you want to use input form ### Screenshots ![image](https://cloud.githubusercontent.com/assets/12515751/14936724/5108fb60-0ef4-11e6-93ea-232a037f7957.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14943716/98a75c4a-0fe0-11e6-9d4b-e10c39d53a15.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14936715/0eec90de-0ef4-11e6-811b-7ebe46f0d279.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14943722/b89b7824-0fe0-11e6-9c73-c12f7372d487.png) ### Questions: * Does the licenses files need update? Yes, only bin-license (py4j) * Is there breaking changes for older versions? No * Does this needs documentation? Yes Author: Hervé RIVIERE <hriviere@users.noreply.github.com> Closes #869 from hriviere/PR_interpreter_python and squashes the following commits: 80b6e75 [Hervé RIVIERE] [ZEPPELIN-502] move BSD py4j license to zeppelin-distribution/src/bin_license/license a4b82a5 [Hervé RIVIERE] [ZEPPELIN-502]Improving doc following @AhyoungRyu review 3252353 [Hervé RIVIERE] [ZEPPELIN-502] Formatting code to respect project convention 54ec4f1 [Hervé RIVIERE] [ZEPPELIN-502]Improving doc following @AhyoungRyu review 6a831bc [Hervé RIVIERE] [ZEPPELIN-502] Add BSD py4j license 11e1b9c [Hervé RIVIERE] [ZEPPELIN-502] minor changes in python.md e5d0bdb [Hervé RIVIERE] [ZEPPELIN-502] change PYTHON_PATH to ZEPPELIN_PYTHON c62ac98 [Hervé RIVIERE] [ZEPPELIN-502] Improve python.md 5008125 [Hervé RIVIERE] [ZEPPELIN-502] Improve python.md with features not yet supported and technical description 7d533e1 [Hervé RIVIERE] [ZEPPELIN-502] Add tests and reformating code to help tests writing fecaf25 [Hervé RIVIERE] [ZEPPELIN-502] Rename python.path to python and default from /usr/bin/python to python 02d1320 [Hervé RIVIERE] [ZEPPELIN-502] Input form, change from simple input form to native (pyspark syntax) 60d2956 [Hervé RIVIERE] [ZEPPELIN-502] Indent as pep8 convention 9bdb192 [Hervé RIVIERE] [ZEPPELIN-502] Add python.md to _navigation.html 7142aa5 [Hervé RIVIERE] [ZEPPELIN-502] Catch exception in logger.error 1a86ad7 [Hervé RIVIERE] [ZEPPELIN-502] Python interpreter group
2016-05-30 20:07:26 +00:00
plt.close()
```
ZEPPELIN-1318 - Add support for matplotlib displaying png images in python interpreter ### What is this PR for? This PR adds support for plotting png images using the matplotlib helper function within a python interpreter (eg `z.show()`). The primary motivation for this is due to the overhead incurred from svg images, which can lag the notebooks if multiple, complicated images are generated (for example, multiple filled contour plots). png images are more lightweight, but of course come at a cost of image quality due to them being raster rather than vector like svg. The support for png images is incorporated through the use of a new optional argument to `z.show` called `fmt` which can be one of `'svg'` or `'png'`. The same code that is currently used in show is used for svg images while the code for png images relies on converting the image directly to a byte array and then entering the decoded byte string directly into an HTML image tag. Currently `fmt` defaults to `'png'` but I think we should consider discussing the pros and cons of each option in this PR. ### What type of PR is it? Improvement ### What is the Jira issue? [ZEPPELIN-1318](https://issues.apache.org/jira/browse/ZEPPELIN-1318) ### How should this be tested? In a notebook cell, enter: ```python %python import matplotlib.pyplot as plt import numpy as np plt.figure() plt.plot(np.arange(10)) z.show(plt, fmt=fmt) ``` Where `fmt` may be one of `'svg'` or `'png'`, and any other input should result in a `ValueError`. I would also recommend testing the example in the screenshot below. ### Screenshots (if appropriate) ![zeppelin plot](https://puu.sh/qzc4t/b8fcfe856e.png) ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? Yes (if the changes to the `help()` docstring are not sufficient) Author: Alex Goodman <agoodm@users.noreply.github.com> Closes #1329 from agoodm/ZEPPELIN-1318 and squashes the following commits: 2e9ce4c [Alex Goodman] Update python.md 1efa0c9 [Alex Goodman] ZEPPELIN-1318 - Add support for png images in z.show()
2016-08-13 04:42:48 +00:00
The `z.show()` function can take optional parameters to adapt graph dimensions (width and height) as well as output format (png or optionally svg).
[ZEPPELIN-502] Python interpreter group ### What is this PR for? Adding a python 2 &3 interpreter. It's a basic implementation (no py4j for example), with a java ProcessBuilder object used to instantiate a python REPL. The interpreter doesn't bring it own python binary but uses the python specified by python.path configutation. Thus, you can still use your specific installed python modules (scikit-learn, matplotlib...) and the interpreter is able to work with python 2 & 3 without change. I had a python helper function (zeppelin_show() ) to easily display matplotlib graph as SVG. ### What type of PR is it? [Feature] ### Todos * [x] - Code review * [x] - Improve bootstrap.py : choose available helper functions and their names * [x] - Unit / IT tests ? * [x] documentation updates needed, that AhyoungRyu pointed out * [X] LICENSE needs to be updated to include all non-apache licensed dependencies (i.e AFAIK Py4j is BSD ) in bin-license * [x] double-check that code formatting conforms project style guide * [x] the branch need to be rebased on latest master. ### What is the Jira issue? [ZEPPELIN-502](https://issues.apache.org/jira/browse/ZEPPELIN-502?jql=project%20%3D%20ZEPPELIN%20AND%20text%20~%20%22python%22) ### How should this be tested? 1. In interpreter screen, in Python section, specify in python.path the python binary you want to use 2. In a paragraph, you can use the interpreter with **_%python_**. Calling help() will describe you the interpreter functionnalities. 3. Install py4j (pip install py4j) if you want to use input form ### Screenshots ![image](https://cloud.githubusercontent.com/assets/12515751/14936724/5108fb60-0ef4-11e6-93ea-232a037f7957.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14943716/98a75c4a-0fe0-11e6-9d4b-e10c39d53a15.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14936715/0eec90de-0ef4-11e6-811b-7ebe46f0d279.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14943722/b89b7824-0fe0-11e6-9c73-c12f7372d487.png) ### Questions: * Does the licenses files need update? Yes, only bin-license (py4j) * Is there breaking changes for older versions? No * Does this needs documentation? Yes Author: Hervé RIVIERE <hriviere@users.noreply.github.com> Closes #869 from hriviere/PR_interpreter_python and squashes the following commits: 80b6e75 [Hervé RIVIERE] [ZEPPELIN-502] move BSD py4j license to zeppelin-distribution/src/bin_license/license a4b82a5 [Hervé RIVIERE] [ZEPPELIN-502]Improving doc following @AhyoungRyu review 3252353 [Hervé RIVIERE] [ZEPPELIN-502] Formatting code to respect project convention 54ec4f1 [Hervé RIVIERE] [ZEPPELIN-502]Improving doc following @AhyoungRyu review 6a831bc [Hervé RIVIERE] [ZEPPELIN-502] Add BSD py4j license 11e1b9c [Hervé RIVIERE] [ZEPPELIN-502] minor changes in python.md e5d0bdb [Hervé RIVIERE] [ZEPPELIN-502] change PYTHON_PATH to ZEPPELIN_PYTHON c62ac98 [Hervé RIVIERE] [ZEPPELIN-502] Improve python.md 5008125 [Hervé RIVIERE] [ZEPPELIN-502] Improve python.md with features not yet supported and technical description 7d533e1 [Hervé RIVIERE] [ZEPPELIN-502] Add tests and reformating code to help tests writing fecaf25 [Hervé RIVIERE] [ZEPPELIN-502] Rename python.path to python and default from /usr/bin/python to python 02d1320 [Hervé RIVIERE] [ZEPPELIN-502] Input form, change from simple input form to native (pyspark syntax) 60d2956 [Hervé RIVIERE] [ZEPPELIN-502] Indent as pep8 convention 9bdb192 [Hervé RIVIERE] [ZEPPELIN-502] Add python.md to _navigation.html 7142aa5 [Hervé RIVIERE] [ZEPPELIN-502] Catch exception in logger.error 1a86ad7 [Hervé RIVIERE] [ZEPPELIN-502] Python interpreter group
2016-05-30 20:07:26 +00:00
```python
%python
ZEPPELIN-1048: Pandas support for python interpreter ### What is this PR for? Display Pandas DataFrame using Zeppelin's Table Display system. ### What type of PR is it? Feature ### Todos * [x] fix NPE in logs on empty paragraph execution * [x] matplotlib: refactor `zeppelin_show(plt)` -> `z.show(plt)` * [x] pandas: support `z.show(df)` * [x] update docs ### What is the Jira issue? [ZEPPELIN-1048](https://issues.apache.org/jira/browse/ZEPPELIN-1048) ### How should this be tested? "Zeppelin Tutorial: Python - matplotlib basic" should work, and ```python import pandas as pd rates = pd.read_csv("bank.csv", sep=";") z.show(rates) ``` ### Screenshots (if appropriate) ![screen shot 2016-06-23 at 10 29 00](https://cloud.githubusercontent.com/assets/5582506/16289133/85f0ddbc-392d-11e6-86a3-28d10e73f68d.png) ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? Yes Author: Alexander Bezzubov <bzz@apache.org> Closes #1067 from bzz/python/pandas-support and squashes the following commits: 3b1ad36 [Alexander Bezzubov] Python: update docs to reffer new API ee6668b [Alexander Bezzubov] Python: update docs, add Pandas integration 71be418 [Alexander Bezzubov] Python: limit 1000 for table display system on DataFrame 52e787d [Alexander Bezzubov] Python: pandas DataFrame using Table display system bc91b86 [Alexander Bezzubov] Python: skip interpreting empty paragraphs a7248cd [Alexander Bezzubov] Python: draft of pandas support 15646a1 [Alexander Bezzubov] Python: refactoring to z.show()
2016-06-23 01:25:49 +00:00
z.show(plt, width='50px')
ZEPPELIN-1318 - Add support for matplotlib displaying png images in python interpreter ### What is this PR for? This PR adds support for plotting png images using the matplotlib helper function within a python interpreter (eg `z.show()`). The primary motivation for this is due to the overhead incurred from svg images, which can lag the notebooks if multiple, complicated images are generated (for example, multiple filled contour plots). png images are more lightweight, but of course come at a cost of image quality due to them being raster rather than vector like svg. The support for png images is incorporated through the use of a new optional argument to `z.show` called `fmt` which can be one of `'svg'` or `'png'`. The same code that is currently used in show is used for svg images while the code for png images relies on converting the image directly to a byte array and then entering the decoded byte string directly into an HTML image tag. Currently `fmt` defaults to `'png'` but I think we should consider discussing the pros and cons of each option in this PR. ### What type of PR is it? Improvement ### What is the Jira issue? [ZEPPELIN-1318](https://issues.apache.org/jira/browse/ZEPPELIN-1318) ### How should this be tested? In a notebook cell, enter: ```python %python import matplotlib.pyplot as plt import numpy as np plt.figure() plt.plot(np.arange(10)) z.show(plt, fmt=fmt) ``` Where `fmt` may be one of `'svg'` or `'png'`, and any other input should result in a `ValueError`. I would also recommend testing the example in the screenshot below. ### Screenshots (if appropriate) ![zeppelin plot](https://puu.sh/qzc4t/b8fcfe856e.png) ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? Yes (if the changes to the `help()` docstring are not sufficient) Author: Alex Goodman <agoodm@users.noreply.github.com> Closes #1329 from agoodm/ZEPPELIN-1318 and squashes the following commits: 2e9ce4c [Alex Goodman] Update python.md 1efa0c9 [Alex Goodman] ZEPPELIN-1318 - Add support for png images in z.show()
2016-08-13 04:42:48 +00:00
z.show(plt, height='150px', fmt='svg')
[ZEPPELIN-502] Python interpreter group ### What is this PR for? Adding a python 2 &3 interpreter. It's a basic implementation (no py4j for example), with a java ProcessBuilder object used to instantiate a python REPL. The interpreter doesn't bring it own python binary but uses the python specified by python.path configutation. Thus, you can still use your specific installed python modules (scikit-learn, matplotlib...) and the interpreter is able to work with python 2 & 3 without change. I had a python helper function (zeppelin_show() ) to easily display matplotlib graph as SVG. ### What type of PR is it? [Feature] ### Todos * [x] - Code review * [x] - Improve bootstrap.py : choose available helper functions and their names * [x] - Unit / IT tests ? * [x] documentation updates needed, that AhyoungRyu pointed out * [X] LICENSE needs to be updated to include all non-apache licensed dependencies (i.e AFAIK Py4j is BSD ) in bin-license * [x] double-check that code formatting conforms project style guide * [x] the branch need to be rebased on latest master. ### What is the Jira issue? [ZEPPELIN-502](https://issues.apache.org/jira/browse/ZEPPELIN-502?jql=project%20%3D%20ZEPPELIN%20AND%20text%20~%20%22python%22) ### How should this be tested? 1. In interpreter screen, in Python section, specify in python.path the python binary you want to use 2. In a paragraph, you can use the interpreter with **_%python_**. Calling help() will describe you the interpreter functionnalities. 3. Install py4j (pip install py4j) if you want to use input form ### Screenshots ![image](https://cloud.githubusercontent.com/assets/12515751/14936724/5108fb60-0ef4-11e6-93ea-232a037f7957.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14943716/98a75c4a-0fe0-11e6-9d4b-e10c39d53a15.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14936715/0eec90de-0ef4-11e6-811b-7ebe46f0d279.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14943722/b89b7824-0fe0-11e6-9c73-c12f7372d487.png) ### Questions: * Does the licenses files need update? Yes, only bin-license (py4j) * Is there breaking changes for older versions? No * Does this needs documentation? Yes Author: Hervé RIVIERE <hriviere@users.noreply.github.com> Closes #869 from hriviere/PR_interpreter_python and squashes the following commits: 80b6e75 [Hervé RIVIERE] [ZEPPELIN-502] move BSD py4j license to zeppelin-distribution/src/bin_license/license a4b82a5 [Hervé RIVIERE] [ZEPPELIN-502]Improving doc following @AhyoungRyu review 3252353 [Hervé RIVIERE] [ZEPPELIN-502] Formatting code to respect project convention 54ec4f1 [Hervé RIVIERE] [ZEPPELIN-502]Improving doc following @AhyoungRyu review 6a831bc [Hervé RIVIERE] [ZEPPELIN-502] Add BSD py4j license 11e1b9c [Hervé RIVIERE] [ZEPPELIN-502] minor changes in python.md e5d0bdb [Hervé RIVIERE] [ZEPPELIN-502] change PYTHON_PATH to ZEPPELIN_PYTHON c62ac98 [Hervé RIVIERE] [ZEPPELIN-502] Improve python.md 5008125 [Hervé RIVIERE] [ZEPPELIN-502] Improve python.md with features not yet supported and technical description 7d533e1 [Hervé RIVIERE] [ZEPPELIN-502] Add tests and reformating code to help tests writing fecaf25 [Hervé RIVIERE] [ZEPPELIN-502] Rename python.path to python and default from /usr/bin/python to python 02d1320 [Hervé RIVIERE] [ZEPPELIN-502] Input form, change from simple input form to native (pyspark syntax) 60d2956 [Hervé RIVIERE] [ZEPPELIN-502] Indent as pep8 convention 9bdb192 [Hervé RIVIERE] [ZEPPELIN-502] Add python.md to _navigation.html 7142aa5 [Hervé RIVIERE] [ZEPPELIN-502] Catch exception in logger.error 1a86ad7 [Hervé RIVIERE] [ZEPPELIN-502] Python interpreter group
2016-05-30 20:07:26 +00:00
```
[ZEPPELIN-2707][DOCS][HOTFIX] fix: broken image URLs in 0.8.0-SNAPSHOT doc ### What is this PR for? fix: broken image URLs in 0.8.0-SNAPSHOT doc using the path `/asset` (the absolute path) for image URLs is actually invalid. That's because each version has its own image directory. So they should use the relative path. `{{BASE_PATH}}` ``` ➜ asf-zeppelin tree site | grep asset ├── assets # root asset, we shouldn't use it in versioned doc. │ │ ├── assets │ │ ├── assets │ │ ├── assets │ │ ├── assets │ │ ├── assets │ │ ├── assets │ │ ├── assets │ │ ├── assets │ │ ├── assets │ ├── assets ``` ### What type of PR is it? [Bug Fix] ### Todos DONE ### What is the Jira issue? [ZEPPELIN-2707](https://issues.apache.org/jira/browse/ZEPPELIN-2707) ### How should this be tested? 1. cd `docs/` 2. build: `bundle exec jekyll build --safe` 3. check whether links in `_site` include `/docs/0.8.0-SNAPSHOT` as prefix or not ### Screenshots (if appropriate) #### Current http://zeppelin.apache.org/docs/0.8.0-SNAPSHOT/usage/interpreter/overview.html ![image](https://user-images.githubusercontent.com/4968473/27685112-bcca5846-5d07-11e7-89bb-3965015cf5a5.png) #### After ![image](https://user-images.githubusercontent.com/4968473/27685218-3490fad8-5d08-11e7-9133-0e148689986e.png) ### Questions: * Does the licenses files need update? - NO * Is there breaking changes for older versions? - NO * Does this needs documentation? - NO Author: 1ambda <1amb4a@gmail.com> Closes #2450 from 1ambda/ZEPPELIN-2707/should-use-its-own-asset-directory and squashes the following commits: fb70214a [1ambda] fix: Use its own asset dir
2017-06-29 11:13:41 +00:00
<img class="img-responsive" src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/pythonMatplotlib.png" />
[ZEPPELIN-502] Python interpreter group ### What is this PR for? Adding a python 2 &3 interpreter. It's a basic implementation (no py4j for example), with a java ProcessBuilder object used to instantiate a python REPL. The interpreter doesn't bring it own python binary but uses the python specified by python.path configutation. Thus, you can still use your specific installed python modules (scikit-learn, matplotlib...) and the interpreter is able to work with python 2 & 3 without change. I had a python helper function (zeppelin_show() ) to easily display matplotlib graph as SVG. ### What type of PR is it? [Feature] ### Todos * [x] - Code review * [x] - Improve bootstrap.py : choose available helper functions and their names * [x] - Unit / IT tests ? * [x] documentation updates needed, that AhyoungRyu pointed out * [X] LICENSE needs to be updated to include all non-apache licensed dependencies (i.e AFAIK Py4j is BSD ) in bin-license * [x] double-check that code formatting conforms project style guide * [x] the branch need to be rebased on latest master. ### What is the Jira issue? [ZEPPELIN-502](https://issues.apache.org/jira/browse/ZEPPELIN-502?jql=project%20%3D%20ZEPPELIN%20AND%20text%20~%20%22python%22) ### How should this be tested? 1. In interpreter screen, in Python section, specify in python.path the python binary you want to use 2. In a paragraph, you can use the interpreter with **_%python_**. Calling help() will describe you the interpreter functionnalities. 3. Install py4j (pip install py4j) if you want to use input form ### Screenshots ![image](https://cloud.githubusercontent.com/assets/12515751/14936724/5108fb60-0ef4-11e6-93ea-232a037f7957.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14943716/98a75c4a-0fe0-11e6-9d4b-e10c39d53a15.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14936715/0eec90de-0ef4-11e6-811b-7ebe46f0d279.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14943722/b89b7824-0fe0-11e6-9c73-c12f7372d487.png) ### Questions: * Does the licenses files need update? Yes, only bin-license (py4j) * Is there breaking changes for older versions? No * Does this needs documentation? Yes Author: Hervé RIVIERE <hriviere@users.noreply.github.com> Closes #869 from hriviere/PR_interpreter_python and squashes the following commits: 80b6e75 [Hervé RIVIERE] [ZEPPELIN-502] move BSD py4j license to zeppelin-distribution/src/bin_license/license a4b82a5 [Hervé RIVIERE] [ZEPPELIN-502]Improving doc following @AhyoungRyu review 3252353 [Hervé RIVIERE] [ZEPPELIN-502] Formatting code to respect project convention 54ec4f1 [Hervé RIVIERE] [ZEPPELIN-502]Improving doc following @AhyoungRyu review 6a831bc [Hervé RIVIERE] [ZEPPELIN-502] Add BSD py4j license 11e1b9c [Hervé RIVIERE] [ZEPPELIN-502] minor changes in python.md e5d0bdb [Hervé RIVIERE] [ZEPPELIN-502] change PYTHON_PATH to ZEPPELIN_PYTHON c62ac98 [Hervé RIVIERE] [ZEPPELIN-502] Improve python.md 5008125 [Hervé RIVIERE] [ZEPPELIN-502] Improve python.md with features not yet supported and technical description 7d533e1 [Hervé RIVIERE] [ZEPPELIN-502] Add tests and reformating code to help tests writing fecaf25 [Hervé RIVIERE] [ZEPPELIN-502] Rename python.path to python and default from /usr/bin/python to python 02d1320 [Hervé RIVIERE] [ZEPPELIN-502] Input form, change from simple input form to native (pyspark syntax) 60d2956 [Hervé RIVIERE] [ZEPPELIN-502] Indent as pep8 convention 9bdb192 [Hervé RIVIERE] [ZEPPELIN-502] Add python.md to _navigation.html 7142aa5 [Hervé RIVIERE] [ZEPPELIN-502] Catch exception in logger.error 1a86ad7 [Hervé RIVIERE] [ZEPPELIN-502] Python interpreter group
2016-05-30 20:07:26 +00:00
ZEPPELIN-1048: Pandas support for python interpreter ### What is this PR for? Display Pandas DataFrame using Zeppelin's Table Display system. ### What type of PR is it? Feature ### Todos * [x] fix NPE in logs on empty paragraph execution * [x] matplotlib: refactor `zeppelin_show(plt)` -> `z.show(plt)` * [x] pandas: support `z.show(df)` * [x] update docs ### What is the Jira issue? [ZEPPELIN-1048](https://issues.apache.org/jira/browse/ZEPPELIN-1048) ### How should this be tested? "Zeppelin Tutorial: Python - matplotlib basic" should work, and ```python import pandas as pd rates = pd.read_csv("bank.csv", sep=";") z.show(rates) ``` ### Screenshots (if appropriate) ![screen shot 2016-06-23 at 10 29 00](https://cloud.githubusercontent.com/assets/5582506/16289133/85f0ddbc-392d-11e6-86a3-28d10e73f68d.png) ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? Yes Author: Alexander Bezzubov <bzz@apache.org> Closes #1067 from bzz/python/pandas-support and squashes the following commits: 3b1ad36 [Alexander Bezzubov] Python: update docs to reffer new API ee6668b [Alexander Bezzubov] Python: update docs, add Pandas integration 71be418 [Alexander Bezzubov] Python: limit 1000 for table display system on DataFrame 52e787d [Alexander Bezzubov] Python: pandas DataFrame using Table display system bc91b86 [Alexander Bezzubov] Python: skip interpreting empty paragraphs a7248cd [Alexander Bezzubov] Python: draft of pandas support 15646a1 [Alexander Bezzubov] Python: refactoring to z.show()
2016-06-23 01:25:49 +00:00
## Pandas integration
[ZEPPELIN-2596] Improving documentation page ### What is this PR for? Improving documentation page. Please check *TODO* and *Screenshots* sections for detail. The motivation is described in [the JIRA ticket](https://issues.apache.org/jira/browse/ZEPPELIN-2583) and discussion is ongoing on the mailing list. ### What type of PR is it? [Improvement | Documentation] ### Todos * [x] - improved the navbar style * [x] - improved the main page * [x] - re-organized content structure * [x] - added tutorial pages: `spark_with_zeppelin.md`, `python_with_zeppelin.md`, `sql_with_zeppelin.md` for overview * [x] - added `multi_user_support.md` page to provide overview * [x] - added the empty `interpreter_binding_mode` page. This will be handed in the different issue: [ZEPPELIN-2582](https://issues.apache.org/jira/browse/ZEPPELIN-2582) * [x] - added the empty `trouble_shooting` page. This can be filled in the following PRs. * [x] - added the empty `useful_developer_tools` page. This can be filled in the following PRs. ### What is the Jira issue? [ZEPPELIN-2596](https://issues.apache.org/jira/browse/ZEPPELIN-2596) ### How should this be tested? 1. checkout 2. `cd docs` 3. `bundle install` (make sure that you have ruby 2.1.0+ and bundle) 4. `bundle exec jekyll serve --watch` 5. open `localhost:4000` ### Screenshots (if appropriate) #### better navbar: before ![2596_before_nav](https://cloud.githubusercontent.com/assets/4968473/26542353/89004e7a-4494-11e7-89c0-28d608f5f375.gif) #### better navbar: after ![2596_after_nav](https://cloud.githubusercontent.com/assets/4968473/26542356/8bfb7b90-4494-11e7-9979-0bcaef8ba97b.gif) #### improved main page: before ![2596_before_main](https://cloud.githubusercontent.com/assets/4968473/26542358/8f35b0be-4494-11e7-8a6c-e74ec52fc384.gif) #### improved main page: after ![2596_after_main](https://cloud.githubusercontent.com/assets/4968473/26542366/93b333c8-4494-11e7-981f-3f7b4545868f.gif) #### organized content structure: before ![2596_before_content](https://cloud.githubusercontent.com/assets/4968473/26542398/ad81ac26-4494-11e7-9a17-70dff41396fb.gif) #### organized content structure: after ![2596_after_content](https://cloud.githubusercontent.com/assets/4968473/26542403/b0a42ad2-4494-11e7-8bd3-8a5bd194c6af.gif) ### Questions: * Does the licenses files need update? - NO * Is there breaking changes for older versions? - NO * Does this needs documentation? - related with docs Author: 1ambda <1amb4a@gmail.com> Closes #2371 from 1ambda/updating-version-doc and squashes the following commits: eb02fa967 [1ambda] fix: navbar focus color applies after folding 026379ed6 [1ambda] fix: Remove docs/.listen_test a7dd4737b [1ambda] fix: sora's comment 1.2 18c5058f7 [1ambda] fix: resolve description in python_with_zeppelin.md d3ad67c73 [1ambda] fix: sora's comment 4 d133dbbcc [1ambda] fix: resolve sora's comment 3 513c6ff2c [1ambda] fix: resolve sora's comment 1.1 4c2946928 [1ambda] fix: resovle sora's comment 2 1c3946ac6 [1ambda] fix: sora's comment 1 4d6e4267f [1ambda] fix: Resolve sola's comment 3 d0524cafe [1ambda] fix: Set less shadow for nav 5f1f998ba [1ambda] docs: Add useful_develop_tools.md 9dfd62c74 [1ambda] fix: Typo in installation.md 30f7d7e06 [1ambda] fix: Typo in helium ctrl d6877e792 [1ambda] docs: Add python_with_zeppelin.md 7027e96c0 [1ambda] docs: Improve python conda, docker doc style e55b50a9d [1ambda] fix: Invalid URLs 75ddeeaff [1ambda] docs: replace URIs in interpreter 5b43993a4 [1ambda] docs: Add sql_with_zeppelin 053794e84 [1ambda] docs: Add spark_with_zeppelin.md d4d88b9c7 [1ambda] docs: Improve proxy doc b46cdd126 [1ambda] docs: Add empty interpreter_binding_mode.md 06fcb239e [1ambda] docs: Add empty personalized_mode.md 4991cf0a7 [1ambda] docs: Update upgrading.md 53142b7a0 [1ambda] fix: Simplify install.md 8a5c1e721 [1ambda] docs: Add multi_user_support.md 34095775e [1ambda] fix: Increase font size to 15px a03b04b33 [1ambda] fix: Remove sample text from trouble_shooting.md 199842590 [1ambda] fix: Remove docker doc link 66a2a7d26 [1ambda] docs: Improve impersonation page 0a6e3fc1d [1ambda] docs: Improve install doc ccd999ed5 [1ambda] docs: Improve helium doc f8d742d08 [1ambda] fix: an invalid link in navbar b7aa5f884 [1ambda] fix: URLs in development 61a175d94 [1ambda] docs: Update install.md 4c56de5c4 [1ambda] fix: URLs in setup 0b1d63513 [1ambda] fix: URLs in quickstart 28970a4fe [1ambda] feat: Add docs/usage 735946bca [1ambda] feat: rename /quickstart b351cf237 [1ambda] fix: Add missing links b70770b4f [1ambda] feat: Change URLs in nav, index 94e80aef6 [1ambda] fix: doens't display navbar version in small 6e0cab110 [1ambda] feat: Update doc section names b9ce256ff [1ambda] feat: Hide version in navbar when md f8bab52be [1ambda] fix: Better image display in index.md eeb37d5b5 [1ambda] fix: Add RL padding for mobile browser ceb60b5ee [1ambda] feat: Style collapsed nav for mobile browser 4ebafb4b6 [1ambda] commit
2017-06-19 10:13:57 +00:00
Apache Zeppelin [Table Display System](../usage/display_system/basic.html#table) provides built-in data visualization capabilities.
Python interpreter leverages it to visualize Pandas DataFrames though similar `z.show()` API,
same as with [Matplotlib integration](#matplotlib-integration).
ZEPPELIN-1048: Pandas support for python interpreter ### What is this PR for? Display Pandas DataFrame using Zeppelin's Table Display system. ### What type of PR is it? Feature ### Todos * [x] fix NPE in logs on empty paragraph execution * [x] matplotlib: refactor `zeppelin_show(plt)` -> `z.show(plt)` * [x] pandas: support `z.show(df)` * [x] update docs ### What is the Jira issue? [ZEPPELIN-1048](https://issues.apache.org/jira/browse/ZEPPELIN-1048) ### How should this be tested? "Zeppelin Tutorial: Python - matplotlib basic" should work, and ```python import pandas as pd rates = pd.read_csv("bank.csv", sep=";") z.show(rates) ``` ### Screenshots (if appropriate) ![screen shot 2016-06-23 at 10 29 00](https://cloud.githubusercontent.com/assets/5582506/16289133/85f0ddbc-392d-11e6-86a3-28d10e73f68d.png) ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? Yes Author: Alexander Bezzubov <bzz@apache.org> Closes #1067 from bzz/python/pandas-support and squashes the following commits: 3b1ad36 [Alexander Bezzubov] Python: update docs to reffer new API ee6668b [Alexander Bezzubov] Python: update docs, add Pandas integration 71be418 [Alexander Bezzubov] Python: limit 1000 for table display system on DataFrame 52e787d [Alexander Bezzubov] Python: pandas DataFrame using Table display system bc91b86 [Alexander Bezzubov] Python: skip interpreting empty paragraphs a7248cd [Alexander Bezzubov] Python: draft of pandas support 15646a1 [Alexander Bezzubov] Python: refactoring to z.show()
2016-06-23 01:25:49 +00:00
Example:
```python
import pandas as pd
rates = pd.read_csv("bank.csv", sep=";")
z.show(rates)
```
ZEPPELIN-1115: Python - interpreter for SQL over DataFrame ### What is this PR for? Add new interpreter to Python group: `%python.sql` for SQL over DataFrame support ### What type of PR is it? Improvement ### TODOs * [x] add new interpreter `%python.sql` * [x] add test * [x] make Python-dependant tests, excluded from CI * PythonInterpreterWithPythonInstalledTest * PythonPandasSqlInterpreterTest * run manually by `mvn -Dpython.test.exclude='' test -pl python -am` * [x] add docs `%python.sql` * [x] make `%python.sql` fail gracefully in case there is no Pandas or PandaSQL installed * [x] after #747 is merged - rebase and remove `-Dpython.test.exclude=''` from both profiles ### What is the Jira issue? [ZEPPELIN-1115](https://issues.apache.org/jira/browse/ZEPPELIN-1115) ### How should this be tested? `mvn -Dpython.test.exclude='' test -pl python -am` should pass or manually run - Given the DataFrame i.e ``` %python import pandas as pd rates = pd.read_csv("bank.csv", sep=";") ``` - SQL query it like ``` %python.sql SELECT * FROM rates LIMIT 10 ``` ### Screenshots (if appropriate) ![screen shot 2016-07-11 at 23 56 04](https://cloud.githubusercontent.com/assets/5582506/16735171/1ebb9354-47c3-11e6-9354-6364e9374a20.png) ### Questions: * Does the licenses files need update? No, no dependencies were included in source or binary release * Is there breaking changes for older versions? No * Does this needs documentation? Yes Author: Alexander Bezzubov <bzz@apache.org> Closes #1164 from bzz/ZEPPELIN-1115/python/add-sql-for-dataframes and squashes the following commits: 0f2f852 [Alexander Bezzubov] Fail SQL gracefully if no python dependencies installed aca2bdf [Alexander Bezzubov] Fix typos in docs :zap: 158ba6a [Alexander Bezzubov] Remove third-party dependant test from CI 5fe46fc [Alexander Bezzubov] Update Python Matplotlib notebook example 72884c8 [Alexander Bezzubov] Add docs for %python.sql feature e931dc4 [Alexander Bezzubov] Make test for PythonPandasSqlInterpreter usable 76bbb44 [Alexander Bezzubov] Complete implementation of the PythonPandasSqlInterpreter f6ca1eb [Alexander Bezzubov] Add %python.sql to interpreter menue 11ba490 [Alexander Bezzubov] Add draft implementation of %python.sql for DataFrames
2016-07-14 05:15:42 +00:00
## SQL over Pandas DataFrames
[ZEPPELIN-2596] Improving documentation page ### What is this PR for? Improving documentation page. Please check *TODO* and *Screenshots* sections for detail. The motivation is described in [the JIRA ticket](https://issues.apache.org/jira/browse/ZEPPELIN-2583) and discussion is ongoing on the mailing list. ### What type of PR is it? [Improvement | Documentation] ### Todos * [x] - improved the navbar style * [x] - improved the main page * [x] - re-organized content structure * [x] - added tutorial pages: `spark_with_zeppelin.md`, `python_with_zeppelin.md`, `sql_with_zeppelin.md` for overview * [x] - added `multi_user_support.md` page to provide overview * [x] - added the empty `interpreter_binding_mode` page. This will be handed in the different issue: [ZEPPELIN-2582](https://issues.apache.org/jira/browse/ZEPPELIN-2582) * [x] - added the empty `trouble_shooting` page. This can be filled in the following PRs. * [x] - added the empty `useful_developer_tools` page. This can be filled in the following PRs. ### What is the Jira issue? [ZEPPELIN-2596](https://issues.apache.org/jira/browse/ZEPPELIN-2596) ### How should this be tested? 1. checkout 2. `cd docs` 3. `bundle install` (make sure that you have ruby 2.1.0+ and bundle) 4. `bundle exec jekyll serve --watch` 5. open `localhost:4000` ### Screenshots (if appropriate) #### better navbar: before ![2596_before_nav](https://cloud.githubusercontent.com/assets/4968473/26542353/89004e7a-4494-11e7-89c0-28d608f5f375.gif) #### better navbar: after ![2596_after_nav](https://cloud.githubusercontent.com/assets/4968473/26542356/8bfb7b90-4494-11e7-9979-0bcaef8ba97b.gif) #### improved main page: before ![2596_before_main](https://cloud.githubusercontent.com/assets/4968473/26542358/8f35b0be-4494-11e7-8a6c-e74ec52fc384.gif) #### improved main page: after ![2596_after_main](https://cloud.githubusercontent.com/assets/4968473/26542366/93b333c8-4494-11e7-981f-3f7b4545868f.gif) #### organized content structure: before ![2596_before_content](https://cloud.githubusercontent.com/assets/4968473/26542398/ad81ac26-4494-11e7-9a17-70dff41396fb.gif) #### organized content structure: after ![2596_after_content](https://cloud.githubusercontent.com/assets/4968473/26542403/b0a42ad2-4494-11e7-8bd3-8a5bd194c6af.gif) ### Questions: * Does the licenses files need update? - NO * Is there breaking changes for older versions? - NO * Does this needs documentation? - related with docs Author: 1ambda <1amb4a@gmail.com> Closes #2371 from 1ambda/updating-version-doc and squashes the following commits: eb02fa967 [1ambda] fix: navbar focus color applies after folding 026379ed6 [1ambda] fix: Remove docs/.listen_test a7dd4737b [1ambda] fix: sora's comment 1.2 18c5058f7 [1ambda] fix: resolve description in python_with_zeppelin.md d3ad67c73 [1ambda] fix: sora's comment 4 d133dbbcc [1ambda] fix: resolve sora's comment 3 513c6ff2c [1ambda] fix: resolve sora's comment 1.1 4c2946928 [1ambda] fix: resovle sora's comment 2 1c3946ac6 [1ambda] fix: sora's comment 1 4d6e4267f [1ambda] fix: Resolve sola's comment 3 d0524cafe [1ambda] fix: Set less shadow for nav 5f1f998ba [1ambda] docs: Add useful_develop_tools.md 9dfd62c74 [1ambda] fix: Typo in installation.md 30f7d7e06 [1ambda] fix: Typo in helium ctrl d6877e792 [1ambda] docs: Add python_with_zeppelin.md 7027e96c0 [1ambda] docs: Improve python conda, docker doc style e55b50a9d [1ambda] fix: Invalid URLs 75ddeeaff [1ambda] docs: replace URIs in interpreter 5b43993a4 [1ambda] docs: Add sql_with_zeppelin 053794e84 [1ambda] docs: Add spark_with_zeppelin.md d4d88b9c7 [1ambda] docs: Improve proxy doc b46cdd126 [1ambda] docs: Add empty interpreter_binding_mode.md 06fcb239e [1ambda] docs: Add empty personalized_mode.md 4991cf0a7 [1ambda] docs: Update upgrading.md 53142b7a0 [1ambda] fix: Simplify install.md 8a5c1e721 [1ambda] docs: Add multi_user_support.md 34095775e [1ambda] fix: Increase font size to 15px a03b04b33 [1ambda] fix: Remove sample text from trouble_shooting.md 199842590 [1ambda] fix: Remove docker doc link 66a2a7d26 [1ambda] docs: Improve impersonation page 0a6e3fc1d [1ambda] docs: Improve install doc ccd999ed5 [1ambda] docs: Improve helium doc f8d742d08 [1ambda] fix: an invalid link in navbar b7aa5f884 [1ambda] fix: URLs in development 61a175d94 [1ambda] docs: Update install.md 4c56de5c4 [1ambda] fix: URLs in setup 0b1d63513 [1ambda] fix: URLs in quickstart 28970a4fe [1ambda] feat: Add docs/usage 735946bca [1ambda] feat: rename /quickstart b351cf237 [1ambda] fix: Add missing links b70770b4f [1ambda] feat: Change URLs in nav, index 94e80aef6 [1ambda] fix: doens't display navbar version in small 6e0cab110 [1ambda] feat: Update doc section names b9ce256ff [1ambda] feat: Hide version in navbar when md f8bab52be [1ambda] fix: Better image display in index.md eeb37d5b5 [1ambda] fix: Add RL padding for mobile browser ceb60b5ee [1ambda] feat: Style collapsed nav for mobile browser 4ebafb4b6 [1ambda] commit
2017-06-19 10:13:57 +00:00
There is a convenience `%python.sql` interpreter that matches Apache Spark experience in Zeppelin and
enables usage of SQL language to query [Pandas DataFrames](http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.html) and
visualization of results though built-in [Table Display System](../usage/display_system/basic.html#table).
ZEPPELIN-1115: Python - interpreter for SQL over DataFrame ### What is this PR for? Add new interpreter to Python group: `%python.sql` for SQL over DataFrame support ### What type of PR is it? Improvement ### TODOs * [x] add new interpreter `%python.sql` * [x] add test * [x] make Python-dependant tests, excluded from CI * PythonInterpreterWithPythonInstalledTest * PythonPandasSqlInterpreterTest * run manually by `mvn -Dpython.test.exclude='' test -pl python -am` * [x] add docs `%python.sql` * [x] make `%python.sql` fail gracefully in case there is no Pandas or PandaSQL installed * [x] after #747 is merged - rebase and remove `-Dpython.test.exclude=''` from both profiles ### What is the Jira issue? [ZEPPELIN-1115](https://issues.apache.org/jira/browse/ZEPPELIN-1115) ### How should this be tested? `mvn -Dpython.test.exclude='' test -pl python -am` should pass or manually run - Given the DataFrame i.e ``` %python import pandas as pd rates = pd.read_csv("bank.csv", sep=";") ``` - SQL query it like ``` %python.sql SELECT * FROM rates LIMIT 10 ``` ### Screenshots (if appropriate) ![screen shot 2016-07-11 at 23 56 04](https://cloud.githubusercontent.com/assets/5582506/16735171/1ebb9354-47c3-11e6-9354-6364e9374a20.png) ### Questions: * Does the licenses files need update? No, no dependencies were included in source or binary release * Is there breaking changes for older versions? No * Does this needs documentation? Yes Author: Alexander Bezzubov <bzz@apache.org> Closes #1164 from bzz/ZEPPELIN-1115/python/add-sql-for-dataframes and squashes the following commits: 0f2f852 [Alexander Bezzubov] Fail SQL gracefully if no python dependencies installed aca2bdf [Alexander Bezzubov] Fix typos in docs :zap: 158ba6a [Alexander Bezzubov] Remove third-party dependant test from CI 5fe46fc [Alexander Bezzubov] Update Python Matplotlib notebook example 72884c8 [Alexander Bezzubov] Add docs for %python.sql feature e931dc4 [Alexander Bezzubov] Make test for PythonPandasSqlInterpreter usable 76bbb44 [Alexander Bezzubov] Complete implementation of the PythonPandasSqlInterpreter f6ca1eb [Alexander Bezzubov] Add %python.sql to interpreter menue 11ba490 [Alexander Bezzubov] Add draft implementation of %python.sql for DataFrames
2016-07-14 05:15:42 +00:00
**Pre-requests**
- Pandas `pip install pandas`
- PandaSQL `pip install -U pandasql`
In case default binded interpreter is Python (first in the interpreter list, under the _Gear Icon_), you can just use it as `%sql` i.e
- first paragraph
```python
import pandas as pd
rates = pd.read_csv("bank.csv", sep=";")
```
- next paragraph
```sql
%sql
SELECT * FROM rates WHERE age < 40
```
Otherwise it can be referred to as `%python.sql`
[ZEPPELIN-2753] Basic Implementation of IPython Interpreter ### What is this PR for? This is the first step for implement IPython Interpreter in Zeppelin. I just use the jupyter_client to create and manage the ipython kernel. We don't need to care about python compilation and execution, all the things are delegated to ipython kernel. Ideally all the features of ipython should be available in Zeppelin as well. For now, user can use %python.ipython for IPython Interpreter. And if ipython is available, the default python interpreter will use ipython. But user can still set `zeppelin.python.useIPython` as false to enforce to use the old implementation of python interpreter. Main features: * IPython interpreter support ** All the ipython features are available, including visualization, ipython magics. * ZeppelinContext support * Streaming output support * Support Ipython in PySpark Regarding the visualization, ideally all the visualization libraries work in jupyter should also work here. In unit test, I only verify the following 3 popular visualization library. could add more later. * matplotlib * bokeh * ggplot ### What type of PR is it? [Feature ] ### Todos * [ ] - Task ### What is the Jira issue? * https://issues.apache.org/jira/browse/ZEPPELIN-2753 ### How should this be tested? Unit test is added. ### Screenshots (if appropriate) Verify bokeh in IPython Interpreter ![image](https://user-images.githubusercontent.com/164491/27999716-756d749e-6552-11e7-90bb-4c6b08f4ab5c.png) Verify matplotlib ![image](https://user-images.githubusercontent.com/164491/28046960-e881b28e-6619-11e7-9e1f-7f4662f842f3.png) Verify ZeppelinContext ![image](https://user-images.githubusercontent.com/164491/28119378-4212620c-6747-11e7-89d5-3b5e609593ce.png) Verify Streaming ![streaming](https://user-images.githubusercontent.com/164491/28950974-8f92fe1e-78fa-11e7-841f-3174da198bb7.gif) ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? No Author: Jeff Zhang <zjffdu@apache.org> Closes #2474 from zjffdu/ZEPPELIN-2753 and squashes the following commits: e869f31 [Jeff Zhang] address comments b0b5c95 [Jeff Zhang] [ZEPPELIN-2753] Basic Implementation of IPython Interpreter
2017-08-26 03:59:43 +00:00
## IPython Support
IPython is more powerful than the default python interpreter with extra functionality. You can use IPython with Python2 or Python3 which depends on which python you set `zeppelin.python`.
**Pre-requests**
- Jupyter `pip install jupyter`
- grpcio `pip install grpcio`
If you already install anaconda, then you just need to install `grpcio` as Jupyter is already included in anaconda.
In addition to all basic functions of the python interpreter, you can use all the IPython advanced features as you use it in Jupyter Notebook.
e.g.
Use IPython magic
```
%python.ipython
#python help
range?
#timeit
%timeit range(100)
```
Use matplotlib
```
%python.ipython
%matplotlib inline
import matplotlib.pyplot as plt
print("hello world")
data=[1,2,3,4]
plt.figure()
plt.plot(data)
```
We also make `ZeppelinContext` available in IPython Interpreter. You can use `ZeppelinContext` to create dynamic forms and display pandas DataFrame.
e.g.
Create dynamic form
```
z.input(name='my_name', defaultValue='hello')
```
Show pandas dataframe
```
import pandas as pd
df = pd.DataFrame({'id':[1,2,3], 'name':['a','b','c']})
z.show(df)
```
By default, we would use IPython in `%python.python` if IPython is available. Otherwise it would fall back to the original Python implementation.
If you don't want to use IPython, then you can set `zeppelin.python.useIPython` as `false` in interpreter setting.
## Technical description
[ZEPPELIN-502] Python interpreter group ### What is this PR for? Adding a python 2 &3 interpreter. It's a basic implementation (no py4j for example), with a java ProcessBuilder object used to instantiate a python REPL. The interpreter doesn't bring it own python binary but uses the python specified by python.path configutation. Thus, you can still use your specific installed python modules (scikit-learn, matplotlib...) and the interpreter is able to work with python 2 & 3 without change. I had a python helper function (zeppelin_show() ) to easily display matplotlib graph as SVG. ### What type of PR is it? [Feature] ### Todos * [x] - Code review * [x] - Improve bootstrap.py : choose available helper functions and their names * [x] - Unit / IT tests ? * [x] documentation updates needed, that AhyoungRyu pointed out * [X] LICENSE needs to be updated to include all non-apache licensed dependencies (i.e AFAIK Py4j is BSD ) in bin-license * [x] double-check that code formatting conforms project style guide * [x] the branch need to be rebased on latest master. ### What is the Jira issue? [ZEPPELIN-502](https://issues.apache.org/jira/browse/ZEPPELIN-502?jql=project%20%3D%20ZEPPELIN%20AND%20text%20~%20%22python%22) ### How should this be tested? 1. In interpreter screen, in Python section, specify in python.path the python binary you want to use 2. In a paragraph, you can use the interpreter with **_%python_**. Calling help() will describe you the interpreter functionnalities. 3. Install py4j (pip install py4j) if you want to use input form ### Screenshots ![image](https://cloud.githubusercontent.com/assets/12515751/14936724/5108fb60-0ef4-11e6-93ea-232a037f7957.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14943716/98a75c4a-0fe0-11e6-9d4b-e10c39d53a15.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14936715/0eec90de-0ef4-11e6-811b-7ebe46f0d279.png) ![image](https://cloud.githubusercontent.com/assets/12515751/14943722/b89b7824-0fe0-11e6-9c73-c12f7372d487.png) ### Questions: * Does the licenses files need update? Yes, only bin-license (py4j) * Is there breaking changes for older versions? No * Does this needs documentation? Yes Author: Hervé RIVIERE <hriviere@users.noreply.github.com> Closes #869 from hriviere/PR_interpreter_python and squashes the following commits: 80b6e75 [Hervé RIVIERE] [ZEPPELIN-502] move BSD py4j license to zeppelin-distribution/src/bin_license/license a4b82a5 [Hervé RIVIERE] [ZEPPELIN-502]Improving doc following @AhyoungRyu review 3252353 [Hervé RIVIERE] [ZEPPELIN-502] Formatting code to respect project convention 54ec4f1 [Hervé RIVIERE] [ZEPPELIN-502]Improving doc following @AhyoungRyu review 6a831bc [Hervé RIVIERE] [ZEPPELIN-502] Add BSD py4j license 11e1b9c [Hervé RIVIERE] [ZEPPELIN-502] minor changes in python.md e5d0bdb [Hervé RIVIERE] [ZEPPELIN-502] change PYTHON_PATH to ZEPPELIN_PYTHON c62ac98 [Hervé RIVIERE] [ZEPPELIN-502] Improve python.md 5008125 [Hervé RIVIERE] [ZEPPELIN-502] Improve python.md with features not yet supported and technical description 7d533e1 [Hervé RIVIERE] [ZEPPELIN-502] Add tests and reformating code to help tests writing fecaf25 [Hervé RIVIERE] [ZEPPELIN-502] Rename python.path to python and default from /usr/bin/python to python 02d1320 [Hervé RIVIERE] [ZEPPELIN-502] Input form, change from simple input form to native (pyspark syntax) 60d2956 [Hervé RIVIERE] [ZEPPELIN-502] Indent as pep8 convention 9bdb192 [Hervé RIVIERE] [ZEPPELIN-502] Add python.md to _navigation.html 7142aa5 [Hervé RIVIERE] [ZEPPELIN-502] Catch exception in logger.error 1a86ad7 [Hervé RIVIERE] [ZEPPELIN-502] Python interpreter group
2016-05-30 20:07:26 +00:00
ZEPPELIN-1115: Python - interpreter for SQL over DataFrame ### What is this PR for? Add new interpreter to Python group: `%python.sql` for SQL over DataFrame support ### What type of PR is it? Improvement ### TODOs * [x] add new interpreter `%python.sql` * [x] add test * [x] make Python-dependant tests, excluded from CI * PythonInterpreterWithPythonInstalledTest * PythonPandasSqlInterpreterTest * run manually by `mvn -Dpython.test.exclude='' test -pl python -am` * [x] add docs `%python.sql` * [x] make `%python.sql` fail gracefully in case there is no Pandas or PandaSQL installed * [x] after #747 is merged - rebase and remove `-Dpython.test.exclude=''` from both profiles ### What is the Jira issue? [ZEPPELIN-1115](https://issues.apache.org/jira/browse/ZEPPELIN-1115) ### How should this be tested? `mvn -Dpython.test.exclude='' test -pl python -am` should pass or manually run - Given the DataFrame i.e ``` %python import pandas as pd rates = pd.read_csv("bank.csv", sep=";") ``` - SQL query it like ``` %python.sql SELECT * FROM rates LIMIT 10 ``` ### Screenshots (if appropriate) ![screen shot 2016-07-11 at 23 56 04](https://cloud.githubusercontent.com/assets/5582506/16735171/1ebb9354-47c3-11e6-9354-6364e9374a20.png) ### Questions: * Does the licenses files need update? No, no dependencies were included in source or binary release * Is there breaking changes for older versions? No * Does this needs documentation? Yes Author: Alexander Bezzubov <bzz@apache.org> Closes #1164 from bzz/ZEPPELIN-1115/python/add-sql-for-dataframes and squashes the following commits: 0f2f852 [Alexander Bezzubov] Fail SQL gracefully if no python dependencies installed aca2bdf [Alexander Bezzubov] Fix typos in docs :zap: 158ba6a [Alexander Bezzubov] Remove third-party dependant test from CI 5fe46fc [Alexander Bezzubov] Update Python Matplotlib notebook example 72884c8 [Alexander Bezzubov] Add docs for %python.sql feature e931dc4 [Alexander Bezzubov] Make test for PythonPandasSqlInterpreter usable 76bbb44 [Alexander Bezzubov] Complete implementation of the PythonPandasSqlInterpreter f6ca1eb [Alexander Bezzubov] Add %python.sql to interpreter menue 11ba490 [Alexander Bezzubov] Add draft implementation of %python.sql for DataFrames
2016-07-14 05:15:42 +00:00
For in-depth technical details on current implementation please refer to [python/README.md](https://github.com/apache/zeppelin/blob/master/python/README.md).
### Some features not yet implemented in the Python Interpreter
[ZEPPELIN-2596] Improving documentation page ### What is this PR for? Improving documentation page. Please check *TODO* and *Screenshots* sections for detail. The motivation is described in [the JIRA ticket](https://issues.apache.org/jira/browse/ZEPPELIN-2583) and discussion is ongoing on the mailing list. ### What type of PR is it? [Improvement | Documentation] ### Todos * [x] - improved the navbar style * [x] - improved the main page * [x] - re-organized content structure * [x] - added tutorial pages: `spark_with_zeppelin.md`, `python_with_zeppelin.md`, `sql_with_zeppelin.md` for overview * [x] - added `multi_user_support.md` page to provide overview * [x] - added the empty `interpreter_binding_mode` page. This will be handed in the different issue: [ZEPPELIN-2582](https://issues.apache.org/jira/browse/ZEPPELIN-2582) * [x] - added the empty `trouble_shooting` page. This can be filled in the following PRs. * [x] - added the empty `useful_developer_tools` page. This can be filled in the following PRs. ### What is the Jira issue? [ZEPPELIN-2596](https://issues.apache.org/jira/browse/ZEPPELIN-2596) ### How should this be tested? 1. checkout 2. `cd docs` 3. `bundle install` (make sure that you have ruby 2.1.0+ and bundle) 4. `bundle exec jekyll serve --watch` 5. open `localhost:4000` ### Screenshots (if appropriate) #### better navbar: before ![2596_before_nav](https://cloud.githubusercontent.com/assets/4968473/26542353/89004e7a-4494-11e7-89c0-28d608f5f375.gif) #### better navbar: after ![2596_after_nav](https://cloud.githubusercontent.com/assets/4968473/26542356/8bfb7b90-4494-11e7-9979-0bcaef8ba97b.gif) #### improved main page: before ![2596_before_main](https://cloud.githubusercontent.com/assets/4968473/26542358/8f35b0be-4494-11e7-8a6c-e74ec52fc384.gif) #### improved main page: after ![2596_after_main](https://cloud.githubusercontent.com/assets/4968473/26542366/93b333c8-4494-11e7-981f-3f7b4545868f.gif) #### organized content structure: before ![2596_before_content](https://cloud.githubusercontent.com/assets/4968473/26542398/ad81ac26-4494-11e7-9a17-70dff41396fb.gif) #### organized content structure: after ![2596_after_content](https://cloud.githubusercontent.com/assets/4968473/26542403/b0a42ad2-4494-11e7-8bd3-8a5bd194c6af.gif) ### Questions: * Does the licenses files need update? - NO * Is there breaking changes for older versions? - NO * Does this needs documentation? - related with docs Author: 1ambda <1amb4a@gmail.com> Closes #2371 from 1ambda/updating-version-doc and squashes the following commits: eb02fa967 [1ambda] fix: navbar focus color applies after folding 026379ed6 [1ambda] fix: Remove docs/.listen_test a7dd4737b [1ambda] fix: sora's comment 1.2 18c5058f7 [1ambda] fix: resolve description in python_with_zeppelin.md d3ad67c73 [1ambda] fix: sora's comment 4 d133dbbcc [1ambda] fix: resolve sora's comment 3 513c6ff2c [1ambda] fix: resolve sora's comment 1.1 4c2946928 [1ambda] fix: resovle sora's comment 2 1c3946ac6 [1ambda] fix: sora's comment 1 4d6e4267f [1ambda] fix: Resolve sola's comment 3 d0524cafe [1ambda] fix: Set less shadow for nav 5f1f998ba [1ambda] docs: Add useful_develop_tools.md 9dfd62c74 [1ambda] fix: Typo in installation.md 30f7d7e06 [1ambda] fix: Typo in helium ctrl d6877e792 [1ambda] docs: Add python_with_zeppelin.md 7027e96c0 [1ambda] docs: Improve python conda, docker doc style e55b50a9d [1ambda] fix: Invalid URLs 75ddeeaff [1ambda] docs: replace URIs in interpreter 5b43993a4 [1ambda] docs: Add sql_with_zeppelin 053794e84 [1ambda] docs: Add spark_with_zeppelin.md d4d88b9c7 [1ambda] docs: Improve proxy doc b46cdd126 [1ambda] docs: Add empty interpreter_binding_mode.md 06fcb239e [1ambda] docs: Add empty personalized_mode.md 4991cf0a7 [1ambda] docs: Update upgrading.md 53142b7a0 [1ambda] fix: Simplify install.md 8a5c1e721 [1ambda] docs: Add multi_user_support.md 34095775e [1ambda] fix: Increase font size to 15px a03b04b33 [1ambda] fix: Remove sample text from trouble_shooting.md 199842590 [1ambda] fix: Remove docker doc link 66a2a7d26 [1ambda] docs: Improve impersonation page 0a6e3fc1d [1ambda] docs: Improve install doc ccd999ed5 [1ambda] docs: Improve helium doc f8d742d08 [1ambda] fix: an invalid link in navbar b7aa5f884 [1ambda] fix: URLs in development 61a175d94 [1ambda] docs: Update install.md 4c56de5c4 [1ambda] fix: URLs in setup 0b1d63513 [1ambda] fix: URLs in quickstart 28970a4fe [1ambda] feat: Add docs/usage 735946bca [1ambda] feat: rename /quickstart b351cf237 [1ambda] fix: Add missing links b70770b4f [1ambda] feat: Change URLs in nav, index 94e80aef6 [1ambda] fix: doens't display navbar version in small 6e0cab110 [1ambda] feat: Update doc section names b9ce256ff [1ambda] feat: Hide version in navbar when md f8bab52be [1ambda] fix: Better image display in index.md eeb37d5b5 [1ambda] fix: Add RL padding for mobile browser ceb60b5ee [1ambda] feat: Style collapsed nav for mobile browser 4ebafb4b6 [1ambda] commit
2017-06-19 10:13:57 +00:00
* Interrupt a paragraph execution (`cancel()` method) is currently only supported in Linux and MacOs.
If interpreter runs in another operating system (for instance MS Windows) , interrupt a paragraph will close the whole interpreter.
A JIRA ticket ([ZEPPELIN-893](https://issues.apache.org/jira/browse/ZEPPELIN-893)) is opened to implement this feature in a next release of the interpreter.
* Progression bar in webUI (`getProgress()` method) is currently not implemented.
* Code-completion is currently not implemented.