Skip to content

Commit c2ce320

Browse files
committed
chore(demo): strip non-deterministic notebook metadata
Remove per-cell execution.* timestamps and trim language_info down to {name: python}. Prevents diff noise from exact Python patch versions, UUIDs, and run timestamps on notebook re-execution.
1 parent d0b05df commit c2ce320

4 files changed

Lines changed: 205 additions & 486 deletions

File tree

demo/notebooks/00_seed_data.ipynb

Lines changed: 50 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "markdown",
5-
"id": "a1b2c3d4-0000-0000-0000-000000000001",
5+
"id": "0",
66
"metadata": {},
77
"source": [
88
"# Seed Demo Data\n",
@@ -12,33 +12,33 @@
1212
"Populates CoordiNode with a **tech industry knowledge graph**.\n",
1313
"\n",
1414
"> **Note:** When using `coordinode-embedded` (`LocalClient(\":memory:\")`), the seeded data\n",
15-
"> lives only inside this notebook process notebooks 01–03 will start with an empty graph.\n",
15+
"> lives only inside this notebook process \u2014 notebooks 01\u201303 will start with an empty graph.\n",
1616
"> To share the graph across notebooks, point all of them at the same running CoordiNode\n",
1717
"> server via `COORDINODE_ADDR`.\n",
1818
"\n",
1919
"**Graph contents:**\n",
2020
"- 10 people (engineers, researchers, founders)\n",
2121
"- 6 companies\n",
2222
"- 8 technologies / research areas\n",
23-
"- ~35 relationships (WORKS_AT, FOUNDED, KNOWS, RESEARCHES, INVENTED, ACQUIRED, USES, )\n",
23+
"- ~35 relationships (WORKS_AT, FOUNDED, KNOWS, RESEARCHES, INVENTED, ACQUIRED, USES, \u2026)\n",
2424
"\n",
2525
"All nodes carry a `demo=true` property and a `demo_tag` equal to the `DEMO_TAG` variable\n",
2626
"set in the seed cell. MERGE operations and cleanup are scoped to that tag, so only nodes\n",
2727
"with the matching `demo_tag` are written or removed.\n",
2828
"\n",
2929
"**Environments:**\n",
30-
"- **Google Colab** uses `coordinode-embedded` (in-process Rust engine, no server needed). First run compiles from source (~5 min); subsequent runs use the pip cache.\n",
31-
"- **Local / Docker Compose** connects to a running CoordiNode server via gRPC.\n",
30+
"- **Google Colab** \u2014 uses `coordinode-embedded` (in-process Rust engine, no server needed). First run compiles from source (~5 min); subsequent runs use the pip cache.\n",
31+
"- **Local / Docker Compose** \u2014 connects to a running CoordiNode server via gRPC.\n",
3232
"\n",
33-
"> **⚠️ Note for real-server use:** All writes and the cleanup step are scoped to `demo_tag`.\n",
33+
"> **\u26a0\ufe0f Note for real-server use:** All writes and the cleanup step are scoped to `demo_tag`.\n",
3434
"> Collisions can occur if multiple runs reuse the same `demo_tag` value or if `demo_tag` is\n",
3535
"> empty. Run against a fresh/empty database or choose a unique `demo_tag` to avoid affecting\n",
3636
"> unrelated nodes."
3737
]
3838
},
3939
{
4040
"cell_type": "markdown",
41-
"id": "a1b2c3d4-0000-0000-0000-000000000002",
41+
"id": "1",
4242
"metadata": {},
4343
"source": [
4444
"## Install dependencies"
@@ -47,28 +47,21 @@
4747
{
4848
"cell_type": "code",
4949
"execution_count": null,
50-
"id": "a1b2c3d4-0000-0000-0000-000000000003",
51-
"metadata": {
52-
"execution": {
53-
"iopub.execute_input": "2026-04-19T10:04:06.039243Z",
54-
"iopub.status.busy": "2026-04-19T10:04:06.039172Z",
55-
"iopub.status.idle": "2026-04-19T10:04:06.970761Z",
56-
"shell.execute_reply": "2026-04-19T10:04:06.970069Z"
57-
}
58-
},
50+
"id": "2",
51+
"metadata": {},
5952
"outputs": [],
6053
"source": [
6154
"import os, sys, subprocess\n",
6255
"\n",
6356
"IN_COLAB = \"google.colab\" in sys.modules\n",
6457
"\n",
6558
"# Install coordinode-embedded only when running in Colab AND no gRPC server is configured.\n",
66-
"# If COORDINODE_ADDR is set, a live server is already available skip the 5-min Rust build.\n",
59+
"# If COORDINODE_ADDR is set, a live server is already available \u2014 skip the 5-min Rust build.\n",
6760
"if IN_COLAB and not os.environ.get(\"COORDINODE_ADDR\"):\n",
6861
" # Install Rust toolchain via rustup (https://rustup.rs).\n",
69-
" # Colab's apt packages ship rustc ≤1.75, which cannot build coordinode-embedded\n",
70-
" # (requires Rust ≥1.80 for maturin/pyo3). apt-get is not a viable alternative here.\n",
71-
" # Download the installer to a temp file and execute it explicitly this avoids\n",
62+
" # Colab's apt packages ship rustc \u22641.75, which cannot build coordinode-embedded\n",
63+
" # (requires Rust \u22651.80 for maturin/pyo3). apt-get is not a viable alternative here.\n",
64+
" # Download the installer to a temp file and execute it explicitly \u2014 this avoids\n",
7265
" # piping remote content directly into a shell while maintaining HTTPS/TLS security\n",
7366
" # through Python's default ssl context (cert-verified, TLS 1.2+).\n",
7467
" # SHA256 pinning of rustup-init is intentionally omitted: rustup.rs does not\n",
@@ -81,7 +74,7 @@
8174
" # never runs when a live gRPC server is available, so there is no risk of\n",
8275
" # unintentional execution in local or server environments.\n",
8376
" # Security note: downloading rustup-init via HTTPS with cert verification and\n",
84-
" # executing from a temp file (not piped to shell) is by design this is the\n",
77+
" # executing from a temp file (not piped to shell) is by design \u2014 this is the\n",
8578
" # rustup project's own recommended install method for automated environments.\n",
8679
" import ssl as _ssl, tempfile as _tmp, urllib.request as _ur\n",
8780
"\n",
@@ -134,28 +127,21 @@
134127
},
135128
{
136129
"cell_type": "markdown",
137-
"id": "a1b2c3d4-0000-0000-0000-000000000004",
130+
"id": "3",
138131
"metadata": {},
139132
"source": [
140133
"## Connect to CoordiNode\n",
141134
"\n",
142-
"- **Colab**: uses `LocalClient(\":memory:\")` in-process embedded engine, no server required.\n",
135+
"- **Colab**: uses `LocalClient(\":memory:\")` \u2014 in-process embedded engine, no server required.\n",
143136
"- **Local with server**: connects to an existing CoordiNode on port 7080 (set `COORDINODE_ADDR` to override).\n",
144137
"- **Local without server**: falls back to `coordinode-embedded` if already installed (see [coordinode-embedded](https://github.com/structured-world/coordinode-python/tree/main/coordinode-embedded)); otherwise shows a `RuntimeError` with install instructions."
145138
]
146139
},
147140
{
148141
"cell_type": "code",
149142
"execution_count": null,
150-
"id": "a1b2c3d4-0000-0000-0000-000000000005",
151-
"metadata": {
152-
"execution": {
153-
"iopub.execute_input": "2026-04-19T10:04:06.972780Z",
154-
"iopub.status.busy": "2026-04-19T10:04:06.972654Z",
155-
"iopub.status.idle": "2026-04-19T10:04:07.012113Z",
156-
"shell.execute_reply": "2026-04-19T10:04:07.011321Z"
157-
}
158-
},
143+
"id": "4",
144+
"metadata": {},
159145
"outputs": [],
160146
"source": [
161147
"import os, socket\n",
@@ -192,14 +178,14 @@
192178
" raise RuntimeError(f\"Health check failed for {COORDINODE_ADDR}\")\n",
193179
" print(f\"Connected to {COORDINODE_ADDR}\")\n",
194180
" else:\n",
195-
" # No server available use the embedded in-process engine.\n",
181+
" # No server available \u2014 use the embedded in-process engine.\n",
196182
" try:\n",
197183
" from coordinode_embedded import LocalClient\n",
198184
" except ImportError as exc:\n",
199185
" raise RuntimeError(\n",
200186
" \"coordinode-embedded is not installed. \"\n",
201187
" \"Run: pip install git+https://github.com/structured-world/coordinode-python.git@8da94d694ecaabee6f8380147d02f08220061bfa#subdirectory=coordinode-embedded\"\n",
202-
" \" or start a CoordiNode server and set COORDINODE_ADDR.\"\n",
188+
" \" \u2014 or start a CoordiNode server and set COORDINODE_ADDR.\"\n",
203189
" ) from exc\n",
204190
"\n",
205191
" client = LocalClient(\":memory:\")\n",
@@ -208,24 +194,17 @@
208194
},
209195
{
210196
"cell_type": "markdown",
211-
"id": "a1b2c3d4-0000-0000-0000-000000000006",
197+
"id": "5",
212198
"metadata": {},
213199
"source": [
214-
"## Step 1 Clear previous demo data"
200+
"## Step 1 \u2014 Clear previous demo data"
215201
]
216202
},
217203
{
218204
"cell_type": "code",
219205
"execution_count": null,
220-
"id": "a1b2c3d4-0000-0000-0000-000000000007",
221-
"metadata": {
222-
"execution": {
223-
"iopub.execute_input": "2026-04-19T10:04:07.014105Z",
224-
"iopub.status.busy": "2026-04-19T10:04:07.013909Z",
225-
"iopub.status.idle": "2026-04-19T10:04:07.020088Z",
226-
"shell.execute_reply": "2026-04-19T10:04:07.019603Z"
227-
}
228-
},
206+
"id": "6",
207+
"metadata": {},
229208
"outputs": [],
230209
"source": [
231210
"import uuid\n",
@@ -234,7 +213,7 @@
234213
"print(\"Using DEMO_TAG:\", DEMO_TAG)\n",
235214
"# Remove prior demo nodes and any attached relationships in one step to avoid\n",
236215
"# duplicate relationship matches during cleanup (undirected MATCH -[r]-() returns\n",
237-
"# each edge twice once per endpoint causing duplicate-delete errors).\n",
216+
"# each edge twice \u2014 once per endpoint \u2014 causing duplicate-delete errors).\n",
238217
"client.cypher(\n",
239218
" \"MATCH (n {demo: true, demo_tag: $tag}) DETACH DELETE n\",\n",
240219
" params={\"tag\": DEMO_TAG},\n",
@@ -244,33 +223,26 @@
244223
},
245224
{
246225
"cell_type": "markdown",
247-
"id": "a1b2c3d4-0000-0000-0000-000000000008",
226+
"id": "7",
248227
"metadata": {},
249228
"source": [
250-
"## Step 2 Create nodes"
229+
"## Step 2 \u2014 Create nodes"
251230
]
252231
},
253232
{
254233
"cell_type": "code",
255234
"execution_count": null,
256-
"id": "a1b2c3d4-0000-0000-0000-000000000009",
257-
"metadata": {
258-
"execution": {
259-
"iopub.execute_input": "2026-04-19T10:04:07.021785Z",
260-
"iopub.status.busy": "2026-04-19T10:04:07.021661Z",
261-
"iopub.status.idle": "2026-04-19T10:04:07.057106Z",
262-
"shell.execute_reply": "2026-04-19T10:04:07.056653Z"
263-
}
264-
},
235+
"id": "8",
236+
"metadata": {},
265237
"outputs": [],
266238
"source": [
267-
"# ── People ────────────────────────────────────────────────────────────────\n",
239+
"# \u2500\u2500 People \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n",
268240
"people = [\n",
269241
" {\"name\": \"Alice Chen\", \"role\": \"ML Researcher\", \"org\": \"DeepMind\", \"field\": \"Reinforcement Learning\"},\n",
270242
" {\"name\": \"Bob Torres\", \"role\": \"Staff Engineer\", \"org\": \"Google\", \"field\": \"Distributed Systems\"},\n",
271243
" {\"name\": \"Carol Smith\", \"role\": \"Founder & CEO\", \"org\": \"Synthex\", \"field\": \"NLP\"},\n",
272244
" {\"name\": \"David Park\", \"role\": \"Research Scientist\", \"org\": \"OpenAI\", \"field\": \"LLMs\"},\n",
273-
" {\"name\": \"Eva Müller\", \"role\": \"Systems Architect\", \"org\": \"Synthex\", \"field\": \"Graph Databases\"},\n",
245+
" {\"name\": \"Eva M\u00fcller\", \"role\": \"Systems Architect\", \"org\": \"Synthex\", \"field\": \"Graph Databases\"},\n",
274246
" {\"name\": \"Frank Liu\", \"role\": \"Principal Engineer\", \"org\": \"Meta\", \"field\": \"Graph ML\"},\n",
275247
" {\"name\": \"Grace Okafor\", \"role\": \"PhD Researcher\", \"org\": \"MIT\", \"field\": \"Knowledge Graphs\"},\n",
276248
" {\"name\": \"Henry Rossi\", \"role\": \"CTO\", \"org\": \"Synthex\", \"field\": \"Databases\"},\n",
@@ -287,7 +259,7 @@
287259
"\n",
288260
"print(f\"Created {len(people)} people\")\n",
289261
"\n",
290-
"# ── Companies ─────────────────────────────────────────────────────────────\n",
262+
"# \u2500\u2500 Companies \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n",
291263
"companies = [\n",
292264
" {\"name\": \"Google\", \"industry\": \"Technology\", \"founded\": 1998, \"hq\": \"Mountain View\"},\n",
293265
" {\"name\": \"Meta\", \"industry\": \"Technology\", \"founded\": 2004, \"hq\": \"Menlo Park\"},\n",
@@ -305,7 +277,7 @@
305277
"\n",
306278
"print(f\"Created {len(companies)} companies\")\n",
307279
"\n",
308-
"# ── Technologies ──────────────────────────────────────────────────────────\n",
280+
"# \u2500\u2500 Technologies \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n",
309281
"technologies = [\n",
310282
" {\"name\": \"Transformer\", \"type\": \"Architecture\", \"year\": 2017},\n",
311283
" {\"name\": \"Graph Neural Network\", \"type\": \"Algorithm\", \"year\": 2009},\n",
@@ -328,24 +300,17 @@
328300
},
329301
{
330302
"cell_type": "markdown",
331-
"id": "a1b2c3d4-0000-0000-0000-000000000010",
303+
"id": "9",
332304
"metadata": {},
333305
"source": [
334-
"## Step 3 Create relationships"
306+
"## Step 3 \u2014 Create relationships"
335307
]
336308
},
337309
{
338310
"cell_type": "code",
339311
"execution_count": null,
340-
"id": "a1b2c3d4-0000-0000-0000-000000000011",
341-
"metadata": {
342-
"execution": {
343-
"iopub.execute_input": "2026-04-19T10:04:07.058969Z",
344-
"iopub.status.busy": "2026-04-19T10:04:07.058874Z",
345-
"iopub.status.idle": "2026-04-19T10:04:07.100906Z",
346-
"shell.execute_reply": "2026-04-19T10:04:07.100443Z"
347-
}
348-
},
312+
"id": "10",
313+
"metadata": {},
349314
"outputs": [],
350315
"source": [
351316
"edges = [\n",
@@ -354,7 +319,7 @@
354319
" (\"Bob Torres\", \"WORKS_AT\", \"Google\", {}),\n",
355320
" (\"Carol Smith\", \"WORKS_AT\", \"Synthex\", {\"since\": 2021}),\n",
356321
" (\"David Park\", \"WORKS_AT\", \"OpenAI\", {}),\n",
357-
" (\"Eva Müller\", \"WORKS_AT\", \"Synthex\", {\"since\": 2022}),\n",
322+
" (\"Eva M\u00fcller\", \"WORKS_AT\", \"Synthex\", {\"since\": 2022}),\n",
358323
" (\"Frank Liu\", \"WORKS_AT\", \"Meta\", {}),\n",
359324
" (\"Grace Okafor\", \"WORKS_AT\", \"MIT\", {}),\n",
360325
" (\"Henry Rossi\", \"WORKS_AT\", \"Synthex\", {\"since\": 2021}),\n",
@@ -369,7 +334,7 @@
369334
" (\"Carol Smith\", \"KNOWS\", \"Bob Torres\", {}),\n",
370335
" (\"Grace Okafor\", \"KNOWS\", \"Alice Chen\", {}),\n",
371336
" (\"Frank Liu\", \"KNOWS\", \"James Wright\", {}),\n",
372-
" (\"Eva Müller\", \"KNOWS\", \"Grace Okafor\", {}),\n",
337+
" (\"Eva M\u00fcller\", \"KNOWS\", \"Grace Okafor\", {}),\n",
373338
" # RESEARCHES / WORKS_ON\n",
374339
" (\"Alice Chen\", \"RESEARCHES\", \"Reinforcement Learning\", {\"since\": 2019}),\n",
375340
" (\"David Park\", \"RESEARCHES\", \"LLM\", {\"since\": 2020}),\n",
@@ -424,24 +389,17 @@
424389
},
425390
{
426391
"cell_type": "markdown",
427-
"id": "a1b2c3d4-0000-0000-0000-000000000012",
392+
"id": "11",
428393
"metadata": {},
429394
"source": [
430-
"## Step 4 Verify"
395+
"## Step 4 \u2014 Verify"
431396
]
432397
},
433398
{
434399
"cell_type": "code",
435400
"execution_count": null,
436-
"id": "a1b2c3d4-0000-0000-0000-000000000013",
437-
"metadata": {
438-
"execution": {
439-
"iopub.execute_input": "2026-04-19T10:04:07.102456Z",
440-
"iopub.status.busy": "2026-04-19T10:04:07.102333Z",
441-
"iopub.status.idle": "2026-04-19T10:04:07.110337Z",
442-
"shell.execute_reply": "2026-04-19T10:04:07.109926Z"
443-
}
444-
},
401+
"id": "12",
402+
"metadata": {},
445403
"outputs": [],
446404
"source": [
447405
"from collections import Counter\n",
@@ -468,15 +426,8 @@
468426
{
469427
"cell_type": "code",
470428
"execution_count": null,
471-
"id": "a1b2c3d4-0000-0000-0000-000000000014",
472-
"metadata": {
473-
"execution": {
474-
"iopub.execute_input": "2026-04-19T10:04:07.112104Z",
475-
"iopub.status.busy": "2026-04-19T10:04:07.111970Z",
476-
"iopub.status.idle": "2026-04-19T10:04:07.118744Z",
477-
"shell.execute_reply": "2026-04-19T10:04:07.118356Z"
478-
}
479-
},
429+
"id": "13",
430+
"metadata": {},
480431
"outputs": [],
481432
"source": [
482433
"print(\"=== Who works at Synthex? ===\")\n",
@@ -486,7 +437,7 @@
486437
" params={\"co\": \"Synthex\", \"tag\": DEMO_TAG},\n",
487438
")\n",
488439
"for r in rows:\n",
489-
" print(f\" {r['name']} {r['role']}\")\n",
440+
" print(f\" {r['name']} \u2014 {r['role']}\")\n",
490441
"\n",
491442
"print(\"\\n=== What does Synthex use? ===\")\n",
492443
"rows = client.cypher(\n",
@@ -502,10 +453,10 @@
502453
" params={\"tech\": \"GraphRAG\", \"tag\": DEMO_TAG},\n",
503454
")\n",
504455
"for r in rows:\n",
505-
" print(f\" {r['dependency']}\")\n",
456+
" print(f\" \u2192 {r['dependency']}\")\n",
506457
"\n",
507-
"print(\"\\n Demo data seeded.\")\n",
508-
"print(\"To query it from notebooks 01–03, connect them to the same CoordiNode server (COORDINODE_ADDR).\")\n",
458+
"print(\"\\n\u2713 Demo data seeded.\")\n",
459+
"print(\"To query it from notebooks 01\u201303, connect them to the same CoordiNode server (COORDINODE_ADDR).\")\n",
509460
"client.close()"
510461
]
511462
}
@@ -517,16 +468,7 @@
517468
"name": "python3"
518469
},
519470
"language_info": {
520-
"codemirror_mode": {
521-
"name": "ipython",
522-
"version": 3
523-
},
524-
"file_extension": ".py",
525-
"mimetype": "text/x-python",
526-
"name": "python",
527-
"nbconvert_exporter": "python",
528-
"pygments_lexer": "ipython3",
529-
"version": "3.11.9"
471+
"name": "python"
530472
}
531473
},
532474
"nbformat": 4,

0 commit comments

Comments
 (0)