Skip to content

GA-156 | update phenolrs wheel #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions nx_arangodb/classes/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,14 @@ def get_arangodb_graph(
"edgeCollections": {col: {} for col in e_cols},
}

from phenolrs.networkx_loader import NetworkXLoader
if not any((load_node_dict, load_adj_dict, load_coo)):
raise ValueError("At least one of the load flags must be True.")

if not load_node_dict:
metagraph["vertexCollections"] = {}

if not load_adj_dict and not load_coo:
metagraph["edgeCollections"] = {}

config = nx.config.backends.arangodb

Expand All @@ -73,14 +80,15 @@ def get_arangodb_graph(
assert config.username
assert config.password

from phenolrs.networkx_loader import NetworkXLoader

# TODO: Remove ignore when phenolrs is published
return NetworkXLoader.load_into_networkx( # type: ignore
config.db_name,
metagraph=metagraph,
hosts=[config.host],
username=config.username,
password=config.password,
load_node_dict=load_node_dict,
load_adj_dict=load_adj_dict,
load_adj_dict_as_directed=load_adj_dict_as_directed,
load_adj_dict_as_multigraph=load_adj_dict_as_multigraph,
Expand Down
Binary file not shown.