File: report_functions_without_rst_generated.py

package info (click to toggle)
networkx 3.4.2-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 11,700 kB
  • sloc: python: 105,310; xml: 544; makefile: 131; javascript: 120; sh: 34
file content (30 lines) | stat: -rw-r--r-- 777 bytes parent folder | download | duplicates (3)
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")