Skip to content

Commit 3a81044

Browse files
committed
fix(tests,langchain,demo): namespace FtsFuzzyTest, pass params to cypher, clarify README
Namespace FtsFuzzyTest label with uid() suffix for isolation parity with the other two FTS tests (FtsTest_ and FtsHybridTest_ already namespaced). Pass explicit empty params dict {} to the cypher() call in refresh_schema() so injected clients without a default params argument don't raise TypeError. Explicitly name demo/docker-compose.yml in demo/README.md so the file is unambiguous in PR review context (only README was new in this PR; the compose file was pre-existing and not visible in the diff). Also add missing "cd demo/" to the OpenAI code block to ensure the correct compose file is targeted.
1 parent a4579b9 commit 3a81044

3 files changed

Lines changed: 9 additions & 4 deletions

File tree

demo/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Interactive notebooks for LlamaIndex, LangChain, and LangGraph integrations.
1616
1717
## Run locally (Docker Compose)
1818

19+
`demo/docker-compose.yml` provides a CoordiNode + Jupyter Lab stack:
20+
1921
```bash
2022
cd demo/
2123
docker compose up -d --build
@@ -34,5 +36,6 @@ Notebooks 02 and 03 have optional sections that use `OPENAI_API_KEY`.
3436
They auto-skip when the key is absent — all core features work without LLM.
3537

3638
```bash
39+
cd demo/
3740
OPENAI_API_KEY=sk-... docker compose up -d
3841
```

langchain-coordinode/langchain_coordinode/graph.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ def refresh_schema(self) -> None:
153153
# Note: can simplify to labels(a)[0] once subscript-on-function support lands in the
154154
# published Docker image (tracked in G010 / GAPS.md).
155155
rows = self._client.cypher(
156-
"MATCH (a)-[r]->(b) RETURN DISTINCT labels(a) AS src_labels, type(r) AS rel, labels(b) AS dst_labels"
156+
"MATCH (a)-[r]->(b) RETURN DISTINCT labels(a) AS src_labels, type(r) AS rel, labels(b) AS dst_labels",
157+
{},
157158
)
158159
if rows:
159160
triples: set[tuple[str, str, str]] = set()

tests/integration/test_sdk.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -626,19 +626,20 @@ def test_text_search_empty_for_unindexed_label(client):
626626
@_fts
627627
def test_text_search_fuzzy(client):
628628
"""text_search() with fuzzy=True matches approximate terms."""
629+
label = f"FtsFuzzyTest_{uid()}"
629630
tag = uid()
630631
client.cypher(
631-
"CREATE (n:FtsFuzzyTest {tag: $tag, body: 'coordinode graph database'})",
632+
f"CREATE (n:{label} {{tag: $tag, body: 'coordinode graph database'}})",
632633
params={"tag": tag},
633634
)
634635
try:
635636
# "coordinode" with a typo — fuzzy should still match
636-
results = client.text_search("FtsFuzzyTest", "coordinod", fuzzy=True, limit=5)
637+
results = client.text_search(label, "coordinod", fuzzy=True, limit=5)
637638
assert isinstance(results, list)
638639
# May return 0 results if fuzzy is not yet supported or index is cold;
639640
# just verify the call does not raise.
640641
finally:
641-
client.cypher("MATCH (n:FtsFuzzyTest {tag: $tag}) DELETE n", params={"tag": tag})
642+
client.cypher(f"MATCH (n:{label} {{tag: $tag}}) DELETE n", params={"tag": tag})
642643

643644

644645
@_fts

0 commit comments

Comments
 (0)