Skip to content

Commit b74db52

Browse files
authored
Merge pull request #155 from neo4j/fix-ci-take2
Fix CI issues part 2 + fix streamlit
2 parents a2a45ba + 0a75bc3 commit b74db52

File tree

4 files changed

+37
-9
lines changed

4 files changed

+37
-9
lines changed

examples/streamlit-example.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@ def create_visualization_graph() -> VisualizationGraph:
1818
cora_rels_path = f"{script_dir_path}/datasets/cora/cora_rels.parquet.gzip"
1919

2020
nodes_df = read_parquet(cora_nodes_path)
21+
nodes_df = nodes_df.rename(columns={"nodeId": "id"})
22+
2123
rels_df = read_parquet(cora_rels_path)
24+
rels_df = rels_df.rename(
25+
columns={"sourceNodeId": "source", "targetNodeId": "target"}
26+
)
2227

2328
# Drop the features column since it's not needed for visualization
2429
# Also numpy arrays are not supported by the visualization library

python-wrapper/pyproject.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,16 @@ requires-python = ">=3.9"
4141

4242
[project.optional-dependencies]
4343
dev = [
44-
"ruff==0.9.7",
44+
"ruff==0.11.8",
4545
"mypy==1.15.0",
4646
"pytest==8.3.4",
47-
"selenium==4.28.1",
47+
"selenium==4.32.0",
4848
"ipykernel==6.29.5",
4949
"palettable==3.3.3",
5050
"pytest-mock==3.14.0",
5151
"nbconvert==7.16.6",
52-
"streamlit==1.42.0",
53-
"matplotlib==3.9.4",
52+
"streamlit==1.45.0",
53+
"matplotlib>=3.9.4",
5454
]
5555
docs = [
5656
"sphinx==8.1.3",
@@ -62,12 +62,12 @@ pandas = ["pandas>=2, <3", "pandas-stubs>=2, <3"]
6262
gds = ["graphdatascience>=1, <2"]
6363
neo4j = ["neo4j"]
6464
notebook = [
65-
"ipykernel==6.29.5",
66-
"pykernel==0.1.6",
65+
"ipykernel>=6.29.5",
66+
"pykernel>=0.1.6",
6767
"neo4j>=5.26.0",
6868
"ipywidgets>=8.0.0",
69-
"palettable==3.3.3",
70-
"matplotlib==3.10.0",
69+
"palettable>=3.3.3",
70+
"matplotlib>=3.9.4",
7171
"snowflake-snowpark-python==1.26.0",
7272
]
7373

python-wrapper/tests/gds_helper.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import os
2+
import re
23

34
from graphdatascience import GraphDataScience
45
from graphdatascience.semantic_version.semantic_version import SemanticVersion
@@ -7,7 +8,22 @@
78
from graphdatascience.session.aura_api_responses import InstanceCreateDetails
89
from graphdatascience.version import __version__
910

10-
GDS_VERSION = SemanticVersion.from_string(__version__)
11+
12+
def parse_version(version: str) -> SemanticVersion:
13+
server_version_match = re.search(r"(\d+\.)?(\d+\.)?(\*|\d+)", version)
14+
if not server_version_match:
15+
raise ValueError(f"{version} is not a valid semantic version")
16+
17+
groups = [int(g.replace(".", "")) for g in server_version_match.groups() if g]
18+
19+
major = groups[0] if len(groups) > 0 else 0
20+
minor = groups[1] if len(groups) > 1 else 0
21+
patch = groups[2] if len(groups) > 2 else 0
22+
23+
return SemanticVersion(major=major, minor=minor, patch=patch)
24+
25+
26+
GDS_VERSION = parse_version(__version__)
1127

1228

1329
def connect_to_plugin_gds(uri: str) -> GraphDataScience:

scripts/run_streamlit_example.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
GIT_ROOT=$(git rev-parse --show-toplevel)
2+
3+
set -o errexit
4+
set -o nounset
5+
set -o pipefail
6+
7+
streamlit run ${GIT_ROOT}/examples/streamlit-example.py

0 commit comments

Comments
 (0)