Skip to content

Commit

Permalink
new: blog post preparation (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
aMahanna authored Dec 31, 2021
1 parent c0719e7 commit b9734b6
Show file tree
Hide file tree
Showing 7 changed files with 4,462 additions and 112 deletions.
16 changes: 12 additions & 4 deletions adbnx_adapter/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,14 @@ def _identify_networkx_edge(
"""Given a NetworkX edge, and its pair of nodes, identify what ArangoDB
collection should it belong to.
NOTE: You must override this function if your NetworkX graph is NOT Homogeneous
or does NOT comply to ArangoDB standards
NOTE #1: You must override this function if your NetworkX graph is NOT
Homogeneous or does NOT comply to ArangoDB standards
(i.e the edge IDs are not formatted like "{collection}/{key}").
NOTE #2: You can accesss the ID & Collection belonging to the
**from_nx_node** & **to_nx_node** parameters via their "nx_id" & "col"
attribute keys. E.g `from_collection = from_nx_node["col"]`
:param nx_edge: The NetworkX edge object.
:type nx_edge: adbnx_adapter.typings.NxData
:param from_nx_node: The NetworkX node object representing the edge source.
Expand Down Expand Up @@ -130,12 +134,16 @@ def _keyify_networkx_edge(
"""Given a NetworkX edge, its collection, and its pair of nodes, derive
its valid ArangoDB key.
NOTE: You must override this function if you want to create custom ArangoDB _key
values for your NetworkX edges or if your NetworkX graph does NOT comply
NOTE #1: You must override this function if you want to create custom ArangoDB
_key values for your NetworkX edges or if your NetworkX graph does NOT comply
to ArangoDB standards (i.e the edge IDs are not formatted
like "{collection}/{key}"). For more info, see the **keyify_edges**
parameter of ADBNX_Adapter.networkx_to_arangodb()
NOTE #2: You can accesss the ID & Collection belonging to the
**from_nx_node** & **to_nx_node** parameters via their "nx_id" & "col"
attribute keys. E.g `from_collection = from_nx_node["col"]`
:param nx_edge: The NetworkX edge object.
:type nx_edge: adbnx_adapter.typings.NxData
:param from_nx_node: The NetworkX node object representing the edge source.
Expand Down
Loading

0 comments on commit b9734b6

Please sign in to comment.