Skip to content

Conversation

@Leemoonsoo
Copy link
Member

What is this PR for?

#2106 rewrote python interpreter. But dynamic form feature is not rewritten correctly.

What type of PR is it?

Hot Fix

Todos

  • - Bring dynamic form back

What is the Jira issue?

#2106

How should this be tested?

run

%python
print("Hello "+z.input("name", "sun"))
%python
print("Hello "+z.select("day", [("1","mon"),
                                ("2","tue"),
                                ("3","wed"),
                                ("4","thurs"),
                                ("5","fri"),
                                ("6","sat"),
                                ("7","sun")]))
%python
options = [("apple","Apple"), ("banana","Banana"), ("orange","Orange")]
print("Hello "+ " and ".join(z.checkbox("fruit", options, ["apple"])))

Questions:

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

@Leemoonsoo Leemoonsoo force-pushed the python_get_interpreter_context branch from 12c97e1 to c5e584a Compare March 19, 2017 04:12
Copy link
Member

@felixcheung felixcheung left a comment

Choose a reason for hiding this comment

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

one question, LGTM otherwise

if sys.version_info >= (3, 4) and sys.version_info < (3, 5):
byte_str = bytes("data:image/%s;base64," %fmt, "utf-8")
else:
byte_str = b"data:image/%s;base64," %fmt
Copy link
Member

Choose a reason for hiding this comment

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

do we need to be concerned with Python 2.x here?

Copy link
Member Author

Choose a reason for hiding this comment

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

python 2.x works fine. 3.4 is only exception as far as i know.

@AhyoungRyu
Copy link
Contributor

Tested both with & without this patch. It works well now.

@Leemoonsoo
Copy link
Member Author

Merge to master and branch-0.7 as a hotfix.

@asfgit asfgit closed this in 1972a58 Mar 20, 2017
asfgit pushed a commit that referenced this pull request Mar 20, 2017
### What is this PR for?
#2106 rewrote python interpreter. But dynamic form feature is not rewritten correctly.

### What type of PR is it?
Hot Fix

### Todos
* [x] - Bring dynamic form back

### What is the Jira issue?
#2106

### How should this be tested?
run

```
%python
print("Hello "+z.input("name", "sun"))
```

```
%python
print("Hello "+z.select("day", [("1","mon"),
                                ("2","tue"),
                                ("3","wed"),
                                ("4","thurs"),
                                ("5","fri"),
                                ("6","sat"),
                                ("7","sun")]))
```

```
%python
options = [("apple","Apple"), ("banana","Banana"), ("orange","Orange")]
print("Hello "+ " and ".join(z.checkbox("fruit", options, ["apple"])))
```

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no

Author: Lee moon soo <moon@apache.org>

Closes #2155 from Leemoonsoo/python_get_interpreter_context and squashes the following commits:

c5e584a [Lee moon soo] fix matplotlib display error on python 3.4
3e6603b [Lee moon soo] correctly handle zeppelin.python property.
5be8db4 [Lee moon soo] Expose a method to get InterpreterOutput, so user can call InterpreterOutput.clear()
a405a93 [Lee moon soo] implement dynamic form

(cherry picked from commit 1972a58)
Signed-off-by: Lee moon soo <moon@apache.org>
tinkoff-dwh pushed a commit to tinkoff-dwh/zeppelin that referenced this pull request Mar 20, 2017
### What is this PR for?
apache#2106 rewrote python interpreter. But dynamic form feature is not rewritten correctly.

### What type of PR is it?
Hot Fix

### Todos
* [x] - Bring dynamic form back

### What is the Jira issue?
apache#2106

### How should this be tested?
run

```
%python
print("Hello "+z.input("name", "sun"))
```

```
%python
print("Hello "+z.select("day", [("1","mon"),
                                ("2","tue"),
                                ("3","wed"),
                                ("4","thurs"),
                                ("5","fri"),
                                ("6","sat"),
                                ("7","sun")]))
```

```
%python
options = [("apple","Apple"), ("banana","Banana"), ("orange","Orange")]
print("Hello "+ " and ".join(z.checkbox("fruit", options, ["apple"])))
```

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no

Author: Lee moon soo <moon@apache.org>

Closes apache#2155 from Leemoonsoo/python_get_interpreter_context and squashes the following commits:

c5e584a [Lee moon soo] fix matplotlib display error on python 3.4
3e6603b [Lee moon soo] correctly handle zeppelin.python property.
5be8db4 [Lee moon soo] Expose a method to get InterpreterOutput, so user can call InterpreterOutput.clear()
a405a93 [Lee moon soo] implement dynamic form
tinkoff-dwh pushed a commit to tinkoff-dwh/zeppelin that referenced this pull request Mar 20, 2017
### What is this PR for?
apache#2106 rewrote python interpreter. But dynamic form feature is not rewritten correctly.

### What type of PR is it?
Hot Fix

### Todos
* [x] - Bring dynamic form back

### What is the Jira issue?
apache#2106

### How should this be tested?
run

```
%python
print("Hello "+z.input("name", "sun"))
```

```
%python
print("Hello "+z.select("day", [("1","mon"),
                                ("2","tue"),
                                ("3","wed"),
                                ("4","thurs"),
                                ("5","fri"),
                                ("6","sat"),
                                ("7","sun")]))
```

```
%python
options = [("apple","Apple"), ("banana","Banana"), ("orange","Orange")]
print("Hello "+ " and ".join(z.checkbox("fruit", options, ["apple"])))
```

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no

Author: Lee moon soo <moon@apache.org>

Closes apache#2155 from Leemoonsoo/python_get_interpreter_context and squashes the following commits:

c5e584a [Lee moon soo] fix matplotlib display error on python 3.4
3e6603b [Lee moon soo] correctly handle zeppelin.python property.
5be8db4 [Lee moon soo] Expose a method to get InterpreterOutput, so user can call InterpreterOutput.clear()
a405a93 [Lee moon soo] implement dynamic form
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.

3 participants