community: tigergraph fixes (#20034)

- added guard on the `pyTigerGraph` import
- added a missed example page in the `docs/integrations/graphs/`
- formatted the `docs/integrations/providers/` page to the consistent
format. Added links.
This commit is contained in:
Leonid Ganeline
2024-04-24 13:49:21 -07:00
committed by GitHub
parent 0186e4e633
commit 13751c3297
3 changed files with 51 additions and 22 deletions

View File

@@ -39,7 +39,13 @@ class TigerGraph(GraphStore):
return str(self._schema)
def set_connection(self, conn: Any) -> None:
from pyTigerGraph import TigerGraphConnection
try:
from pyTigerGraph import TigerGraphConnection
except ImportError:
raise ImportError(
"Could not import pyTigerGraph python package. "
"Please install it with `pip install pyTigerGraph`."
)
if not isinstance(conn, TigerGraphConnection):
msg = "**conn** parameter must inherit from TigerGraphConnection"