Repository: terminusdb/terminusdb-client-python (language: python)

Issue:
Are we still using id_parser.py
I would like to remove it if it is no longer needed. So far I didn't see it is imported anywhere.


Discussion / hints:

Fix patch:
diff --git a/terminusdb_client/woqlclient/id_parser.py b/terminusdb_client/woqlclient/id_parser.py
deleted file mode 100644
index 16e01eff..00000000
--- a/terminusdb_client/woqlclient/id_parser.py
+++ /dev/null
@@ -1,48 +0,0 @@
-# idParser.py
-
-
-class IDParser:
-    def __init__(self):
-        pass
-
-    def _valid_url(self, input_str):
-        if input_str is None:
-            return False
-        if input_str[:7] == "http://" or input_str[:8] == "https://":
-            return True
-        return False
-
-    def _valid_id_string(self, input_str, _=None):
-        if type(input_str) != str:
-            return False
-        if (":" in input_str) or (" " in input_str) or ("/" in input_str):
-            return False
-        return True
-
-    def parse_server_url(self, url):
-        if not self._valid_url(url):
-            return False
-        if url[-1] != "/":
-            url += "/"
-        return url
-
-    def parse_dbid(self, dbid):
-        if self._valid_id_string(dbid, "db"):
-            return dbid
-        return False
-
-    def parse_account(self, account):
-        if self._valid_id_string(account, "account"):
-            return account
-        return False
-
-    def parse_branch(self, bid):
-        if self._valid_id_string(bid, "branch"):
-            return bid
-        return False
-
-    def parse_jwt(self, jwt):
-        return jwt
-
-    def parse_key(self, key):
-        return key


Test patch:
diff --git a/terminusdb_client/tests/test_idParser.py b/terminusdb_client/tests/test_idParser.py
deleted file mode 100644
index aca80651..00000000
--- a/terminusdb_client/tests/test_idParser.py
+++ /dev/null
@@ -1,34 +0,0 @@
-import sys
-
-from terminusdb_client.woqlclient.id_parser import IDParser
-
-sys.path.append("woqlclient")
-
-
-def test_parse_server_url():
-    server_url = "http://localhost:6363/"
-    id_parser = IDParser()
-    assert id_parser.parse_server_url(server_url) == server_url
-
-
-def test_parse_dbid():
-    db_name = "myFirstTerminusDB"
-    id_parser = IDParser()
-    assert id_parser.parse_dbid(db_name) == db_name
-
-
-def test_valid_url():
-    full_url = "http://localhost:6363/myFirstTerminusDB"
-    id_parser = IDParser()
-    assert id_parser._valid_url(full_url)
-
-    full_url = "localhost&899900/myFirstTerminusDB"
-    assert not id_parser._valid_url(full_url)
-
-
-def test_valid_id_string():
-    id_string = "myFirstTerminusDB"
-    id_parser = IDParser()
-    assert id_parser._valid_id_string(id_string)
-    id_string = "my First:"
-    assert not id_parser._valid_id_string(id_string)