Skip to content

Commit 7c6ff4a

Browse files
authored
Merge pull request #230 from neo4j/fix-docs-render
fix docs render
2 parents 566450a + 959e7d2 commit 7c6ff4a

File tree

4 files changed

+21
-8
lines changed

4 files changed

+21
-8
lines changed

.github/workflows/render-docs.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ name: Render docs
44
on:
55
# Triggers the workflow on push or pull request events but only for the "main" branch
66
push:
7-
branches: [ "main" ]
7+
branches: ["main"]
88
pull_request:
99
paths:
1010
- "python-wrapper/**" # python code
1111
- "docs/**" # documentation
12-
branches: [ "main" ]
12+
branches: ["main"]
1313

1414
# Allows you to run this workflow manually from the Actions tab
1515
workflow_dispatch:
@@ -26,10 +26,10 @@ jobs:
2626

2727
- uses: actions/setup-python@v5
2828
with:
29-
python-version: '3.11'
30-
cache: 'pip'
29+
python-version: "3.11"
30+
cache: "pip"
3131
cache-dependency-path: pyproject.toml
32-
- run: pip install "python-wrapper/[dev, pandas, gds, docs]"
32+
- run: pip install "python-wrapper/[dev, pandas, gds, snowflake, docs]"
3333

3434
- name: Setup pandoc
3535
uses: pandoc/actions/setup@v1

docs/source/api-reference/render_options.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44
.. autoenum:: neo4j_viz.Layout
55
:members:
66

7-
.. autoclass:: neo4j_viz.Force-Directed
7+
.. autoclass:: neo4j_viz.ForceDirectedLayoutOptions
88
:members:
99
:exclude-members: model_config
1010

1111
.. autoclass:: neo4j_viz.HierarchicalLayoutOptions
1212
:members:
1313
:exclude-members: model_config
1414

15-
.. autoenum:: neo4j_viz.options.Direction
15+
.. autoenum:: neo4j_viz.Direction
1616
:members:
1717

18-
.. autoenum:: neo4j_viz.options.Packing
18+
.. autoenum:: neo4j_viz.Packing
1919
:members:
2020

2121
.. autoenum:: neo4j_viz.Renderer

python-wrapper/src/neo4j_viz/options.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ class CaptionAlignment(str, Enum):
2222
@enum_tools.documentation.document_enum
2323
class Layout(str, Enum):
2424
FORCE_DIRECTED = "forcedirected"
25+
"""
26+
The force-directed layout uses a physics simulation to position the nodes.
27+
"""
2528
HIERARCHICAL = "hierarchical"
2629
"""
2730
The nodes are then arranged by the directionality of their relationships

python-wrapper/src/neo4j_viz/snowflake.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,16 @@ def from_snowflake(
314314
project_config: dict[str, Any],
315315
node_radius_min_max: Optional[tuple[float, float]] = (3, 60),
316316
) -> VisualizationGraph:
317+
"""
318+
Create a VisualizationGraph from Snowflake tables based on a project configuration.
319+
320+
Args:
321+
session (Session): The Snowflake session to use for querying the tables.
322+
project_config (dict[str, Any]): The project configuration dictionary defining node and relationship tables.
323+
node_radius_min_max (Optional[tuple[float, float]], optional): Tuple defining the min and max radius for nodes. Defaults to (3, 60).
324+
Returns:
325+
VisualizationGraph: The constructed visualization graph.
326+
"""
317327
project_model = VizProjectConfig.model_validate(project_config, strict=False, context={"session": session})
318328
node_dfs, rel_dfs, rel_table_names = _map_tables(session, project_model)
319329

0 commit comments

Comments
 (0)