Skip to content

[ZEPPELIN-799] Add python edit mode.#825

Closed
astroshim wants to merge 3 commits intoapache:masterfrom
astroshim:ZEPPELIN-799
Closed

[ZEPPELIN-799] Add python edit mode.#825
astroshim wants to merge 3 commits intoapache:masterfrom
astroshim:ZEPPELIN-799

Conversation

@astroshim
Copy link
Copy Markdown
Contributor

What is this PR for?

support python edit mode in paragraph.

What type of PR is it?

Improvement

Todos

  • - 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
    image
  • after
    image

Questions:

  • Does the licenses files need update? no
  • Is there breaking changes for older versions? no
  • Does this needs documentation? no


var editorModes = {
'ace/mode/scala': /^%spark/,
'ace/mode/python': /^%pyspark/,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to account for cases like

%spark.spark
%spark.pyspark
%customgroup.pyspark

and so on.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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*$/,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@felixcheung
Copy link
Copy Markdown
Member

cool thanks, looks good.

@jongyoul
Copy link
Copy Markdown
Member

LGTM

@bzz
Copy link
Copy Markdown
Member

bzz commented Apr 14, 2016

Looks great to me! Merging if there is no other discussion.

@asfgit asfgit closed this in 5288781 Apr 14, 2016
asfgit pushed a commit that referenced this pull request Apr 24, 2016
### 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
onkarshedge pushed a commit to onkarshedge/incubator-zeppelin that referenced this pull request May 11, 2016
### 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
![image](https://cloud.githubusercontent.com/assets/3348133/14380573/1f6c953e-fdbb-11e5-9132-abf0878b771b.png)

- after
![image](https://cloud.githubusercontent.com/assets/3348133/14379951/f97b7fc8-fdb7-11e5-914e-bac603d43187.png)

### 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.
onkarshedge pushed a commit to onkarshedge/incubator-zeppelin that referenced this pull request May 11, 2016
### 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants