MCPcopy Create free account
hub / github.com/AdaCompNUS/summit / gen_overview

Method gen_overview

PythonAPI/docs/doc_gen.py:407–439  ·  view source on GitHub ↗

Generates a referenced index for markdown file

(self)

Source from the content-addressed store, hash-verified

405 self.master_dict[module_name]['classes'].append(new_module)
406
407 def gen_overview(self):
408 """Generates a referenced index for markdown file"""
409 md = MarkdownFile()
410 md.title(3, 'Overview')
411 for module_name in sorted(self.master_dict):
412 module = self.master_dict[module_name]
413 module_key = '#' + module_name
414 md.list_pushn(
415 brackets(bold(module_key[1:])) +
416 parentheses(module_key) + ' ' +
417 sub(italic('Module')))
418 # Generate class overview (if any)
419 if 'classes' in module and module['classes']:
420 for cl in sorted(module['classes']):
421 class_name = cl['class_name']
422 class_key = join([module_key, class_name], '.')
423 md.list_pushn(join([
424 brackets(bold(class_name)),
425 parentheses(class_key), ' ',
426 sub(italic('Class'))]))
427 # Generate class instance variables overview (if any)
428 if 'instance_variables' in cl and cl['instance_variables']:
429 for inst_var in cl['instance_variables']:
430 md.list_push(gen_inst_var_indx(inst_var, class_key))
431 md.list_popn()
432 # Generate class methods overview (if any)
433 if 'methods' in cl and cl['methods']:
434 for method in cl['methods']:
435 md.list_push(gen_method_indx(method, class_key))
436 md.list_popn()
437 md.list_pop()
438 md.list_pop()
439 return md.data()
440
441 def gen_body(self):
442 """Generates the documentation body"""

Callers

nothing calls this directly

Calls 15

titleMethod · 0.95
list_pushnMethod · 0.95
list_pushMethod · 0.95
list_popnMethod · 0.95
list_popMethod · 0.95
dataMethod · 0.95
bracketsFunction · 0.85
gen_inst_var_indxFunction · 0.85
gen_method_indxFunction · 0.85
MarkdownFileClass · 0.70
boldFunction · 0.70
parenthesesFunction · 0.70

Tested by

no test coverage detected