Skip to content

Commit e2b6696

Browse files
committed
Add skeleton of 08_reach.ipynb notebook
Also added to table of contents in 'index.ipynb' and 'README.md'. Generate `reachability.py` consisting only of imports.
1 parent 8d2b236 commit e2b6696

File tree

5 files changed

+103
-2
lines changed

5 files changed

+103
-2
lines changed

08_reach.ipynb

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"metadata": {},
7+
"outputs": [],
8+
"source": [
9+
"#default_exp reachability"
10+
]
11+
},
12+
{
13+
"cell_type": "code",
14+
"execution_count": null,
15+
"metadata": {},
16+
"outputs": [],
17+
"source": [
18+
"#hide_output\n",
19+
"%load_ext autoreload\n",
20+
"%autoreload 2"
21+
]
22+
},
23+
{
24+
"cell_type": "markdown",
25+
"metadata": {},
26+
"source": [
27+
"# Reachability queries\n",
28+
"> Finding if one vertex in DAG is reachable from another, with the help of various rechability indexes (labels)"
29+
]
30+
},
31+
{
32+
"cell_type": "markdown",
33+
"metadata": {},
34+
"source": [
35+
"Imports for the `git_commit_graph_ext.reachability` module generated from this notebook"
36+
]
37+
},
38+
{
39+
"cell_type": "code",
40+
"execution_count": null,
41+
"metadata": {},
42+
"outputs": [],
43+
"source": [
44+
"#export\n",
45+
"import networkx as nx"
46+
]
47+
},
48+
{
49+
"cell_type": "markdown",
50+
"metadata": {},
51+
"source": [
52+
"----"
53+
]
54+
},
55+
{
56+
"cell_type": "code",
57+
"execution_count": null,
58+
"metadata": {},
59+
"outputs": [
60+
{
61+
"name": "stdout",
62+
"output_type": "stream",
63+
"text": [
64+
"Converted 01_tools.ipynb.\n",
65+
"Converted 02_related.ipynb.\n",
66+
"Converted 03_example_graphs.ipynb.\n",
67+
"Converted 05_reachability_index.ipynb.\n",
68+
"Converted 06_levels.ipynb.\n",
69+
"Converted 07_interval_labels.ipynb.\n",
70+
"Converted 08_reach.ipynb.\n",
71+
"Converted index.ipynb.\n"
72+
]
73+
}
74+
],
75+
"source": [
76+
"#hide\n",
77+
"# this should be the last cell of the notebook\n",
78+
"from nbdev.export import notebook2script\n",
79+
"notebook2script()"
80+
]
81+
}
82+
],
83+
"metadata": {
84+
"kernelspec": {
85+
"display_name": "Python 3",
86+
"language": "python",
87+
"name": "python3"
88+
}
89+
},
90+
"nbformat": 4,
91+
"nbformat_minor": 4
92+
}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ Only the first command performs straight reachability query.
5555
5. [Reachability index](05_reachability_index.ipynb)
5656
6. [Topological levels](06_levels.ipynb)
5757
7. [DFS intervals labelling](07_interval_labels.ipynb)
58+
8. [Reachability queries](08_reach.ipynb)
5859

5960
## Slides
6061

git_commit_graph_ext/_nbdev.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414

1515
modules = ["example_graphs.py",
1616
"labelling/levels.py",
17-
"labelling/dfs_intervals.py"]
17+
"labelling/dfs_intervals.py",
18+
"reachability.py"]
1819

1920
doc_url = "https://jnareb.github.io/git-commit-graph-ext/"
2021

git_commit_graph_ext/reachability.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# AUTOGENERATED! DO NOT EDIT! File to edit: 08_reach.ipynb (unless otherwise specified).
2+
3+
__all__ = []
4+
5+
# Cell
6+
import networkx as nx

index.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@
106106
"4. Drawing graphs\n",
107107
"5. [Reachability index](05_reachability_index.ipynb)\n",
108108
"6. [Topological levels](06_levels.ipynb)\n",
109-
"7. [DFS intervals labelling](07_interval_labels.ipynb)"
109+
"7. [DFS intervals labelling](07_interval_labels.ipynb)\n",
110+
"8. [Reachability queries](08_reach.ipynb)"
110111
]
111112
},
112113
{

0 commit comments

Comments
 (0)