Skip to content

Commit 6dfb99a

Browse files
committed
Make internal method private
1 parent 4ce85f6 commit 6dfb99a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/neo4j_graphrag/experimental/pipeline/pipeline.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,15 +201,15 @@ def draw(
201201
self, path: str, layout: str = "dot", hide_unused_outputs: bool = True
202202
) -> Any:
203203
"""Render the pipeline graph to an HTML file at the specified path"""
204-
G = self.get_neo4j_viz_graph(hide_unused_outputs)
204+
G = self._get_neo4j_viz_graph(hide_unused_outputs)
205205

206206
# Write the visualization to an HTML file
207207
with open(path, "w") as f:
208208
f.write(G.render().data)
209209

210210
return G
211211

212-
def get_neo4j_viz_graph(
212+
def _get_neo4j_viz_graph(
213213
self, hide_unused_outputs: bool = True
214214
) -> VisualizationGraph:
215215
"""Generate a neo4j-viz visualization of the pipeline graph"""
@@ -321,11 +321,11 @@ def get_pygraphviz_graph(self, hide_unused_outputs: bool = True) -> Any:
321321
Uses neo4j-viz instead of pygraphviz.
322322
"""
323323
warnings.warn(
324-
"get_pygraphviz_graph is deprecated, use get_neo4j_viz_graph instead",
324+
"get_pygraphviz_graph is deprecated, use draw instead",
325325
DeprecationWarning,
326326
stacklevel=2,
327327
)
328-
return self.get_neo4j_viz_graph(hide_unused_outputs)
328+
return self._get_neo4j_viz_graph(hide_unused_outputs)
329329

330330
def add_component(self, component: Component, name: str) -> None:
331331
"""Add a new component. Components are uniquely identified

tests/unit/experimental/pipeline/test_pipeline.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,12 +387,12 @@ def test_pipeline_to_viz() -> None:
387387
pipe.add_component(component_a, "a")
388388
pipe.add_component(component_b, "b")
389389
pipe.connect("a", "b", {"number1": "a.result"})
390-
g = pipe.get_neo4j_viz_graph()
390+
g = pipe._get_neo4j_viz_graph()
391391
# 3 nodes:
392392
# - 2 components 'a' and 'b'
393393
# - 1 output 'a.result'
394394
assert len(g.nodes) == 3
395-
g = pipe.get_neo4j_viz_graph(hide_unused_outputs=False)
395+
g = pipe._get_neo4j_viz_graph(hide_unused_outputs=False)
396396
# 4 nodes:
397397
# - 2 components 'a' and 'b'
398398
# - 2 output 'a.result' and 'b.result'

0 commit comments

Comments
 (0)