Repository: Ouranosinc/xclim

Issue:
Add xclim version to history metadata attribute
### Description
In order to potentially backtrack slight differences in calculations between versions - add xclim version info the inicator attributes. I suggest in the ```history``` attr



Discussion:
coveralls: ## Pull Request Test Coverage Report for [Build 862](https://coveralls.io/builds/24064518)

* **2** of **2**   **(100.0%)**  changed or added relevant lines in **1** file are covered.
* No unchanged relevant lines lost coverage.
* Overall coverage increased (+**0.006%**) to **92.213%**

---



|  Totals | [![Coverage Status](https://coveralls.io/builds/24064518/badge)](https://coveralls.io/builds/24064518) |
| :-- | --: |
| Change from base [Build 858](https://coveralls.io/builds/24062901): |  0.006% |
| Covered Lines: | 1279 |
| Relevant Lines: | 1387 |

---
##### 💛  - [Coveralls](https://coveralls.io)

coveralls: ## Pull Request Test Coverage Report for [Build 862](https://coveralls.io/builds/24064518)

* **2** of **2**   **(100.0%)**  changed or added relevant lines in **1** file are covered.
* No unchanged relevant lines lost coverage.
* Overall coverage increased (+**0.006%**) to **92.213%**

---



|  Totals | [![Coverage Status](https://coveralls.io/builds/24064518/badge)](https://coveralls.io/builds/24064518) |
| :-- | --: |
| Change from base [Build 858](https://coveralls.io/builds/24062901): |  0.006% |
| Covered Lines: | 1279 |
| Relevant Lines: | 1387 |

---
##### 💛  - [Coveralls](https://coveralls.io)


Patch:
diff --git a/HISTORY.rst b/HISTORY.rst
index 3d38f84c..7231208e 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -2,15 +2,12 @@
 History
 =======
 
-0.10.2-beta (2019-06-18)
+0.10.x-beta (2019-06-18)
 ------------------------
-* Added utilities with ensemble, run length, and subset algorithms to the documentation.
-
-0.10.1-beta ()
---------------
 * Migrated to a `major.minor.patch-release` semantic versioning system.
 * Removed attributes in netCDF output from Indicators that are not in the CF-convention.
 * Added `fit` indicator to fit the parameters of a distribution to a series.
+* Added utilities with ensemble, run length, and subset algorithms to the documentation.
 
 0.10-beta (2019-06-06)
 ----------------------
diff --git a/xclim/utils.py b/xclim/utils.py
index 9a167322..df4d9993 100644
--- a/xclim/utils.py
+++ b/xclim/utils.py
@@ -19,6 +19,7 @@ import xarray as xr
 from boltons.funcutils import wraps
 
 from . import checks
+import xclim
 
 units = pint.UnitRegistry(autoconvert_offset_to_baseunit=True)
 units.define(pint.unit.UnitDefinition('percent', '%', (),
@@ -685,8 +686,8 @@ class Indicator():
             else:
                 cp[k] = v
 
-        attrs['history'] += '[{:%Y-%m-%d %H:%M:%S}] {}: {}{}'.format(
-            dt.datetime.now(), vname, self.identifier, ba.signature.replace(parameters=cp.values()))
+        attrs['history'] += '[{:%Y-%m-%d %H:%M:%S}] {}: {}{} - xclim version: {}.'.format(
+            dt.datetime.now(), vname, self.identifier, ba.signature.replace(parameters=cp.values()), xclim.__version__)
         attrs['cell_methods'] += out_attrs.pop('cell_methods', '')
         attrs.update(out_attrs)
 


Test patch:
diff --git a/tests/test_utils.py b/tests/test_utils.py
index 98d89f6a..e8e1f90d 100644
--- a/tests/test_utils.py
+++ b/tests/test_utils.py
@@ -32,6 +32,7 @@ from xclim import indices
 from xclim import subset
 from xclim import utils
 from xclim import atmos
+from xclim import __version__
 from xclim.utils import daily_downsampler, Indicator, format_kwargs, parse_doc, walk_map
 from xclim.utils import infer_doy_max, adjust_doy_calendar, percentile_doy
 from xclim.utils import units, pint2cfunits, units2pint
@@ -216,6 +217,7 @@ class TestIndicator:
         assert txm.cell_methods == 'time: mean within days time: mean within years'
         assert '{:%Y-%m-%d %H}'.format(dt.datetime.now()) in txm.attrs['history']
         assert "tmin(da, thresh=5, freq='YS')" in txm.attrs['history']
+        assert 'xclim version: {}.'.format(__version__) in txm.attrs['history']
         assert txm.name == "tmin5"
 
     def test_temp_unit_conversion(self, tas_series):