zeppelin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mina...@apache.org
Subject zeppelin git commit: [HOTFIX][ZEPPELIN-1980] - Test and update CI for matplotlib 2.0.0
Date Sun, 22 Jan 2017 06:01:56 GMT
Repository: zeppelin
Updated Branches:
  refs/heads/master 3c5d1283b -> 7941d3751


[HOTFIX][ZEPPELIN-1980] - Test and update CI for matplotlib 2.0.0

### What is this PR for?
Matplotlib 2.0.0 was just released. It has introduced some major changes including some to
the `rcParams` which makes it incompatible with Zeppelin's built-in plotting backend. This
PR updates the backend config for 2.0.0 as well as the CI tests.

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

### What is the Jira issue?
[ZEPPELIN-1980](https://issues.apache.org/jira/browse/ZEPPELIN-1980)

### How should this be tested?
Run the matplotlib tutorial notebook with matplotlib 2.0.0 installed.

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

If possible, this should be included as a hotfix for 0.7.0.

Author: Alex Goodman <agoodm@users.noreply.github.com>

Closes #1912 from agoodm/ZEPPELIN-1980 and squashes the following commits:

202548c [Alex Goodman] Use figure.dpi instead of savefig.dpi
2678359 [Alex Goodman] Make CI install latest matplotlib


Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/7941d375
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/7941d375
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/7941d375

Branch: refs/heads/master
Commit: 7941d37518a9393435680833c0828b13c77dd863
Parents: 3c5d128
Author: Alex Goodman <agoodm@users.noreply.github.com>
Authored: Wed Jan 18 16:29:20 2017 -0800
Committer: Mina Lee <minalee@apache.org>
Committed: Sun Jan 22 15:01:50 2017 +0900

----------------------------------------------------------------------
 interpreter/lib/python/mpl_config.py     | 8 ++++++--
 testing/install_external_dependencies.sh | 2 +-
 2 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7941d375/interpreter/lib/python/mpl_config.py
----------------------------------------------------------------------
diff --git a/interpreter/lib/python/mpl_config.py b/interpreter/lib/python/mpl_config.py
index 14aa60d..e48678f 100644
--- a/interpreter/lib/python/mpl_config.py
+++ b/interpreter/lib/python/mpl_config.py
@@ -50,8 +50,12 @@ def get(key):
 def _on_config_change():
     # dpi
     dpi = _config['dpi']
-    matplotlib.rcParams['savefig.dpi'] = dpi
+    
+    # For older versions of matplotlib, savefig.dpi is not synced with
+    # figure.dpi by default
     matplotlib.rcParams['figure.dpi'] = dpi
+    if matplotlib.__version__ < '2.0.0':
+        matplotlib.rcParams['savefig.dpi'] = dpi
     
     # Width and height
     width = float(_config['width']) / dpi
@@ -75,7 +79,7 @@ def _on_config_change():
     
     
 def _init_config():
-    dpi = matplotlib.rcParams['savefig.dpi']
+    dpi = matplotlib.rcParams['figure.dpi']
     fmt = matplotlib.rcParams['savefig.format']
     width, height = matplotlib.rcParams['figure.figsize']
     fontsize = matplotlib.rcParams['font.size']

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7941d375/testing/install_external_dependencies.sh
----------------------------------------------------------------------
diff --git a/testing/install_external_dependencies.sh b/testing/install_external_dependencies.sh
index ebf7d0f..9382307 100755
--- a/testing/install_external_dependencies.sh
+++ b/testing/install_external_dependencies.sh
@@ -44,5 +44,5 @@ if [[ -n "$PYTHON" ]] ; then
   conda update -q conda
   conda info -a
   conda config --add channels conda-forge
-  conda install -q matplotlib=1.5.3 pandasql
+  conda install -q matplotlib pandasql
 fi


Mime
View raw message