File: report_functions_without_rst_generated.py

package info (click to toggle)
python-networkx 2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 7,128 kB
  • sloc: python: 65,077; makefile: 155
file content (33 lines) | stat: -rw-r--r-- 991 bytes parent folder | download
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
31
32
33
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 = "find . -name *\."+n+".rst -print"
    #print(cmd)
    result=os.popen(cmd).read()
    #print(result)

    old_names = ('find_cores',
                 'test',
                 'edge_betweenness',
                 'betweenness_centrality_source',
                 'write_graphml_lxml',
                 'write_graphml_xml',
                 'adj_matrix',
                 '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")