From 615f3d6dc04c86cbf13b3c2671d49061d994cc97 Mon Sep 17 00:00:00 2001
From: Astrid Muennich <amunnich@max-exfl001.desy.de>
Date: Wed, 22 Aug 2018 13:40:43 +0200
Subject: [PATCH] removing double chapter on concurrent works now

---
 cal_tools/cal_tools/cal_tools.py    | 7 +++++--
 docs/source/conf.py                 | 4 ++--
 notebooks/Tutorial/calversion.ipynb | 4 +++-
 xfel_calibrate/notebooks.py         | 2 +-
 4 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/cal_tools/cal_tools/cal_tools.py b/cal_tools/cal_tools/cal_tools.py
index 8f17da6f8..0dbd0992f 100644
--- a/cal_tools/cal_tools/cal_tools.py
+++ b/cal_tools/cal_tools/cal_tools.py
@@ -35,13 +35,16 @@ def combine_report(run_path, calibration):
                     
                 with open("{}/{}.rst".format(sphinx_path, group), "a") as gfile:
                     if conc_param != "None":
-                        title = "Parameter {}".format(conc_param)
+                        title = "{} - Parameter {}".format(calibration, conc_param)
                         gfile.write(title + "\n")
                         gfile.write( "=" *len (title) + "\n")
                         gfile.write("\n")
                     with open("{}/{}".format(run_path, entry), "r") as ifile:
                         for line in ifile.readlines():
-                            gfile.write(line)
+                            if conc_param == "None":
+                                gfile.write(line)
+                            elif " ".join(calibration.split()) != " ".join(line.split()):
+                                gfile.write(line)
                     gfile.write("\n\n")
         if isdir("{}/{}".format(run_path, entry)):
             shutil.copytree("{}/{}".format(run_path, entry), "{}/{}".format(sphinx_path, entry))
diff --git a/docs/source/conf.py b/docs/source/conf.py
index e7504aad1..3dedb841b 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -269,7 +269,7 @@ latex_elements = {
      # Latex figure (float) alignment
      #
      # 'figure_align': 'htbp',
-    'extraclassoptions': 'openany',
+    'extraclassoptions': 'openany, oneside',
 }
 
 # Grouping the document tree into LaTeX files. List of tuples
@@ -277,7 +277,7 @@ latex_elements = {
 #  author, documentclass [howto, manual, or own class]).
 latex_documents = [
     (master_doc, 'EuropeanXFELOfflineCalibration.tex', 'European XFEL Offline Calibration Documentation',
-     'The European XFEL Detector Group', 'manual'),
+     'The European XFEL Detector Group', 'manual', True),
 ]
 
 # The name of an image file (relative to this directory) to place at the top of
diff --git a/notebooks/Tutorial/calversion.ipynb b/notebooks/Tutorial/calversion.ipynb
index 14933bab4..7f81d1b26 100644
--- a/notebooks/Tutorial/calversion.ipynb
+++ b/notebooks/Tutorial/calversion.ipynb
@@ -6,7 +6,9 @@
    "source": [
     "# Tutorial Calculation #\n",
     "\n",
-    "Author: Astrid Muennich, Version 0.1\n",
+    "Author: Astrid Muennich\n",
+    "\n",
+    "Version: 0.1\n",
     "\n",
     "A small example how to adapt a notebook to run with the offline calibration package \"pycalibation\".\n",
     "\n",
diff --git a/xfel_calibrate/notebooks.py b/xfel_calibrate/notebooks.py
index 1b2d7ae1d..09f6e6f76 100644
--- a/xfel_calibrate/notebooks.py
+++ b/xfel_calibrate/notebooks.py
@@ -96,7 +96,7 @@ notebooks = {
                                "notebook": "notebooks/Tutorial/calversion.ipynb",
                                "concurrency": {"parameter": "random_seed",
                                                "default concurrency": None,
-                                               "cluster cores": 32},
+                                               "cluster cores": 4},
                                },
                       },		
             }
-- 
GitLab