From 49bbb42c6df8cd416005f465be9f1af14954602c Mon Sep 17 00:00:00 2001 From: Anthony Mahanna Date: Fri, 16 Aug 2024 10:19:02 -0400 Subject: [PATCH 1/5] initial commit --- .circleci/config.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 28e367aa..ce58dd83 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -43,6 +43,9 @@ jobs: command: mypy $PACKAGE_DIR $TESTS_DIR test: + parameters: + python_version: + type: string executor: machine-executor steps: - checkout @@ -57,8 +60,8 @@ jobs: name: Setup Python command: | pyenv --version - pyenv install -f 3.10 - pyenv global 3.10 + pyenv install -f << parameters.python_version >> + pyenv global << parameters.python_version >> - run: name: Setup pip @@ -81,4 +84,7 @@ workflows: build: jobs: - lint - - test \ No newline at end of file + - test: + matrix: + parameters: + python_version: ["3.10", "3.11", "3.12.3"] \ No newline at end of file From 7948871a36f8d4341f6823ce81c5234b7a212f6d Mon Sep 17 00:00:00 2001 From: Anthony Mahanna Date: Fri, 16 Aug 2024 10:21:11 -0400 Subject: [PATCH 2/5] fix: machine --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ce58dd83..067abb48 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,7 +10,7 @@ executors: machine-executor: machine: - image: ubuntu-2404:2024.05.1 + image: ubuntu-2404 jobs: lint: From f0fae0179a6f44bdfc8c491bdeaf264905337d7d Mon Sep 17 00:00:00 2001 From: Anthony Mahanna Date: Fri, 16 Aug 2024 10:22:23 -0400 Subject: [PATCH 3/5] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 067abb48..0e51f875 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,7 +10,7 @@ executors: machine-executor: machine: - image: ubuntu-2404 + image: ubuntu-2404:current jobs: lint: From 88e36af8773c6a2f951732453770bb21b23568ac Mon Sep 17 00:00:00 2001 From: Anthony Mahanna Date: Fri, 16 Aug 2024 10:23:50 -0400 Subject: [PATCH 4/5] try 3.12.2 --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0e51f875..ee7af34b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -87,4 +87,4 @@ workflows: - test: matrix: parameters: - python_version: ["3.10", "3.11", "3.12.3"] \ No newline at end of file + python_version: ["3.10", "3.11", "3.12.2"] \ No newline at end of file From ba3652f36cfc348aea098fafca38bf09365846c9 Mon Sep 17 00:00:00 2001 From: Anthony Mahanna Date: Fri, 16 Aug 2024 19:30:37 -0400 Subject: [PATCH 5/5] fix: `-1` key in `EdgeKeyDict.__contains__` wow... --- nx_arangodb/classes/dict/adj.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nx_arangodb/classes/dict/adj.py b/nx_arangodb/classes/dict/adj.py index 32280e95..380584eb 100644 --- a/nx_arangodb/classes/dict/adj.py +++ b/nx_arangodb/classes/dict/adj.py @@ -432,6 +432,11 @@ def __contains__(self, key: str | int) -> bool: 'edge/1' in G._adj['node/1']['node/2'] 0 in G._adj['node/1']['node/2'] """ + # HACK: This is a workaround for the fact that + # nxadb.MultiGraph does not yet support custom edge keys + if key == "-1": + return False + if isinstance(key, int): key = self.__process_int_edge_key(key) @@ -464,7 +469,7 @@ def __contains__(self, key: str | int) -> bool: def __getitem__(self, key: str | int) -> EdgeAttrDict: """G._adj['node/1']['node/2']['edge/1']""" # HACK: This is a workaround for the fact that - # nxadb.MultiGraph does not yet support edge keys + # nxadb.MultiGraph does not yet support custom edge keys if key == "-1": raise KeyError(key)