From 144768b057659cb14d13aa7613462e105cb81021 Mon Sep 17 00:00:00 2001
From: Jan Caron <j.caron@fz-juelich.de>
Date: Wed, 26 Jul 2017 12:05:48 +0200
Subject: [PATCH] Trying to fix gitlab-ci.yml!

---
 .gitlab-ci.yml       | 1 +
 environment.yml      | 8 ++++----
 pyramid/plottools.py | 3 ++-
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7903c82..975cc20 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -116,6 +116,7 @@ test_conda:
     - conda env create -q # -q: quiet/ no progressbar, because it spams the log!
     - source activate pyramid
     - conda info --envs
+    - conda install pyqt=5.6.0 -y  # This is needed for tests to run, but breaks mayavi (not used)!
     # Install jutil via secure ssh connection:
     - pip install git+ssh://gitlab@iffgit.fz-juelich.de/unger/jutil.git
     # Execute tests:
diff --git a/environment.yml b/environment.yml
index e700f4d..da82e3d 100644
--- a/environment.yml
+++ b/environment.yml
@@ -2,6 +2,7 @@
 # This file contains the top level dependencies of the pyramid project!
 # requirements.txt also contains sub-dependencies, generated by "pip freeze > requirements.txt"!
 # Add new dependencies here, then "conda env update", then "pip freeze > requirements.txt"!
+# To see if compatible upgrades are available for the current packages, use "conda upgrade --all"!
 # When packages are deprecated/deleted, it may be best to recreate the environment from scratch!
 
 name: pyramid
@@ -22,15 +23,14 @@ dependencies:
   - pyFFTW=0.10
   # File IO:
   - hyperspy=1.3
-  # - hyperspy-gui-ipywidgets=1.0
+  - hyperspy-gui-ipywidgets=1.0
   # - hyperspy-gui-traitsui=1.0  # TODO: Optional! Delete when mayavi is gone!
   - h5py=2.7
   # Plotting and colors:  # TODO: Shift to plotting package?
-  - matplotlib=2.0  # Only works with qt4 from conda-forge channel!
+  - matplotlib=2.0  # Only conda-forge channel has working version for qt4!
   - Pillow=4.1
   - cmocean=1.1
-  # - qt=4.8  # Necessary because of traits in mayavi...
-  - pyqt=5.6.0
+  - qt=4.8  # Necessary because of traits in mayavi... On server, pyqt=5.6 is needed!
   - mayavi=4.5  # TODO: Get rid of!
   #- colorspacious  # TODO: NOT USED?
   #- visvis  # TODO: NOT USED?
diff --git a/pyramid/plottools.py b/pyramid/plottools.py
index 896feb6..e76ad26 100644
--- a/pyramid/plottools.py
+++ b/pyramid/plottools.py
@@ -28,13 +28,14 @@ FIGSIZE_DEFAULT = (6.7, 5)  # TODO: Apparently does not fit as well as before...
 FONTSIZE_DEFAULT = 20
 STROKE_DEFAULT = None
 
-
+# TODO: Replace by matplotlib styles!
 def pretty_plots(figsize=None, fontsize=None, stroke=None):
     """Set IPython formats (for interactive and PDF output) and set pretty matplotlib font."""
     from IPython.display import set_matplotlib_formats
     set_matplotlib_formats('png', 'pdf')  # png for interactive, pdf, for PDF output!
     mpl.rcParams['mathtext.fontset'] = 'stix'  # Mathtext in $...$!
     mpl.rcParams['font.family'] = 'STIXGeneral'  # Set normal text to look the same!
+    # TODO: set 'font.size' = FONTSIZE! Does this change everything relative to this value???
     mpl.rcParams['figure.max_open_warning'] = 0  # Disable Max Open Figure warning!
     if figsize is not None:
         global FIGSIZE_DEFAULT
-- 
GitLab