Skip to content

Commit df197bc

Browse files
committed
Support latest gds alpha release
1 parent a5ff494 commit df197bc

4 files changed

Lines changed: 21 additions & 6 deletions

File tree

.github/workflows/gds-integration-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
fail-fast: false
2121
matrix:
2222
os: [ubuntu-latest]
23-
gds-version: ["1.22", "2.0.0a1"]
23+
gds-version: ["1.22", "2.0.0a4"]
2424
defaults:
2525
run:
2626
working-directory: python-wrapper

python-wrapper/tests/neo4j_and_gds/gds_helper.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,19 @@
44

55
from graphdatascience import GdsSessions, GraphDataScience
66
from graphdatascience.arrow_client.arrow_authentication import UsernamePasswordAuthentication
7-
from graphdatascience.semantic_version.semantic_version import SemanticVersion
87
from graphdatascience.session import AuraAPICredentials, AuraGraphDataScience, DbmsConnectionInfo, SessionMemory
98
from graphdatascience.session.aura_api import AuraApi
109
from graphdatascience.session.aura_api_responses import InstanceCreateDetails
1110
from graphdatascience.version import __version__
1211

12+
# The GDS client >= 2.0 moved `SemanticVersion` under `versions`
13+
if int(__version__.split(".")[0]) >= 2:
14+
from graphdatascience.versions.semantic_version import SemanticVersion
15+
else:
16+
from graphdatascience.semantic_version.semantic_version import ( # type: ignore[import-not-found,no-redef]
17+
SemanticVersion,
18+
)
19+
1320

1421
def parse_version(version: str) -> SemanticVersion:
1522
server_version_match = re.search(r"(\d+\.)?(\d+\.)?(\*|\d+)", version)

python-wrapper/tests/neo4j_and_gds/test_notebooks.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,16 @@
33
import pytest
44
from dotenv import load_dotenv
55
from graphdatascience import GraphDataScience
6-
from graphdatascience.semantic_version.semantic_version import SemanticVersion
76
from graphdatascience.session import AuraGraphDataScience
7+
from graphdatascience.version import __version__
8+
9+
# The GDS client >= 2.0 moved `SemanticVersion` under `versions`
10+
if int(__version__.split(".")[0]) >= 2:
11+
from graphdatascience.versions.semantic_version import SemanticVersion
12+
else:
13+
from graphdatascience.semantic_version.semantic_version import ( # type: ignore[import-not-found,no-redef]
14+
SemanticVersion,
15+
)
816

917
from tests.neo4j_and_gds.gds_helper import GDS_VERSION
1018
from tests.notebook_runner import run_notebooks

python-wrapper/uv.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)