1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
import os
import inspect
import networkx as nx
print("Run this script from the doc/ directory of the repository")
funcs = inspect.getmembers(nx, inspect.isfunction)
for n, f in funcs:
# print(n + ": "+str(f))
cmd = r"find . -name *\." + n + ".rst -print"
# print(cmd)
result = os.popen(cmd).read()
# print(result)
old_names = (
"test",
"write_graphml_lxml",
"write_graphml_xml",
"project",
"fruchterman_reingold_layout",
"node_degree_xy",
"node_attribute_xy",
"find_cliques_recursive",
"recursive_simple_cycles",
)
if len(result) == 0 and n not in old_names:
print("Missing file from docs: ", n)
print("Done finding functions that are missing from the docs")
|