[ZEPPELIN-799] Add python edit mode.#825
Conversation
|
|
||
| var editorModes = { | ||
| 'ace/mode/scala': /^%spark/, | ||
| 'ace/mode/python': /^%pyspark/, |
There was a problem hiding this comment.
I think we need to account for cases like
%spark.spark
%spark.pyspark
%customgroup.pyspark
and so on.
There was a problem hiding this comment.
I changed the mode rule so Could you review?
| 'ace/mode/scala': /^%spark/, | ||
| 'ace/mode/python': /^%pyspark/, | ||
| 'ace/mode/python': /^%(spark\.)?pyspark\s*$/, | ||
| 'ace/mode/scala': /^%spark\s*$/, |
There was a problem hiding this comment.
I think it's possible to create a new interpreter group /setting so it might not be called "spark"
how about changing it like the sql one:
/^%(\w*\.)?pyspark/
/^%(\w*\.)?spark/
btw, it looks like the scala one would not work if the user has it as the default and has not put "%spark" in the paragraph
There was a problem hiding this comment.
I agree with you about creating a new interpreter group and thanks for pointing that out.
I'll fix it.
and Regarding the running paragraph without "%spark" when it's default is no problem to work.
|
cool thanks, looks good. |
|
LGTM |
|
Looks great to me! Merging if there is no other discussion. |
### What is this PR for? Python edit mode was added in #825 thank to astroshim. I think we'll need to update the `src/index.html` and `test/karma.conf.js` under `zeppelin-web` accordingly to avoid unstaged changes after building. ### What type of PR is it? Improvement ### Todos None ### What is the Jira issue? Probably a subtask of https://issues.apache.org/jira/browse/ZEPPELIN-799 ### How should this be tested? Shouldn't be any since #825 is merged into `master` and has been tested. ### Screenshots (if appropriate) N/A ### Questions: * Does the licenses files need update? *no* * Is there breaking changes for older versions? *no* * Does this needs documentation? *no* /cc astroshim Author: Cheng-Yu Hsu <[email protected]> Closes #851 from cyhsutw/update-template-files and squashes the following commits: 24901cc [Cheng-Yu Hsu] add `mode-python` to generated html and js
### What is this PR for? support python edit mode in paragraph. ### What type of PR is it? Improvement ### Todos * [x] - support python edit mode. ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-799 ### How should this be tested? you can refer to screenshot. ### Screenshots (if appropriate) - before  - after  ### Questions: * Does the licenses files need update? no * Is there breaking changes for older versions? no * Does this needs documentation? no Author: hsshim <[email protected]> Closes apache#825 from astroshim/ZEPPELIN-799 and squashes the following commits: c0d579d [hsshim] fixed for a new interpreter group. 63af8ad [hsshim] add spark.pyspark condition. b2e23de [hsshim] add python edit mode.
### What is this PR for? Python edit mode was added in apache#825 thank to astroshim. I think we'll need to update the `src/index.html` and `test/karma.conf.js` under `zeppelin-web` accordingly to avoid unstaged changes after building. ### What type of PR is it? Improvement ### Todos None ### What is the Jira issue? Probably a subtask of https://issues.apache.org/jira/browse/ZEPPELIN-799 ### How should this be tested? Shouldn't be any since apache#825 is merged into `master` and has been tested. ### Screenshots (if appropriate) N/A ### Questions: * Does the licenses files need update? *no* * Is there breaking changes for older versions? *no* * Does this needs documentation? *no* /cc astroshim Author: Cheng-Yu Hsu <[email protected]> Closes apache#851 from cyhsutw/update-template-files and squashes the following commits: 24901cc [Cheng-Yu Hsu] add `mode-python` to generated html and js
What is this PR for?
support python edit mode in paragraph.
What type of PR is it?
Improvement
Todos
What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-799
How should this be tested?
you can refer to screenshot.
Screenshots (if appropriate)
Questions: