From 319cfd72e51eb0602e1889c87c47aead0037cfa3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc=20Le=20Guyader?= <loic.le.guyader@xfel.eu>
Date: Mon, 3 Jan 2022 16:51:59 +0100
Subject: [PATCH] Provide a changelog in the documentation

---
 VERSION           |  2 +-
 doc/changelog.rst | 85 +++++++++++++++++++++++++++++++++++++++++++++++
 doc/conf.py       |  9 +++++
 doc/index.rst     |  1 +
 setup.py          |  3 +-
 5 files changed, 98 insertions(+), 2 deletions(-)
 create mode 100644 doc/changelog.rst

diff --git a/VERSION b/VERSION
index 15f445b..bc80560 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.1.2rc1
+1.5.0
diff --git a/doc/changelog.rst b/doc/changelog.rst
new file mode 100644
index 0000000..118f9a5
--- /dev/null
+++ b/doc/changelog.rst
@@ -0,0 +1,85 @@
+Release Notes
+=============
+
+1.5.0
+-----
+
+- **Bug fixes**
+
+    - fix :issue:`38` providing a changelog in the documentation :mr:`164`
+    - fix :issue:`37` BOZ analysis :mr:`158`
+    - fix :issue:`36` mnemonics :mr:`159`
+    - fix :issue:`35` BOZ notebook dependencies :mr:`157`
+    - fix :issue:`34` BOZ time delay calculations and plotting :mr:`154`
+    - fix :issue:`32` significantly speeding up in XAS binning calculation :mr:`151`
+    - fix :issue:`27` improving BOZ analysis :mr:`146`
+    - fix :issue:`28` pp pattern in DSSC dask binning :mr:`144`
+    - fix :issue:`26` several BOZ analysis improvements :mr:`135`
+
+- **Improvements**
+
+    - checks if single-version mnemonics is in all_sources :mr:`163`
+    - add :code:`get_bam_params()` :mr:`160`
+    - only check keys if menmonic has more than one version :commit:`ae724d3c`
+    - add FFT focus lens mnemonics :mr:`156`
+    - add dask as dependency :mr:`155`
+    - renamed FFT sample Z mnemonics :mr:`153`
+    - add virtual sample camera LLC_webcam1 into mnemonics :mr:`152`
+    - fix digitizer check params :mr:`149`
+    - improve installation instruction :mr:`145`
+    - add Newton camera :mr:`142`
+    - simplified :code:`mnemonics_for_run()` :commit:`3cc98c16`
+    - adds Horizontal FDM to mnemonics :mr:`141`
+    - add setup documentation :mr:`140`
+    - numerous PES fixes :mr:`143`, :mr:`130`, :mr:`129`, :mr:`138`, :mr:`137`
+    - change in FFT sample Z mnemonics :mr:`125` and :mr:`124`
+    - add MTE3 camera :mr:`123`
+    - add KB benders averager :mr:`120` and :mr:`119`
+
+- **New Features**
+
+    - implement the Beam-splitting Off-axis Zone-plate analysis:
+      :mr:`150`, :mr:`139`, :mr:`136`, :mr:`134`, :mr:`133`, :mr:`132`,
+      :mr:`131`, :mr:`128`, :mr:`127`, :mr:`126`, :mr:`115`
+    - introduce dask assisted DSSC binning, fixing :issue:`24` and :issue:`17`
+
+1.4.0
+-----
+
+- **Bug fixes**
+
+    - fix :issue:`22` using extra-data read machinery :mr:`105`
+    - fix :issue:`21` and :issue:`12` introducing mnemonics version :mr:`104`
+
+- **Improvements**
+
+    - fix :code:`get_array()`, add wrappers to some of `extra_data` basic
+      functions :mr:`116`
+    - new FastADC mnemonics :mr:`112`
+    - refactor packaging :mr:`106`
+    - add :code:`load_bpt()` function :commit:`9e2c1107`
+    - add XTD10 MCP mnemonics :commit:`8b550c9b`
+    - add :code:`digitizer_type()` function :commit:`75eb0bca`
+    - separate FastADC and ADQ412 code :commit:`939d32b9`
+    - documentation centralized on rtd.xfel.eu :mr:`103`
+    - simplify digitizer functions and pulseId coordinates assignment for XGM
+      and digitizers :mr:`100`
+
+- **New Features**
+
+    - base knife-edge scan analysis implementation :mr:`107`
+    - add PES :mr:`108`
+    - integrate documentation to rtd.xfel.eu :mr:`103` and :mr:`99`
+
+
+1.1.2rc1
+--------
+
+- **Bug Fixes**
+
+- **Improvements**
+
+- **New Feature**
+
+    - introduce change in package structure, sphinx documentation and
+      DSSC binning class :mr:`87`
diff --git a/doc/conf.py b/doc/conf.py
index 4d0032b..7b4398f 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -43,6 +43,7 @@ extensions = [
     'sphinx.ext.viewcode',
     'sphinx.ext.coverage',
     'sphinx.ext.napoleon',
+    'sphinx.ext.extlinks',
     # Comment out autoapi to be able to run nbsphinx
     # 'autoapi.extension',
     'sphinx_rtd_theme',
@@ -51,6 +52,14 @@ extensions = [
 autoapi_dirs = ['../src/toolbox_scs']
 autoapi_ignore = ['*/deprecated/*']
 
+extlinks = {'issue': ('https://git.xfel.eu/SCS/ToolBox/-/issues/%s',
+                      'issue:'),
+            'mr': ('https://git.xfel.eu/SCS/ToolBox/-/merge_requests/%s',
+                   'MR:'),
+            'commit': ('https://git.xfel.eu/SCS/ToolBox/-/commit/%s',
+                       'commit:')
+            }
+
 # Don't add .txt suffix to source files:
 html_sourcelink_suffix = ''
 
diff --git a/doc/index.rst b/doc/index.rst
index 4970a0e..a260921 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -109,6 +109,7 @@ Documentation contents
 
    howtos.rst
    maintainers.rst
+   changelog.rst
 
 
 Contribute
diff --git a/setup.py b/setup.py
index af8d03d..9310d8e 100644
--- a/setup.py
+++ b/setup.py
@@ -14,7 +14,7 @@ advanced_analysis_reqs = [
 interactive_reqs = ['ipykernel', 'matplotlib', 'tqdm',]
 maxwell_reqs = ['joblib', 'papermill', 'dask',
                 'extra_data', 'euxfel_bunch_pattern>=0.6']
-
+docs_reqs = ['sphinx', 'nbsphinx']
 
 setup(name='toolbox_scs',
       version=_version,
@@ -33,6 +33,7 @@ setup(name='toolbox_scs',
           'advanced': advanced_analysis_reqs,
           'interactive': interactive_reqs,
           'maxwell': advanced_analysis_reqs + interactive_reqs + maxwell_reqs,
+          'docs': docs_reqs,
           'test': ['pytest']
       }
 )
-- 
GitLab