Skip to content

WIP: Documentation generator from component code

Jérome Perrin requested to merge jerome/erp5:feat/doc-generator into master

This is a very early / not well integrated documentation generator for portal_components . It produces a zip file with html code.

I did not try all from https://wiki.python.org/moin/DocumentationTools but only:

  • pydoc ( which I don't like )
  • epydoc ( which I don't like so much )
  • sphinx ( which I feel is acceptable )
  • pdoc ( which I feel is acceptable )

if we ever integrate this further, we should probably choose one and stick to it. Sphinx is hard to integrate, this code generates some a folder with some rst files and run a full build. If we want to integrate a doc generation tool so that a request on a URL returns the doc for the module, pdoc might be easier, because it's API is really "generate doc for this module" ( this code hacks to generate docs for multiple modules at once )

example usage: https://your.erp5.instance/erp5/ERP5Site_generateCodeDocumentation?backend=sphinx&module_name_list:list=erp5.component.test.erp5_version.testSupportRequest&module_name_list:list=erp5.component.test.erp5_version.testERP5Administration

the module names must match the key in sys.modules, ie. include the version (like erp5_version ).

Merge request reports