From 484ebadf370e7095aaeae6acd052ef27e8bdec1a Mon Sep 17 00:00:00 2001
From: florian <f.spreckelsen@inidscale.com>
Date: Thu, 21 Oct 2021 11:42:17 +0200
Subject: [PATCH] MAINT: Disable warning

---
 src/caosdb/configuration.py | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/src/caosdb/configuration.py b/src/caosdb/configuration.py
index 314a1a1d..f9ea3199 100644
--- a/src/caosdb/configuration.py
+++ b/src/caosdb/configuration.py
@@ -84,14 +84,16 @@ def config_to_yaml(config):
 
 
 def validate_yaml_schema(valobj):
-    if optional_jsonschema_validate:
-        with open(os.path.join(os.path.dirname(__file__), "schema-pycaosdb-ini.yml")) as f:
-            schema = yaml.load(f, Loader=yaml.SafeLoader)
-        optional_jsonschema_validate(instance=valobj, schema=schema["schema-pycaosdb-ini"])
-    else:
-        warnings.warn("""
-                        Warning: The validation could not be performed because `jsonschema` is not installed.
-                    """)
+    # TODO: Re-enable warning once the schema has been extended to also cover
+    # SSS pycaosdb.inis and integration tests.
+    # if optional_jsonschema_validate:
+    with open(os.path.join(os.path.dirname(__file__), "schema-pycaosdb-ini.yml")) as f:
+        schema = yaml.load(f, Loader=yaml.SafeLoader)
+    optional_jsonschema_validate(instance=valobj, schema=schema["schema-pycaosdb-ini"])
+    # else:
+    #     warnings.warn("""
+    #                     Warning: The validation could not be performed because `jsonschema` is not installed.
+    #                 """)
 
 
 def _read_config_files():
-- 
GitLab