Repository: duartegroup/autodE (python)

Issue:
Throw useful exception if `ade.Config.ts_template_folder_path = ""`

Pull request description:
Improve exception for invalid ts template folder path
## Resolves #212 

Patch:
diff --git a/autode/__init__.py b/autode/__init__.py
index eff4ba3..0a1dd63 100644
--- a/autode/__init__.py
+++ b/autode/__init__.py
@@ -38,7 +38,7 @@ Bumping the version number requires following the release proceedure:
   - Merge when tests pass
 """
 
-__version__ = "1.3.3"
+__version__ = "1.3.4"
 
 
 __all__ = [
diff --git a/autode/transition_states/templates.py b/autode/transition_states/templates.py
index 3bea0e8..5bb77e1 100644
--- a/autode/transition_states/templates.py
+++ b/autode/transition_states/templates.py
@@ -38,6 +38,11 @@ def get_ts_template_folder_path(folder_path):
 
     logger.info("Folder path is not set – TS templates in the default path")
 
+    if Config.ts_template_folder_path == "":
+        raise ValueError(
+            "Cannot set ts_template_folder_path to an empty string"
+        )
+
     if Config.ts_template_folder_path is not None:
         logger.info("Configuration ts_template_folder_path is set")
         return Config.ts_template_folder_path
diff --git a/doc/changelog.rst b/doc/changelog.rst
index 8376c45..3097412 100644
--- a/doc/changelog.rst
+++ b/doc/changelog.rst
@@ -1,6 +1,26 @@
 Changelog
 =========
 
+1.3.4
+--------
+----------
+
+Feature additions.
+
+Usability improvements/Changes
+******************************
+* Throw useful exception for invalid :code:`ade.Config.ts_template_folder_path`
+
+
+Functionality improvements
+**************************
+- 
+
+Bug Fixes
+*********
+-
+
+
 1.3.3
 --------
 ----------
diff --git a/setup.py b/setup.py
index b8206c6..ddfe8d1 100644
--- a/setup.py
+++ b/setup.py
@@ -24,7 +24,7 @@ extensions = [
 
 setup(
     name="autode",
-    version="1.3.3",
+    version="1.3.4",
     python_requires=">3.7",
     packages=[
         "autode",


Test patch:
diff --git a/tests/test_config.py b/tests/test_config.py
index a0791d2..338a22a 100644
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -5,6 +5,7 @@ from autode.config import Config
 from autode.values import Allocation, Distance
 from autode.wrappers.keywords import KeywordsSet
 from autode.wrappers.keywords import Keywords
+from autode.transition_states.templates import get_ts_template_folder_path
 
 
 def test_config():
@@ -76,3 +77,13 @@ def test_step_size_setter():
     # Setting in Bohr should convert to angstroms
     _config.max_step_size = Distance(0.2, units="a0")
     assert np.isclose(_config.max_step_size.to("ang"), 0.1, atol=0.02)
+
+
+def test_invalid_get_ts_template_folder_path():
+
+    Config.ts_template_folder_path = ""
+
+    with pytest.raises(ValueError):
+        _ = get_ts_template_folder_path(None)
+
+    Config.ts_template_folder_path = None