Skip to content

Commit 6e61059

Browse files
authored
GA-156 | update phenolrs wheel (#13)
* GA-156 | initial commit * fix: lint
1 parent 84b165c commit 6e61059

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

nx_arangodb/classes/function.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,14 @@ def get_arangodb_graph(
5858
"edgeCollections": {col: {} for col in e_cols},
5959
}
6060

61-
from phenolrs.networkx_loader import NetworkXLoader
61+
if not any((load_node_dict, load_adj_dict, load_coo)):
62+
raise ValueError("At least one of the load flags must be True.")
63+
64+
if not load_node_dict:
65+
metagraph["vertexCollections"] = {}
66+
67+
if not load_adj_dict and not load_coo:
68+
metagraph["edgeCollections"] = {}
6269

6370
config = nx.config.backends.arangodb
6471

@@ -73,14 +80,15 @@ def get_arangodb_graph(
7380
assert config.username
7481
assert config.password
7582

83+
from phenolrs.networkx_loader import NetworkXLoader
84+
7685
# TODO: Remove ignore when phenolrs is published
7786
return NetworkXLoader.load_into_networkx( # type: ignore
7887
config.db_name,
7988
metagraph=metagraph,
8089
hosts=[config.host],
8190
username=config.username,
8291
password=config.password,
83-
load_node_dict=load_node_dict,
8492
load_adj_dict=load_adj_dict,
8593
load_adj_dict_as_directed=load_adj_dict_as_directed,
8694
load_adj_dict_as_multigraph=load_adj_dict_as_multigraph,
Binary file not shown.

0 commit comments

Comments
 (0)