Skip to content

Commit

Permalink
bump
Browse files Browse the repository at this point in the history
  • Loading branch information
aMahanna committed Oct 18, 2023
1 parent 1b10519 commit f2dc645
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 23 deletions.
22 changes: 15 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ workflows:
python_ci:
jobs:
- lint
- test
- test:
matrix:
parameters:
python_version: ["3.10", "3.9"]

orbs:
coveralls: coveralls/coveralls@2.2.1
# orbs:
# coveralls: coveralls/coveralls@2.2.1

jobs:
lint:
Expand Down Expand Up @@ -46,6 +49,9 @@ jobs:
- ~/.cache/pip

test:
parameters:
python_version:
type: string
machine:
image: linux-cuda-11:default
resource_class: gpu.nvidia.small.multi
Expand All @@ -54,8 +60,10 @@ jobs:
- restore_cache:
key: pip-and-local-cache
- run:
name: Setup Python 3.10
command: pyenv install 3.10 && pyenv global 3.10
name: Setup Python
command: |
pyenv install << parameters.python_version >>
pyenv global << parameters.python_version >>
- run:
name: Install Dependencies
command: |
Expand All @@ -70,5 +78,5 @@ jobs:
docker start adb
- run:
name: Run PyTest
command: pytest --cov=adbcug_adapter --cov-report xml --cov-report term-missing -v --color=yes --no-cov-on-fail --code-highlight=yes
- coveralls/upload
command: pytest --cov=adbcug_adapter --cov-report xml --cov-report term-missing -v --color=yes --no-cov-on-fail --code-highlight=yes --cov-fail-under=75
# - coveralls/upload
16 changes: 8 additions & 8 deletions adbcug_adapter/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ def _prepare_arangodb_vertex(self, adb_vertex: Json, col: str) -> None:
pass

def _identify_cugraph_node(self, cug_node_id: CUGId, adb_v_cols: List[str]) -> str:
"""Given a CuGraph node, and a list of ArangoDB vertex collections defined,
"""Given a cuGraph node, and a list of ArangoDB vertex collections defined,
identify which ArangoDB vertex collection **cug_node_id** should belong to.
NOTE: You must override this function if len(**adb_v_cols**) > 1.
:param cug_node_id: The CuGraph ID of the node.
:param cug_node_id: The cuGraph ID of the node.
:type cug_node_id: adbcug_adapter.typings.CUGId
:param adb_v_cols: All ArangoDB vertex collections specified
by the **edge_definitions** parameter of cugraph_to_arangodb()
Expand Down Expand Up @@ -73,7 +73,7 @@ def _identify_cugraph_edge(
:type from_node_id: adbcug_adapter.typings.CUGId
:param to_node_id: The ID of the cuGraph node representing the edge destination.
:type to_node_id: adbcug_adapter.typings.CUGId
:param cug_map: A mapping of CuGraph node ids to ArangoDB vertex ids. You
:param cug_map: A mapping of cuGraph node ids to ArangoDB vertex ids. You
can use this to derive the ArangoDB _from and _to values of the edge.
i.e, `cug_map[from_node_id]` will give you the ArangoDB _from value,
and `cug_map[to_node_id]` will give you the ArangoDB _to value.
Expand Down Expand Up @@ -118,11 +118,11 @@ def _keyify_cugraph_edge(
cug_map: Dict[CUGId, str],
col: str,
) -> str:
"""Given a CuGraph edge, its collection, and its pair of nodes, derive
"""Given a cuGraph edge, its collection, and its pair of nodes, derive
its ArangoDB key.
NOTE #1: You must override this function if you want to create custom ArangoDB
_key values for your CuGraph edges.
_key values for your cuGraph edges.
NOTE #2: You can use **cug_map** to derive the ArangoDB _from and _to values
of the edge. i.e, `cug_map[from_node_id]` will give you the ArangoDB _from
Expand All @@ -133,13 +133,13 @@ def _keyify_cugraph_edge(
:param i: The index of the NetworkX edge in the list of edges.
:type i: int
:param from_node_id: The CuGraph ID of the node representing the edge source.
:param from_node_id: The cuGraph ID of the node representing the edge source.
:type from_node_id: adbcug_adapter.typings.CUGId
:param to_node_id: The CuGraph ID of the node representing the edge destination.
:param to_node_id: The cuGraph ID of the node representing the edge destination.
:type to_node_id: adbcug_adapter.typings.CUGId
:param col: The ArangoDB collection that the cuGraph edge belongs to.
:type col: str
:param cug_map: A mapping of CuGraph node ids to ArangoDB vertex ids. You
:param cug_map: A mapping of cuGraph node ids to ArangoDB vertex ids. You
can use this to derive the ArangoDB _from and _to values of the edge.
i.e, cug_map[from_node_id] will give you the ArangoDB _from value,
and cug_map[to_node_id] will give you the ArangoDB _to value.
Expand Down
6 changes: 3 additions & 3 deletions examples/ArangoDB_cuGraph_Adapter.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -961,12 +961,12 @@
" \"\"\"\n",
"\n",
" def _identify_cugraph_node(self, cug_node_id: CUGId, adb_v_cols: List[str]) -> str:\n",
" \"\"\"Given a CuGraph node, and a list of ArangoDB vertex collections defined,\n",
" \"\"\"Given a cuGraph node, and a list of ArangoDB vertex collections defined,\n",
" identify which ArangoDB vertex collection **cug_node_id** should belong to.\n",
"\n",
" NOTE: You must override this function if len(**adb_v_cols**) > 1.\n",
"\n",
" :param cug_node_id: The CuGraph ID of the node.\n",
" :param cug_node_id: The cuGraph ID of the node.\n",
" :type cug_node_id: adbcug_adapter.typings.CUGId\n",
" :param adb_v_cols: All ArangoDB vertex collections specified\n",
" by the **edge_definitions** parameter of cugraph_to_arangodb()\n",
Expand Down Expand Up @@ -997,7 +997,7 @@
" :type from_node_id: adbcug_adapter.typings.CUGId\n",
" :param to_node_id: The ID of the cuGraph node representing the edge destination.\n",
" :type to_node_id: adbcug_adapter.typings.CUGId\n",
" :param cug_map: A mapping of CuGraph node ids to ArangoDB vertex ids. You\n",
" :param cug_map: A mapping of cuGraph node ids to ArangoDB vertex ids. You\n",
" can use this to derive the ArangoDB _from and _to values of the edge.\n",
" i.e, `cug_map[from_node_id]` will give you the ArangoDB _from value,\n",
" and `cug_map[to_node_id]` will give you the ArangoDB _to value.\n",
Expand Down
6 changes: 3 additions & 3 deletions examples/outputs/ArangoDB_cuGraph_Adapter_output.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2515,12 +2515,12 @@
" \"\"\"\n",
"\n",
" def _identify_cugraph_node(self, cug_node_id: CUGId, adb_v_cols: List[str]) -> str:\n",
" \"\"\"Given a CuGraph node, and a list of ArangoDB vertex collections defined,\n",
" \"\"\"Given a cuGraph node, and a list of ArangoDB vertex collections defined,\n",
" identify which ArangoDB vertex collection **cug_node_id** should belong to.\n",
"\n",
" NOTE: You must override this function if len(**adb_v_cols**) > 1.\n",
"\n",
" :param cug_node_id: The CuGraph ID of the node.\n",
" :param cug_node_id: The cuGraph ID of the node.\n",
" :type cug_node_id: adbcug_adapter.typings.CUGId\n",
" :param adb_v_cols: All ArangoDB vertex collections specified\n",
" by the **edge_definitions** parameter of cugraph_to_arangodb()\n",
Expand Down Expand Up @@ -2551,7 +2551,7 @@
" :type from_node_id: adbcug_adapter.typings.CUGId\n",
" :param to_node_id: The ID of the cuGraph node representing the edge destination.\n",
" :type to_node_id: adbcug_adapter.typings.CUGId\n",
" :param cug_map: A mapping of CuGraph node ids to ArangoDB vertex ids. You\n",
" :param cug_map: A mapping of cuGraph node ids to ArangoDB vertex ids. You\n",
" can use this to derive the ArangoDB _from and _to values of the edge.\n",
" i.e, `cug_map[from_node_id]` will give you the ArangoDB _from value,\n",
" and `cug_map[to_node_id]` will give you the ArangoDB _to value.\n",
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
keywords=["arangodb", "cugraph", "adapter"],
packages=["adbcug_adapter"],
include_package_data=True,
python_requires=">=3.8",
python_requires=">=3.9,<3.11",
license="Apache Software License",
install_requires=[
"python-arango>=7.4.1",
Expand All @@ -39,7 +39,6 @@
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Utilities",
Expand Down

0 comments on commit f2dc645

Please sign in to comment.