Skip to content

Commit dadb444

Browse files
committed
fix(sentinel-graph): repair docs build + typecheck
- Add empty 'outputs' and 'execution_count' to two code cells in sentinel_graph_examples.ipynb (cells 7 and 9). nbformat 4 requires both keys on every code cell; nbsphinx errored with AttributeError: outputs during RTD's sphinx-build, killing the docs build after the pytz import was resolved upstream. - Add azure.core.* and azure.identity to mypy.ini ignore_missing_imports. Mirrors the existing azure.kusto.* entry. Without these, mypy 1.20 flags the 'azure.core.credentials' and 'azure.identity' imports in sentinel_graph.py / sentinel_graph_types.py as missing stubs, failing python-lint-types CI on every Python version. Verified locally: ruff/mypy/pytest all green; nbformat.validate passes; 'import graphistry' loads cleanly.
1 parent d675e6b commit dadb444

2 files changed

Lines changed: 18 additions & 8 deletions

File tree

demos/demos_databases_apis/microsoft/sentinel/sentinel_graph_examples.ipynb

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,17 @@
5353
" # personal_key_secret='YOUR_KEY_SECRET'\n",
5454
")\n",
5555
"\n",
56-
"print(\" Graphistry configured\")"
56+
"print(\"\u2713 Graphistry configured\")"
5757
]
5858
},
5959
{
6060
"cell_type": "markdown",
6161
"metadata": {},
62-
"source": "## Discover Available Graph Instances\n\nUse `sentinel_graph_list()` to see what graph instances are available in your tenant. You only need a placeholder `graph_instance` for this call the value is not used by the list endpoint."
62+
"source": "## Discover Available Graph Instances\n\nUse `sentinel_graph_list()` to see what graph instances are available in your tenant. You only need a placeholder `graph_instance` for this call \u2014 the value is not used by the list endpoint."
6363
},
6464
{
6565
"cell_type": "code",
66-
"source": "g = graphistry.configure_sentinel_graph(\n graph_instance=graph_instance_name,\n credential=credential,\n response_formats=[\"Graph\"] # default; use [\"Table\", \"Graph\"] to also get raw tabular data\n)\n\nprint(f\" Sentinel Graph configured for instance: {graph_instance_name}\")",
66+
"source": "g = graphistry.configure_sentinel_graph(\n graph_instance=graph_instance_name,\n credential=credential,\n response_formats=[\"Graph\"] # default; use [\"Table\", \"Graph\"] to also get raw tabular data\n)\n\nprint(f\"\u2713 Sentinel Graph configured for instance: {graph_instance_name}\")",
6767
"metadata": {},
6868
"execution_count": null,
6969
"outputs": []
@@ -83,13 +83,15 @@
8383
" credential=credential\n",
8484
")\n",
8585
"\n",
86-
"print(\" Sentinel Graph configured\")"
86+
"print(\"\u2713 Sentinel Graph configured\")"
8787
]
8888
},
8989
{
9090
"cell_type": "code",
9191
"metadata": {},
92-
"source": "query = \"\"\"\nMATCH (n)-[e]->(m)\nRETURN *\nLIMIT 50\n\"\"\"\n\nviz = g.sentinel_graph(query)\nprint(f\"Query returned {len(viz._nodes)} nodes and {len(viz._edges)} edges\")\n\nviz.plot()"
92+
"source": "query = \"\"\"\nMATCH (n)-[e]->(m)\nRETURN *\nLIMIT 50\n\"\"\"\n\nviz = g.sentinel_graph(query)\nprint(f\"Query returned {len(viz._nodes)} nodes and {len(viz._edges)} edges\")\n\nviz.plot()",
93+
"outputs": [],
94+
"execution_count": null
9395
},
9496
{
9597
"cell_type": "code",
@@ -113,7 +115,9 @@
113115
{
114116
"cell_type": "code",
115117
"metadata": {},
116-
"source": "print(\"=\" * 80)\nprint(\"NODES\")\nprint(\"=\" * 80)\nprint(f\"Shape: {viz._nodes.shape}\")\nprint(f\"Columns: {list(viz._nodes.columns)}\")\nprint(\"\\nSample nodes:\")\ndisplay(viz._nodes.head(3))\n\nprint(\"\\n\" + \"=\" * 80)\nprint(\"EDGES\")\nprint(\"=\" * 80)\nprint(f\"Shape: {viz._edges.shape}\")\nprint(f\"Columns: {list(viz._edges.columns)}\")\nprint(\"\\nSample edges:\")\ndisplay(viz._edges.head(3))"
118+
"source": "print(\"=\" * 80)\nprint(\"NODES\")\nprint(\"=\" * 80)\nprint(f\"Shape: {viz._nodes.shape}\")\nprint(f\"Columns: {list(viz._nodes.columns)}\")\nprint(\"\\nSample nodes:\")\ndisplay(viz._nodes.head(3))\n\nprint(\"\\n\" + \"=\" * 80)\nprint(\"EDGES\")\nprint(\"=\" * 80)\nprint(f\"Shape: {viz._edges.shape}\")\nprint(f\"Columns: {list(viz._edges.columns)}\")\nprint(\"\\nSample edges:\")\ndisplay(viz._edges.head(3))",
119+
"outputs": [],
120+
"execution_count": null
117121
},
118122
{
119123
"cell_type": "code",
@@ -301,7 +305,7 @@
301305
"outputs": [],
302306
"source": [
303307
"g.sentinel_graph_close()\n",
304-
"print(\" Sentinel Graph connection closed\")"
308+
"print(\"\u2713 Sentinel Graph connection closed\")"
305309
]
306310
}
307311
],
@@ -326,4 +330,4 @@
326330
},
327331
"nbformat": 4,
328332
"nbformat_minor": 4
329-
}
333+
}

mypy.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,12 @@ ignore_missing_imports = True
115115
[mypy-azure.kusto.*]
116116
ignore_missing_imports = True
117117

118+
[mypy-azure.core.*]
119+
ignore_missing_imports = True
120+
121+
[mypy-azure.identity]
122+
ignore_missing_imports = True
123+
118124
[mypy-requests.*]
119125
ignore_missing_imports = True
120126

0 commit comments

Comments
 (0)