Skip to content

Python Matrix #35

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 6 commits into from
Aug 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
14 changes: 10 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ executors:

machine-executor:
machine:
image: ubuntu-2404:2024.05.1
image: ubuntu-2404:current

jobs:
lint:
Expand Down Expand Up @@ -43,6 +43,9 @@ jobs:
command: mypy $PACKAGE_DIR $TESTS_DIR

test:
parameters:
python_version:
type: string
executor: machine-executor
steps:
- checkout
Expand All @@ -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
Expand All @@ -81,4 +84,7 @@ workflows:
build:
jobs:
- lint
- test
- test:
matrix:
parameters:
python_version: ["3.10", "3.11", "3.12.2"]
7 changes: 6 additions & 1 deletion nx_arangodb/classes/dict/adj.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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)

Expand Down