From 60570ee1f2cbea7ca657b7c58927b41bac85548a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florentin=20D=C3=B6rre?= Date: Mon, 5 Jan 2026 11:08:50 +0100 Subject: [PATCH 1/6] Move dev,docs,notebooks as dependency-groups no reason to publish these as optional dependencies --- python-wrapper/pyproject.toml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/python-wrapper/pyproject.toml b/python-wrapper/pyproject.toml index e6fcbea..c2d2d13 100644 --- a/python-wrapper/pyproject.toml +++ b/python-wrapper/pyproject.toml @@ -39,6 +39,13 @@ requires-python = ">=3.10" [project.optional-dependencies] +pandas = ["pandas>=2, <3", "pandas-stubs>=2, <3"] +gds = ["graphdatascience>=1, <2"] +neo4j = ["neo4j"] +snowflake = ["snowflake-snowpark-python>=1, <2"] + + +[dependency-groups] dev = [ "ruff==0.14.1", "mypy==1.18.2", @@ -57,10 +64,6 @@ docs = [ "nbsphinx==0.9.7", "nbsphinx-link==1.3.1", ] -pandas = ["pandas>=2, <3", "pandas-stubs>=2, <3"] -gds = ["graphdatascience>=1, <2"] -neo4j = ["neo4j"] -snowflake = ["snowflake-snowpark-python>=1, <2"] notebook = [ "ipykernel>=6.29.5", "pykernel>=0.1.6", From 20114a2f7c7020f6f89c6ea4f863e34d9405ca03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florentin=20D=C3=B6rre?= Date: Mon, 5 Jan 2026 11:48:02 +0100 Subject: [PATCH 2/6] Fix links to tutorials --- docs/antora/modules/ROOT/pages/integration/gds.adoc | 2 +- docs/antora/modules/ROOT/pages/integration/neo4j.adoc | 2 +- docs/antora/modules/ROOT/pages/integration/snowflake.adoc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/antora/modules/ROOT/pages/integration/gds.adoc b/docs/antora/modules/ROOT/pages/integration/gds.adoc index a61beae..46e8093 100644 --- a/docs/antora/modules/ROOT/pages/integration/gds.adoc +++ b/docs/antora/modules/ROOT/pages/integration/gds.adoc @@ -53,4 +53,4 @@ VG = from_gds( VG.color_nodes(property="componentId") ---- -See the link:/tutorials/gds-example[Visualizing Neo4j Graph Data Science (GDS) Graphs tutorial] for a more extensive example. \ No newline at end of file +See the link:{tutorials-docs-uri}/gds-example[Visualizing Neo4j Graph Data Science (GDS) Graphs tutorial] for a more extensive example. \ No newline at end of file diff --git a/docs/antora/modules/ROOT/pages/integration/neo4j.adoc b/docs/antora/modules/ROOT/pages/integration/neo4j.adoc index baffdd1..9a031f5 100644 --- a/docs/antora/modules/ROOT/pages/integration/neo4j.adoc +++ b/docs/antora/modules/ROOT/pages/integration/neo4j.adoc @@ -42,4 +42,4 @@ with GraphDatabase.driver(URI, auth=auth) as driver: VG = from_neo4j(result) ---- -See the link:/tutorials/neo4j-example[Visualizing Neo4j Graphs tutorial] for a more extensive example. \ No newline at end of file +See the link:{tutorials-docs-uri}/neo4j-example[Visualizing Neo4j Graphs tutorial] for a more extensive example. \ No newline at end of file diff --git a/docs/antora/modules/ROOT/pages/integration/snowflake.adoc b/docs/antora/modules/ROOT/pages/integration/snowflake.adoc index f36405f..d8e9d2f 100644 --- a/docs/antora/modules/ROOT/pages/integration/snowflake.adoc +++ b/docs/antora/modules/ROOT/pages/integration/snowflake.adoc @@ -84,4 +84,4 @@ VG = from_snowflake( ) ---- -For a full example of the `from_snowflake` importer in action, please see the link:http://localhost:9000/tutorials/snowflake-example/[Visualizing Snowflake Tables tutorial]. \ No newline at end of file +For a full example of the `from_snowflake` importer in action, please see the link:{tutorials-docs-uri}/snowflake-example/[Visualizing Snowflake Tables tutorial]. \ No newline at end of file From d76ad3b777c9d796458705e1bee10037cc2d4a7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florentin=20D=C3=B6rre?= Date: Mon, 5 Jan 2026 11:48:16 +0100 Subject: [PATCH 3/6] Add script to render antora docs --- .github/workflows/render-docs.yml | 2 +- docs/antora/package.json | 1 + scripts/render_antora_docs.sh | 10 ++++++++++ scripts/{render_docs.sh => render_api_docs.sh} | 0 ...render_and_host_docs.sh => render_host_api_docs.sh} | 0 5 files changed, 12 insertions(+), 1 deletion(-) create mode 100755 scripts/render_antora_docs.sh rename scripts/{render_docs.sh => render_api_docs.sh} (100%) rename scripts/{render_and_host_docs.sh => render_host_api_docs.sh} (100%) diff --git a/.github/workflows/render-docs.yml b/.github/workflows/render-docs.yml index fd9d732..4bfa1de 100644 --- a/.github/workflows/render-docs.yml +++ b/.github/workflows/render-docs.yml @@ -41,4 +41,4 @@ jobs: version: 3.6.2 - name: Render ref docs - run: uv run bash ../scripts/render_docs.sh + run: uv run bash ../scripts/render_api_docs.sh diff --git a/docs/antora/package.json b/docs/antora/package.json index 4a64a88..6da376e 100644 --- a/docs/antora/package.json +++ b/docs/antora/package.json @@ -25,6 +25,7 @@ "dependencies": { "@neo4j-antora/aliases-redirects": "^0.2.5", "@neo4j-antora/antora-add-notes": "^0.3.2", + "@neo4j-antora/antora-page-roles": "^0.3.2", "@neo4j-antora/mark-terms": "^1.1.0", "@neo4j-antora/roles-labels": "^0.1.1", "@neo4j-antora/selector-labels": "^0.1.1", diff --git a/scripts/render_antora_docs.sh b/scripts/render_antora_docs.sh new file mode 100755 index 0000000..49dde81 --- /dev/null +++ b/scripts/render_antora_docs.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +set -o errexit +set -o nounset +set -o pipefail +set -o xtrace + +cd docs/antora +npm install +npm install @neo4j-antora/antora-page-roles --save +npm run start \ No newline at end of file diff --git a/scripts/render_docs.sh b/scripts/render_api_docs.sh similarity index 100% rename from scripts/render_docs.sh rename to scripts/render_api_docs.sh diff --git a/scripts/render_and_host_docs.sh b/scripts/render_host_api_docs.sh similarity index 100% rename from scripts/render_and_host_docs.sh rename to scripts/render_host_api_docs.sh From cacb7436c9841ec5694be9f878546d6573b28ee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florentin=20D=C3=B6rre?= Date: Mon, 5 Jan 2026 11:54:45 +0100 Subject: [PATCH 4/6] Fix GHA to use dependency-groups --- .github/workflows/code-style.yml | 2 +- .github/workflows/gds-integration-tests.yml | 2 +- .github/workflows/render-docs.yml | 2 +- .github/workflows/snowflake-integration-tests.yml | 2 +- .github/workflows/unit-tests.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/code-style.yml b/.github/workflows/code-style.yml index 8d4eed4..50260f8 100644 --- a/.github/workflows/code-style.yml +++ b/.github/workflows/code-style.yml @@ -33,7 +33,7 @@ jobs: python-version: "3.11" enable-cache: true - run: uv venv - - run: uv pip install ".[dev, pandas, gds, snowflake]" + - run: uv sync --group dev --extra pandas --extra gds --extra snowflake - name: Check code style run: source .venv/bin/activate && cd ${GITHUB_WORKSPACE} && ./scripts/checkstyle.sh diff --git a/.github/workflows/gds-integration-tests.yml b/.github/workflows/gds-integration-tests.yml index 2f901bf..21034a7 100644 --- a/.github/workflows/gds-integration-tests.yml +++ b/.github/workflows/gds-integration-tests.yml @@ -33,7 +33,7 @@ jobs: with: python-version: "3.11" enable-cache: true - - run: uv sync --extra dev --extra pandas --extra neo4j --extra gds --extra snowflake + - run: uv sync --group dev --extra pandas --extra neo4j --extra gds --extra snowflake - name: Run tests env: diff --git a/.github/workflows/render-docs.yml b/.github/workflows/render-docs.yml index 4bfa1de..3415b34 100644 --- a/.github/workflows/render-docs.yml +++ b/.github/workflows/render-docs.yml @@ -33,7 +33,7 @@ jobs: with: python-version: "3.11" enable-cache: true - - run: uv sync --extra dev --extra pandas --extra neo4j --extra gds --extra snowflake --extra docs + - run: uv sync --group dev --group docs --extra pandas --extra neo4j --extra gds --extra snowflake - name: Setup pandoc uses: pandoc/actions/setup@v1 diff --git a/.github/workflows/snowflake-integration-tests.yml b/.github/workflows/snowflake-integration-tests.yml index b28d644..7109096 100644 --- a/.github/workflows/snowflake-integration-tests.yml +++ b/.github/workflows/snowflake-integration-tests.yml @@ -34,7 +34,7 @@ jobs: with: python-version: "3.11" enable-cache: true - - run: uv sync --extra dev --extra pandas --extra snowflake + - run: uv sync --group dev --extra pandas --extra snowflake - name: Run tests env: diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 413ae06..8d7cc82 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -38,7 +38,7 @@ jobs: with: python-version: ${{ matrix.python-version }} enable-cache: true - - run: uv sync --extra dev --extra pandas --extra neo4j --extra gds --extra snowflake + - run: uv sync --group dev --extra pandas --extra neo4j --extra gds --extra snowflake - name: Run tests run: uv run pytest tests/ From 8d1f69e33da0a0d7bad140c9bb48596a25d8332f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florentin=20D=C3=B6rre?= Date: Mon, 5 Jan 2026 12:15:29 +0100 Subject: [PATCH 5/6] Remove antora-page-roles --- docs/antora/package.json | 1 - scripts/render_antora_docs.sh | 1 - 2 files changed, 2 deletions(-) diff --git a/docs/antora/package.json b/docs/antora/package.json index 6da376e..4a64a88 100644 --- a/docs/antora/package.json +++ b/docs/antora/package.json @@ -25,7 +25,6 @@ "dependencies": { "@neo4j-antora/aliases-redirects": "^0.2.5", "@neo4j-antora/antora-add-notes": "^0.3.2", - "@neo4j-antora/antora-page-roles": "^0.3.2", "@neo4j-antora/mark-terms": "^1.1.0", "@neo4j-antora/roles-labels": "^0.1.1", "@neo4j-antora/selector-labels": "^0.1.1", diff --git a/scripts/render_antora_docs.sh b/scripts/render_antora_docs.sh index 49dde81..0b0a3a4 100755 --- a/scripts/render_antora_docs.sh +++ b/scripts/render_antora_docs.sh @@ -6,5 +6,4 @@ set -o xtrace cd docs/antora npm install -npm install @neo4j-antora/antora-page-roles --save npm run start \ No newline at end of file From 2e7a6f7ab66c43c496dda1cb7cd7f684661aa6d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florentin=20D=C3=B6rre?= Date: Mon, 5 Jan 2026 12:15:51 +0100 Subject: [PATCH 6/6] Fix typing new pydantic version enforced properties to have a str field --- python-wrapper/src/neo4j_viz/pandas.py | 6 ++++++ scripts/makestyle.sh | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/python-wrapper/src/neo4j_viz/pandas.py b/python-wrapper/src/neo4j_viz/pandas.py index f7f01c0..50d19a9 100644 --- a/python-wrapper/src/neo4j_viz/pandas.py +++ b/python-wrapper/src/neo4j_viz/pandas.py @@ -69,6 +69,9 @@ def _parse_nodes(node_dfs: DFS_TYPE, dropna: bool = False) -> list[Node]: mandatory_fields = {} properties = {} for key, value in row.to_dict().items(): + if not isinstance(key, str): + key = str(key) + if key in basic_node_fields_aliases: mandatory_fields[key] = value else: @@ -98,6 +101,9 @@ def _parse_relationships(rel_dfs: DFS_TYPE, dropna: bool = False) -> list[Relati mandatory_fields = {} properties = {} for key, value in row.to_dict().items(): + if not isinstance(key, str): + key = str(key) + if key in basic_rel_field_aliases: mandatory_fields[key] = value else: diff --git a/scripts/makestyle.sh b/scripts/makestyle.sh index 4e8f5b6..0c4a757 100755 --- a/scripts/makestyle.sh +++ b/scripts/makestyle.sh @@ -15,4 +15,3 @@ if [ "${SKIP_NOTEBOOKS:-false}" == "true" ]; then fi python "${GIT_ROOT}/scripts/clean_notebooks.py" -i "${GIT_ROOT}/examples/" -o inplace -python "${GIT_ROOT}/scripts/clean_notebooks.py" -i "${GIT_ROOT}/docs/extra/" -o inplace