In [1]:
from collections import defaultdict, OrderedDict
import copy
import inspect
import json
import pysal as package
from ast import literal_eval

import docutils
from docutils.core import publish_doctree
import xml.etree.ElementTree as etree
package.version


Out[1]:
'1.10.0-dev'

In [2]:
def getFromDict(dataDict, mapList):
    return reduce(lambda d, k: d[k], mapList, dataDict)

def setInDict(dataDict, mapList, value):
    d = dataDict
    for k in mapList[:-1]:
        if not k in d.keys():
            d[k] = {}
        d = d[k]
    getFromDict(dataDict, mapList[:-1])[mapList[-1]] = value
    
def recursive_extract(package, d, packagename, visited):
    sub_modules = inspect.getmembers(package, inspect.ismodule)
    functions = inspect.getmembers(package, inspect.isfunction)
    classes = inspect.getmembers(package, inspect.isclass)

    for classname, classobj in classes:
        modulepath = classobj.__module__.split('.')
        modulepath.append(classobj.__name__)
        if modulepath[0] in packagename:
            if classobj.__name__.startswith('_'):
                continue
            setInDict(d, modulepath[1:], classobj)
    
    for funcname, funcobj in functions:
        modulepath = funcobj.__module__.split('.')
        modulepath.append(funcobj.__name__)
        if modulepath[0] in packagename:
            if funcobj.__name__.startswith('_'):
                continue
            setInDict(d, modulepath[1:], funcobj)
    
    for modulename, submodule in sub_modules:
        modulepath = submodule.__name__.split('.')
        if modulepath[0] in packagename and submodule not in visited:
            visited.add(submodule)
            recursive_extract(submodule, d, packagename, visited)

In [3]:
psfuncs = {}
visited = set()
recursive_extract(package, psfuncs, package.__name__, visited)

In [10]:
sphinxmapper = {'term':'name',
                'classifier':'type',
                'paragraph':'description', 
                'definition':'name'}

def recursive_documentation(d):
    for k, v in d.iteritems():
        if isinstance(v, dict):
            recursive_documentation(v)
        else:
            d[k] = generate_docs(v)
                #if d[k] is None:
                    #print 'No documentation for {}'.format(k)
            #except:
                #d[k] = {'status':'error', 'description': 'Unable to generate documentation.' }
                #print 'Failed to extract: ', k
            
def getargorder(call):
    """
    Get the order of required args from a function.
    Does not support *args currently.
    """
    try:
        argorder = inspect.getargspec(call)[0]
    except:
        argorder = inspect.getargspec(call.__init__)[0][1:]  #ignore self
    return argorder


def generate_docs(v):
    docs = inspect.getdoc(v)
    if docs is None:
        print "{} ERROR: No documentation.".format(v.__name__)
        return None

    response_template = {'status':'success',
                'arguments':{'optional_arguments':{},
                'required_arguments':{}},
                'description':None,
                'doc_href':None,
                'methods':['GET', 'POST'],
                'name':v.__name__,
                'response':{}}
    
    if not inspect.isclass(v):
        reqargs = inspect.getargspec(v)
        classtype = False
    elif inspect.isclass(v):
        '''
        I believe this has to be a try/except, because an if based hasattr(v, __init__)
        will fail because the object dict can have an __init__, but inspect does what
        we want it to and looks to the class that instantiates the object.  That class may
        not have an __init__ or the __init__ could be written in C.
        '''
        try:
            reqargs = inspect.getargspec(v.__init__)
            classtype = True
        except:
            print "{} ERROR: Class has no init method.  Unsupported doc parsing.".format(v.__name__)
            return
    else:
        print "{} ERROR: Unable to determine class or function".format(v.__name__)
        return
    
    args = reqargs.args

    if reqargs.defaults != None:
        defaults = list(reqargs.defaults)
    else:
        defaults = None

    if classtype == True:
        args.remove('self')

    argtype = OrderedDict()
    for a in args:
        argtype[a] = {'name':a, 'chain_name':'{}_href'.format(a),
                      'type':'Unknown', 'description':'None'}
    try:
        doctree = publish_doctree(docs).asdom()
        doctree = etree.fromstring(doctree.toxml())
    except:
        print "ERROR: Docutils error in {}".format(v.__name__)
        return None

    response_template['description'] = doctree[0].text
    sections = doctree.findall('section')

    parameters = {}
    attributes = {}
    documentation_extraction = {}
    for sub in doctree.findall('section'):
        key = sub.attrib['names']
        documentation_extraction[key] = {}
        for i in sub.findall('definition_list'):
            for j in i.findall('definition_list_item'):
                currententry = j.getchildren()[0].text
                if key == 'parameters':
                    documentation_extraction[key][currententry] = {'chain_name':'{}_href'.format(currententry),
                                                                   'name':'{}'.format(currententry)}
                else:
                    documentation_extraction[key][currententry] = {}
                for var in j.getchildren()[1:]:
                    if var.tag == 'definition':
                        documentation_extraction[key][currententry]['description'] = var.getchildren()[0].text
                    else:
                        if var.text[0] == '{':
                            pythonliteral = eval(var.text)
                            selectiontype = type(iter(pythonliteral).next())
                            if selectiontype == str:
                                selectiontype = 'string'
                            documentation_extraction[key][currententry]['type'] = selectiontype
                            documentation_extraction[key][currententry]['selection'] = var.text
                        else:
                            documentation_extraction[key][currententry]['type'] = var.text
    
    if 'attributes' in documentation_extraction.keys():
        response_template['response'] = documentation_extraction['attributes']
    elif 'returns' in documentation_extraction.keys():
        response_template['response'] = documentation_extraction['returns']
    else:
        response_template['response'] = 'Neither class attributes nor return values defined'
    
    #Check for the parameters keyword. If it is not present, doc is likley not numpydoc compliant
    if not 'parameters' in documentation_extraction.keys():
        print "{} ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?".format(v.__name__)
        return None
    
    try:
        nargs = len(reqargs.args)
    except:
        nargs = 0

    try:
        ndef = len(reqargs.defaults)
    except:
        ndef = 0
    #Classify parameters as optional or required, fill in defaults.
    #try:
    nrequired = nargs - ndef
    cdict = response_template['arguments']['required_arguments']
    for i in reqargs.args[:nrequired]:
        if i in documentation_extraction['parameters'].keys():
            cdict[i] = documentation_extraction['parameters'][i]
        else:
            print "{} ERROR: {} in parameter list, but not in doc string".format(v.__name__, i)
            
    cdict = response_template['arguments']['optional_arguments']
    for c, i in enumerate(reqargs.args[nrequired:]):
        if i in documentation_extraction['parameters'].keys():
            cdict[i] = documentation_extraction['parameters'][i]
            cdict[i]['default'] = reqargs.defaults[c]
        else:
            print "{} ERROR: {} in parameter list, but not in doc string".format(v.__name__, i)
    #except:
        #print "{}: Misalignment / Error in arguments.".format(v)
        #response_template = {'status':'error', 'description':'Unable to parse arguments'}

    return response_template

psdocs = copy.deepcopy(psfuncs)
recursive_documentation(psdocs)


SpaceTimeEvents ERROR: time_col in parameter list, but not in doc string
ERROR: Docutils error in SpatialTau
pseudop ERROR: No documentation.
<string>:19: (ERROR/3) Unknown target name: "3".
<string>:72: (ERROR/3) Error parsing content block for the "Table" directive: exactly one table expected.

.. Table:: Significant Moves

                   ===============  ===================
                   (s1,s2)          move_type
                   ===============  ===================
                   (1,1)            [1, 16]
                   (1,0)            [17, 32]
                   (0,1)            [33, 48]
                   (0,0)            [49, 64]
                   ===============  ===================


                   == ==  ==  ==  =========
                   q1 q2  s1  s2  move_type
                   == ==  ==  ==  =========
                    1  1   1   1   1
                    1  2   1   1   2
                    1  3   1   1   3
                    1  4   1   1   4
                    2  1   1   1   5
                    2  2   1   1   6
                    2  3   1   1   7
                    2  4   1   1   8
                    3  1   1   1   9
                    3  2   1   1   10
                    3  3   1   1   11
                    3  4   1   1   12
                    4  1   1   1   13
                    4  2   1   1   14
                    4  3   1   1   15
                    4  4   1   1   16
                    1  1   1   0   17
                    1  2   1   0   18
                    .  .   .   .    .
                    .  .   .   .    .
                    4  3   1   0   31
                    4  4   1   0   32
                    1  1   0   1   33
                    1  2   0   1   34
                    .  .   .   .    .
                    .  .   .   .    .
                    4  3   0   1   47
                    4  4   0   1   48
                    1  1   0   0   49
                    1  2   0   0   50
                    .  .   .   .    .
                    .  .   .   .    .
                    4  3   0   0   63
                    4  4   0   0   64
                   == ==  ==  ==  =========

MultiPoint ERROR: No documentation.
NullShape ERROR: No documentation.
shp_file ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
Polygon ERROR: Class has no init method.  Unsupported doc parsing.
struct2arrayinfo ERROR: No documentation.
MultiPointM ERROR: No documentation.
MultiPatch ERROR: No documentation.
Point ERROR: Class has no init method.  Unsupported doc parsing.
PolyLineZ ERROR: No documentation.
PointM ERROR: No documentation.
PolyLineM ERROR: No documentation.
PolygonM ERROR: No documentation.
PolyLine ERROR: Class has no init method.  Unsupported doc parsing.
noneMin ERROR: No documentation.
MultiPointZ ERROR: No documentation.
PolygonZ ERROR: No documentation.
PointZ ERROR: No documentation.
shx_file ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
noneMax ERROR: No documentation.
WeightConverter ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
weight_convert ERROR: inPath in parameter list, but not in doc string
weight_convert ERROR: outPath in parameter list, but not in doc string
weight_convert ERROR: inDataFormat in parameter list, but not in doc string
weight_convert ERROR: outDataFormat in parameter list, but not in doc string
weight_convert ERROR: useIdIndex in parameter list, but not in doc string
weight_convert ERROR: matrix_form in parameter list, but not in doc string
WKTParser ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
DBF ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
MtxIO ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
StataTextIO ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
MatIO ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
ArcGISSwmIO ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
GalIO ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
GeoDaTxtReader ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
DatIO ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
unique_filter ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
GwtIO ERROR: No documentation.
PurePyShpWrapper ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
GeoBUGSTextIO ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
Wk1IO ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
ArcGISDbfIO ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
csvWrapper ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
ArcGISTextIO ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
FileIO ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
FileIO_MetaCls ERROR: Class has no init method.  Unsupported doc parsing.
DataTable ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
nearest_neighbor_search ERROR: No documentation.
compute_length ERROR: v0 in parameter list, but not in doc string
compute_length ERROR: v1 in parameter list, but not in doc string
generatetree ERROR: No documentation.
dijkstra ERROR: ntw in parameter list, but not in doc string
dijkstra ERROR: cost in parameter list, but not in doc string
dijkstra ERROR: node in parameter list, but not in doc string
dijkstra ERROR: n in parameter list, but not in doc string
nearestneighborsearch ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
cumulativedistances ERROR: No documentation.
shortest_path ERROR: No documentation.
get_neighbor_distances ERROR: No documentation.
SortedEdges ERROR: No documentation.
SimulatedPointPattern ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
NetworkK ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
NetworkF ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
<string>:3: (WARNING/2) Definition list ends without a blank line; unexpected unindent.
<string>:9: (ERROR/3) Unexpected indentation.
<string>:10: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
<string>:11: (ERROR/3) Unexpected indentation.
NetworkG ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
gfunction ERROR: nearest in parameter list, but not in doc string
gfunction ERROR: lowerbound in parameter list, but not in doc string
gfunction ERROR: upperbound in parameter list, but not in doc string
gfunction ERROR: nsteps in parameter list, but not in doc string
kfunction ERROR: No documentation.
NetworkBase ERROR: No documentation.
ffunction ERROR: No documentation.
Graph ERROR: No documentation.
is_component ERROR: w in parameter list, but not in doc string
Arc_KDTree ERROR: No documentation.
KDTree ERROR: No documentation.
union_all ERROR: No documentation.
Rtree ERROR: No documentation.
avg_diagonals ERROR: No documentation.
closest ERROR: No documentation.
RTree ERROR: No documentation.
center_of_gravity ERROR: No documentation.
silhouette_coeff ERROR: No documentation.
silhouette_w ERROR: No documentation.
k_means_cluster ERROR: No documentation.
Rect ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
get_angle_between ERROR: ray1 in parameter list, but not in doc string
get_angle_between ERROR: ray2 in parameter list, but not in doc string
get_point_at_angle_and_dist ERROR: ray in parameter list, but not in doc string
get_point_at_angle_and_dist ERROR: angle in parameter list, but not in doc string
get_point_at_angle_and_dist ERROR: dist in parameter list, but not in doc string
get_points_dist ERROR: pt1 in parameter list, but not in doc string
get_points_dist ERROR: pt2 in parameter list, but not in doc string
get_polygon_point_dist ERROR: poly in parameter list, but not in doc string
get_polygon_point_dist ERROR: pt in parameter list, but not in doc string
get_segment_point_dist ERROR: seg in parameter list, but not in doc string
get_segment_point_dist ERROR: pt in parameter list, but not in doc string
bbcommon ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
get_rectangle_rectangle_intersection ERROR: r0 in parameter list, but not in doc string
get_rectangle_rectangle_intersection ERROR: r1 in parameter list, but not in doc string
get_rectangle_rectangle_intersection ERROR: checkOverlap in parameter list, but not in doc string
get_polygon_point_intersect ERROR: poly in parameter list, but not in doc string
get_polygon_point_intersect ERROR: pt in parameter list, but not in doc string
ccw ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
point_touches_rectangle ERROR: point in parameter list, but not in doc string
point_touches_rectangle ERROR: rect in parameter list, but not in doc string
get_segments_intersect ERROR: seg1 in parameter list, but not in doc string
get_segments_intersect ERROR: seg2 in parameter list, but not in doc string
is_collinear ERROR: p1 in parameter list, but not in doc string
is_collinear ERROR: p2 in parameter list, but not in doc string
is_collinear ERROR: p3 in parameter list, but not in doc string
get_shared_segments ERROR: poly1 in parameter list, but not in doc string
get_shared_segments ERROR: poly2 in parameter list, but not in doc string
get_shared_segments ERROR: bool_ret in parameter list, but not in doc string
get_ray_segment_intersect ERROR: ray in parameter list, but not in doc string
get_ray_segment_intersect ERROR: seg in parameter list, but not in doc string
get_segment_point_intersect ERROR: seg in parameter list, but not in doc string
get_segment_point_intersect ERROR: pt in parameter list, but not in doc string
convex_hull ERROR: points in parameter list, but not in doc string
is_clockwise ERROR: vertices in parameter list, but not in doc string
seg_intersect ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
get_bounding_box ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
get_rectangle_point_intersect ERROR: rect in parameter list, but not in doc string
get_rectangle_point_intersect ERROR: pt in parameter list, but not in doc string
asShape ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
Polygon ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
Chain ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
Point ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
VerticalLine ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
Line ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
Ring ERROR: vertices in parameter list, but not in doc string
Rectangle ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
Ray ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
arcdist2linear ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
linear2arcdist ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
fast_threshold ERROR: No documentation.
toXYZ ERROR: pt in parameter list, but not in doc string
<string>:21: (WARNING/2) Definition list ends without a blank line; unexpected unindent.
<string>:7: (ERROR/3) Unexpected indentation.
fast_knn ERROR: pts in parameter list, but not in doc string
<string>:8: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
<string>:8: (ERROR/3) Unexpected indentation.
fast_knn ERROR: k in parameter list, but not in doc string
toLngLat ERROR: No documentation.
harcdist ERROR: p0 in parameter list, but not in doc string
<string>:9: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
<string>:12: (ERROR/3) Unexpected indentation.
<string>:10: (ERROR/3) Unexpected indentation.
harcdist ERROR: p1 in parameter list, but not in doc string
harcdist ERROR: lonx in parameter list, but not in doc string
<lambda> ERROR: No documentation.
lonlat ERROR: pointslist in parameter list, but not in doc string
geointerpolate ERROR: p0 in parameter list, but not in doc string
<string>:11: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
<string>:10: (ERROR/3) Unexpected indentation.
geointerpolate ERROR: p1 in parameter list, but not in doc string
geointerpolate ERROR: t in parameter list, but not in doc string
geogrid ERROR: pup in parameter list, but not in doc string
geogrid ERROR: pdown in parameter list, but not in doc string
geogrid ERROR: k in parameter list, but not in doc string
geogrid ERROR: lonx in parameter list, but not in doc string
haversine ERROR: x in parameter list, but not in doc string
brute_knn ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
radangle ERROR: p0 in parameter list, but not in doc string
radangle ERROR: p1 in parameter list, but not in doc string
PointLocator ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
PolygonLocator ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
BruteForcePointLocator ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
Grid ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
IntervalTree ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
Gini ERROR: x in parameter list, but not in doc string
Gini_Spatial ERROR: x in parameter list, but not in doc string
Gini_Spatial ERROR: w in parameter list, but not in doc string
Kernel ERROR: ids in parameter list, but not in doc string
buildContiguity ERROR: polygons in parameter list, but not in doc string
write_gal ERROR: No documentation.
higher_order_sp ERROR: shortest_path in parameter list, but not in doc string
lat2SW ERROR: criterion in parameter list, but not in doc string
<string>:22: (ERROR/3) Unknown target name: "1".
<string>:13: (WARNING/2) Definition list ends without a blank line; unexpected unindent.
<string>:40: (ERROR/3) Unknown interpreted text role "class".
<string>:65: (WARNING/2) Definition list ends without a blank line; unexpected unindent.
<string>:76: (ERROR/3) Unknown interpreted text role "class".
<string>:36: (ERROR/3) Unknown interpreted text role "class".
rook_from_shapefile ERROR: idVariable in parameter list, but not in doc string
spw_from_gal ERROR: galfile in parameter list, but not in doc string
kernelW_from_shapefile ERROR: function in parameter list, but not in doc string
<string>:14: (WARNING/2) Definition list ends without a blank line; unexpected unindent.
<string>:61: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
<string>:67: (ERROR/3) Unknown interpreted text role "class".
knnW_from_array ERROR: array in parameter list, but not in doc string
ContiguityWeightsPolygons ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
ContiguityWeights_binning ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
bbcommon ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
get_path ERROR: No documentation.
TSLS_Regimes ERROR: w in parameter list, but not in doc string
<string>:23: (ERROR/3) Unexpected indentation.
<string>:108: (ERROR/3) Unexpected indentation.
<string>:20: (ERROR/3) Unexpected indentation.
TSLS_Regimes ERROR: spat_diag in parameter list, but not in doc string
TSLS_Regimes ERROR: constant_regi in parameter list, but not in doc string
TSLS_Regimes ERROR: summ in parameter list, but not in doc string
RegressionPropsY ERROR: Class has no init method.  Unsupported doc parsing.
sp_att ERROR: No documentation.
optim_moments ERROR: moments_in in parameter list, but not in doc string
<string>:24: (WARNING/2) Definition list ends without a blank line; unexpected unindent.
<string>:14: (WARNING/2) Definition list ends without a blank line; unexpected unindent.
<string>:18: (WARNING/2) Definition list ends without a blank line; unexpected unindent.
<string>:25: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
iter_msg ERROR: No documentation.
RegressionProps_basic ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
power_expansion ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
set_endog ERROR: No documentation.
foptim_par ERROR: par in parameter list, but not in doc string
RegressionPropsVM ERROR: Class has no init method.  Unsupported doc parsing.
<string>:6: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
<string>:9: (ERROR/3) Unexpected indentation.
<string>:10: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
<string>:23: (WARNING/2) Definition list ends without a blank line; unexpected unindent.
set_warn ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
set_endog_sparse ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
get_a1a2 ERROR: wA1 in parameter list, but not in doc string
<string>:27: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
<string>:11: (WARNING/2) Definition list ends without a blank line; unexpected unindent.
<string>:62: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
get_a1a2 ERROR: P in parameter list, but not in doc string
get_a1a2 ERROR: zs in parameter list, but not in doc string
get_a1a2 ERROR: inv_method in parameter list, but not in doc string
get_a1a2 ERROR: filt in parameter list, but not in doc string
get_Omega_GS2SLS ERROR: P in parameter list, but not in doc string
<string>:85: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
<string>:91: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
get_P_hat ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
<string>:35: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
<string>:9: (WARNING/2) Literal block ends without a blank line; unexpected unindent.
<string>:34: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
<string>:99: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
<string>:161: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
<string>:250: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
get_vc_het_tsls ERROR: No documentation.
ERROR: Docutils error in get_vc_het
lag_c_loglik_ord ERROR: No documentation.
lag_c_loglik ERROR: No documentation.
set_name_yend ERROR: yend in parameter list, but not in doc string
set_name_q_sp ERROR: name_q in parameter list, but not in doc string
set_name_q_sp ERROR: lag_q in parameter list, but not in doc string
set_name_q_sp ERROR: force_all in parameter list, but not in doc string
check_weights ERROR: w_required in parameter list, but not in doc string
<string>:145: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
<string>:11: (WARNING/2) Inline emphasis start-string without end-string.
check_robust ERROR: wk in parameter list, but not in doc string
set_name_y ERROR: name_y in parameter list, but not in doc string
set_name_multi ERROR: multireg in parameter list, but not in doc string
set_name_multi ERROR: multi_set in parameter list, but not in doc string
set_name_multi ERROR: name_multiID in parameter list, but not in doc string
set_name_multi ERROR: y in parameter list, but not in doc string
set_name_multi ERROR: x in parameter list, but not in doc string
set_name_multi ERROR: name_y in parameter list, but not in doc string
set_name_multi ERROR: name_x in parameter list, but not in doc string
set_name_multi ERROR: name_ds in parameter list, but not in doc string
set_name_multi ERROR: title in parameter list, but not in doc string
set_name_multi ERROR: name_w in parameter list, but not in doc string
set_name_multi ERROR: robust in parameter list, but not in doc string
check_regimes ERROR: N in parameter list, but not in doc string
<string>:26: (ERROR/3) Unexpected indentation.
<string>:143: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
check_regimes ERROR: K in parameter list, but not in doc string
GM_Endog_Error_Regimes ERROR: constant_regi in parameter list, but not in doc string
<string>:152: (ERROR/3) Unexpected indentation.
<string>:186: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
<string>:191: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
<string>:27: (ERROR/3) Unexpected indentation.
GM_Endog_Error_Regimes ERROR: summ in parameter list, but not in doc string
GM_Endog_Error_Regimes ERROR: add_lag in parameter list, but not in doc string
GM_Combo_Regimes ERROR: constant_regi in parameter list, but not in doc string
<string>:163: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
<string>:172: (ERROR/3) Unexpected indentation.
<string>:210: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
<string>:215: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
<string>:19: (ERROR/3) Unexpected indentation.
GM_Error_Regimes ERROR: constant_regi in parameter list, but not in doc string
<string>:124: (ERROR/3) Unexpected indentation.
<string>:158: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
<string>:163: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
<string>:17: (ERROR/3) Unexpected indentation.
ML_Lag_Regimes ERROR: constant_regi in parameter list, but not in doc string
<string>:162: (ERROR/3) Unexpected indentation.
<string>:201: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
<string>:44: (ERROR/3) Unexpected indentation.
ML_Lag_Regimes ERROR: regime_lag_sep in parameter list, but not in doc string
ML_Lag_Regimes ERROR: regime_err_sep in parameter list, but not in doc string
OLS_Regimes ERROR: constant_regi in parameter list, but not in doc string
likratiotest ERROR: reg0 in parameter list, but not in doc string
<string>:181: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
<string>:187: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
<string>:193: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
<string>:199: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
<string>:205: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
<string>:224: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
<string>:245: (ERROR/3) Unexpected indentation.
<string>:17: (ERROR/3) Unexpected indentation.
likratiotest ERROR: reg1 in parameter list, but not in doc string
ML_Error_Regimes ERROR: constant_regi in parameter list, but not in doc string
symmetrize ERROR: w in parameter list, but not in doc string
hac_multi ERROR: constant in parameter list, but not in doc string
pr2_spatial ERROR: tslsreg in parameter list, but not in doc string
<string>:146: (ERROR/3) Unexpected indentation.
<string>:182: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
<string>:27: (ERROR/3) Unexpected indentation.
GM_Combo_Hom_Regimes ERROR: constant_regi in parameter list, but not in doc string
<string>:193: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
<string>:202: (ERROR/3) Unexpected indentation.
<string>:241: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
<string>:245: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
<string>:20: (ERROR/3) Unexpected indentation.
GM_Error_Hom_Regimes ERROR: constant_regi in parameter list, but not in doc string
<string>:149: (ERROR/3) Unexpected indentation.
<string>:183: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
<string>:187: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
<string>:27: (ERROR/3) Unexpected indentation.
GM_Endog_Error_Hom_Regimes ERROR: constant_regi in parameter list, but not in doc string
GM_Endog_Error_Hom_Regimes ERROR: vm in parameter list, but not in doc string
GM_Endog_Error_Hom_Regimes ERROR: summ in parameter list, but not in doc string
GM_Endog_Error_Hom_Regimes ERROR: add_lag in parameter list, but not in doc string
beta_diag_lag ERROR: No documentation.
build_coefs_body_instruments ERROR: No documentation.
GM_Combo_Hom_multi ERROR: No documentation.
OLS ERROR: No documentation.
GM_Endog_Error_Hom_multi ERROR: No documentation.
summary_multi ERROR: No documentation.
summary_sur ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
summary_spat_diag_intro ERROR: No documentation.
GM_Combo_Het_multi ERROR: No documentation.
TSLS ERROR: No documentation.
summary_iteration ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
summary_intro ERROR: No documentation.
summary_warning ERROR: No documentation.
GM_Combo ERROR: No documentation.
beta_diag_ols ERROR: No documentation.
GM_Endog_Error ERROR: No documentation.
ML_Lag ERROR: No documentation.
OLS_multi ERROR: No documentation.
GM_Combo_Hom ERROR: No documentation.
GM_Combo_multi ERROR: No documentation.
summary_vm ERROR: No documentation.
summary_chow ERROR: No documentation.
GM_Error_Hom_multi ERROR: No documentation.
GM_Error ERROR: No documentation.
GM_Endog_Error_Hom ERROR: No documentation.
ML_Lag_multi ERROR: No documentation.
GM_Lag_multi ERROR: No documentation.
summary_close ERROR: No documentation.
summary_spat_diag_probit ERROR: No documentation.
summary_open ERROR: No documentation.
GM_Combo_Het ERROR: No documentation.
TSLS_multi ERROR: No documentation.
spat_diag_instruments ERROR: No documentation.
summary_coefs_lambda ERROR: No documentation.
ML_Error ERROR: No documentation.
summary_coefs_allx ERROR: No documentation.
GM_Lag ERROR: No documentation.
GM_Error_Het ERROR: No documentation.
summary_coefs_intro ERROR: No documentation.
Probit ERROR: No documentation.
spat_diag_ols ERROR: No documentation.
summary_spat_diag_ols ERROR: No documentation.
GM_Error_Hom ERROR: No documentation.
GM_Endog_Error_multi ERROR: No documentation.
summary_pred ERROR: No documentation.
GM_Endog_Error_Het ERROR: No documentation.
summary_spat_diag_intro_global ERROR: No documentation.
summary_coefs_somex ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
summary_regimes ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
<string>:175: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
<string>:184: (ERROR/3) Unexpected indentation.
<string>:218: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
<string>:222: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
<string>:25: (ERROR/3) Unexpected indentation.
GM_Endog_Error_Het_multi ERROR: No documentation.
summary_nonspat_diag_2 ERROR: No documentation.
summary_nonspat_diag_1 ERROR: No documentation.
summary ERROR: No documentation.
summary_coefs_instruments ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
summary_coefs_slopes ERROR: No documentation.
GM_Error_multi ERROR: No documentation.
ML_Error_multi ERROR: No documentation.
beta_diag ERROR: No documentation.
GM_Error_Het_multi ERROR: No documentation.
GM_Lag_Regimes ERROR: constant_regi in parameter list, but not in doc string
<string>:237: (ERROR/3) Unexpected indentation.
<string>:275: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
<string>:5: (SEVERE/4) Unexpected section title.

Parameters
----------
GM_Lag_Regimes ERROR: regime_lag_sep in parameter list, but not in doc string
GM_Lag_Regimes ERROR: regime_err_sep in parameter list, but not in doc string
ERROR: Docutils error in akTest
LMtests ERROR: ols in parameter list, but not in doc string
<string>:1: (ERROR/3) Unknown target name: "1".
<string>:1: (ERROR/3) Unknown target name: "1".
LMtests ERROR: w in parameter list, but not in doc string
LMtests ERROR: tests in parameter list, but not in doc string
get_zI ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
rlmLag ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
lmLag ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
lmErr ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
get_eI ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
get_mI ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
<string>:1: (ERROR/3) Unknown target name: "1".
<string>:1: (ERROR/3) Unknown target name: "1".
lmSarma ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
rlmErr ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
get_vI ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
ERROR: Docutils error in spDcache
<string>:1: (ERROR/3) Unknown target name: "1".
<string>:26: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
get_omega_hom_ols ERROR: wA1 in parameter list, but not in doc string
<string>:67: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
<string>:71: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
<string>:144: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
<string>:148: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
<string>:93: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
<string>:97: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
<string>:129: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
<string>:133: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
<string>:37: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
get_omega_hom_ols ERROR: wA2 in parameter list, but not in doc string
get_vc_hom ERROR: wA1 in parameter list, but not in doc string
<string>:26: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
<string>:99: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
<string>:103: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
<string>:84: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
get_vc_hom ERROR: wA2 in parameter list, but not in doc string
moments_hom ERROR: wA1 in parameter list, but not in doc string
moments_hom ERROR: wA2 in parameter list, but not in doc string
get_omega_hom ERROR: wA1 in parameter list, but not in doc string
<string>:88: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
<string>:26: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
<string>:162: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
get_omega_hom ERROR: wA2 in parameter list, but not in doc string
err_c_loglik ERROR: No documentation.
err_c_loglik_ord ERROR: No documentation.
Probit ERROR: vm in parameter list, but not in doc string
<string>:125: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
<string>:78: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
<string>:27: (ERROR/3) Unexpected indentation.
<string>:189: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
<string>:198: (ERROR/3) Unexpected indentation.
<string>:236: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
Probit ERROR: spat_diag in parameter list, but not in doc string
GM_Combo_Het_Regimes ERROR: constant_regi in parameter list, but not in doc string
<string>:27: (ERROR/3) Unexpected indentation.
<string>:171: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
<string>:180: (ERROR/3) Unexpected indentation.
<string>:214: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
GM_Endog_Error_Het_Regimes ERROR: constant_regi in parameter list, but not in doc string
<string>:19: (ERROR/3) Unexpected indentation.
<string>:141: (ERROR/3) Unexpected indentation.
GM_Endog_Error_Het_Regimes ERROR: summ in parameter list, but not in doc string
GM_Endog_Error_Het_Regimes ERROR: add_lag in parameter list, but not in doc string
GM_Error_Het_Regimes ERROR: constant_regi in parameter list, but not in doc string
GM_Error_Het_Regimes ERROR: regime_err_sep in parameter list, but not in doc string
w_regimes ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
<string>:175: (WARNING/2) Explicit markup ends without a blank line; unexpected unindent.
<string>:14: (WARNING/2) Definition list ends without a blank line; unexpected unindent.
x2xsp ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
buildR1var ERROR: kryd in parameter list, but not in doc string
<string>:42: (ERROR/3) Unexpected indentation.
<string>:33: (WARNING/2) Definition list ends without a blank line; unexpected unindent.
check_cols2regi ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
w_regimes_union ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
w_regime ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
Regimes_Frame ERROR: constant_regi in parameter list, but not in doc string
<string>:5: (WARNING/2) Definition list ends without a blank line; unexpected unindent.
<string>:42: (ERROR/3) Unknown target name: "regimename".
<string>:19: (ERROR/3) Unknown interpreted text role "class".
Regimes_Frame ERROR: yend in parameter list, but not in doc string
load_example ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
Map_Classifier ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
natural_breaks ERROR: parameters key not in extracted doc.  Is the doc string numpydoc compliant?
fj ERROR: No documentation.
<string>:20: (ERROR/3) Unknown interpreted text role "class".
<string>:21: (ERROR/3) Unknown interpreted text role "class".
<string>:22: (ERROR/3) Unknown interpreted text role "class".
<string>:23: (ERROR/3) Unknown interpreted text role "class".
<string>:24: (ERROR/3) Unknown interpreted text role "class".
<string>:25: (ERROR/3) Unknown interpreted text role "class".
<string>:26: (ERROR/3) Unknown interpreted text role "class".
<string>:27: (ERROR/3) Unknown interpreted text role "class".
<string>:28: (ERROR/3) Unknown interpreted text role "class".
<string>:29: (ERROR/3) Unknown interpreted text role "class".
<string>:30: (ERROR/3) Unknown interpreted text role "class".
<string>:31: (ERROR/3) Unknown interpreted text role "class".
<string>:32: (ERROR/3) Unknown interpreted text role "class".
<string>:38: (ERROR/3) Unknown interpreted text role "func".
<string>:39: (ERROR/3) Unknown interpreted text role "class".
<string>:9: (WARNING/2) Definition list ends without a blank line; unexpected unindent.
gadf ERROR: method in parameter list, but not in doc string
<string>:11: (ERROR/3) Unexpected indentation.
<string>:12: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
<string>:57: (WARNING/2) Definition list ends without a blank line; unexpected unindent.
<string>:99: (ERROR/3) Unexpected indentation.
<string>:100: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
<string>:111: (ERROR/3) Unexpected indentation.
<string>:112: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
<string>:123: (ERROR/3) Unexpected indentation.
<string>:124: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
<string>:135: (ERROR/3) Unexpected indentation.
<string>:136: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
<string>:9: (WARNING/2) Definition list ends without a blank line; unexpected unindent.
gadf ERROR: maxk in parameter list, but not in doc string
Age_Adjusted_Smoother ERROR: w in parameter list, but not in doc string
<string>:11: (ERROR/3) Unexpected indentation.
<string>:9: (WARNING/2) Definition list ends without a blank line; unexpected unindent.
<string>:9: (WARNING/2) Definition list ends without a blank line; unexpected unindent.
Age_Adjusted_Smoother ERROR: s in parameter list, but not in doc string
Age_Adjusted_Smoother ERROR: alpha in parameter list, but not in doc string
Spatial_Rate ERROR: w in parameter list, but not in doc string
Kernel_Smoother ERROR: w in parameter list, but not in doc string
Disk_Smoother ERROR: w in parameter list, but not in doc string
<string>:9: (WARNING/2) Definition list ends without a blank line; unexpected unindent.
<string>:7: (WARNING/2) Definition list ends without a blank line; unexpected unindent.
Headbanging_Triples ERROR: w in parameter list, but not in doc string
<string>:10: (ERROR/3) Unexpected indentation.
<string>:11: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
<string>:9: (WARNING/2) Definition list ends without a blank line; unexpected unindent.
Headbanging_Triples ERROR: k in parameter list, but not in doc string
Headbanging_Triples ERROR: t in parameter list, but not in doc string
Headbanging_Triples ERROR: edgecor in parameter list, but not in doc string
Headbanging_Median_Rate ERROR: t in parameter list, but not in doc string
<string>:11: (ERROR/3) Unexpected indentation.
<string>:12: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
<string>:9: (WARNING/2) Definition list ends without a blank line; unexpected unindent.
<string>:9: (WARNING/2) Definition list ends without a blank line; unexpected unindent.
Headbanging_Median_Rate ERROR: aw in parameter list, but not in doc string
Spatial_Empirical_Bayes ERROR: w in parameter list, but not in doc string
Spatial_Median_Rate ERROR: w in parameter list, but not in doc string
<string>:11: (ERROR/3) Unexpected indentation.
<string>:12: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
<string>:19: (WARNING/2) Definition list ends without a blank line; unexpected unindent.
<string>:21: (ERROR/3) Unexpected indentation.
<string>:28: (WARNING/2) Definition list ends without a blank line; unexpected unindent.
Spatial_Median_Rate ERROR: aw in parameter list, but not in doc string

In [ ]: