Repository: zincware/MDSuite (language: python)

Issue:
added versioneer capability
<!-- The issue that is fixed by this PR, if applicable: -->
I implemented the versioneer system to keep track of versions more easily. 
This allows to assign the package version only on the git tags and the package will get it automatically. 
It also tracks versions with commits using the hash. 
I find it very useful to avoid writing it in several places and be more consistent. 
In addition, it makes it easier for error reporting since users can specify the exact version easily. 

#### Summary of additions and changes

* Added files to perform version check . 

#### How to test this pull request

```
pip install . 
import mdsuite
print(mdsuite.__version__)
```



Discussion / hints:
I'm not a huge fan of how you have to copy a bunch of source code over into the project. There are a few projects that manage versioning albeit none quite as extensively as this one. But I am not sure if this comes at the cost of a nicely implemented tool.
Also, have we agreed on using the semantic versioning criteria? I think it makes the most sense and seems as though that is what we are using.
I see your point of adding the source code, but I guess it is to avoid dependencies. 
The code is in CC-0 which means there is no copyright, so it should be ok. 
There is also a lite version of this from the same author: https://github.com/jbweston/miniver

From my experience, most software uses semantic versioning and it is the one that seems most logic to me, so I'd go for that. 

I implemented this to avoid having to change the version number in several places. I am quite forgetful, and if something can be automatized and only be changed in one place, I will go for it.
There are certainly benefits to having the versioning accessible from within the code. I might just take a bit to think over if any improvement could be made in the following days. 

Fix patch:
diff --git a/mdsuite/__init__.py b/mdsuite/__init__.py
index 42688018..bd0b939a 100644
--- a/mdsuite/__init__.py
+++ b/mdsuite/__init__.py
@@ -24,6 +24,10 @@
 Summary
 -------
 """
+try:
+    from importlib import metadata
+except ImportError:  # for Python<3.8
+    import importlib_metadata as metadata
 import logging
 import sys
 
@@ -40,7 +44,7 @@
     "config",
     Molecule.__name__,
 ]
-__version__ = "0.1.0"
+__version__ = metadata.version("mdsuite")
 
 logger = logging.getLogger(__name__)
 logger.setLevel(logging.DEBUG)


Test patch:
diff --git a/CI/unit_tests/utils/test_scaling_functions.py b/CI/unit_tests/utils/test_scaling_functions.py
index 937f600d..15eb7df9 100644
--- a/CI/unit_tests/utils/test_scaling_functions.py
+++ b/CI/unit_tests/utils/test_scaling_functions.py
@@ -67,11 +67,11 @@ def test_linearithmic_scaling_function(self):
         """
         # Assert simple multiplication
         data = linearithmic_scale_function(10, 1)
-        self.assertEqual(data, 23.02585092994046)
+        self.assertAlmostEqual(data, 23.02585092994046, 5)
 
         # Assert scaled multiplication
         data = linearithmic_scale_function(10, 3)
-        self.assertEqual(data, 69.07755278982138)
+        self.assertAlmostEqual(data, 69.07755278982138, 5)
 
         # Assert array values
         data = linearithmic_scale_function(np.array([5, 10, 20]), 2)