Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
erp5
erp5
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Merge Requests 114
    • Merge Requests 114
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Jobs
  • Commits
  • nexedi
  • erp5erp5
  • Merge Requests
  • !775

Open
Opened Oct 18, 2018 by Jérome Perrin@jerome
  • Report abuse
Report abuse

WIP: Documentation generator from component code

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 ).

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch https://lab.nexedi.com/jerome/erp5.git feat/doc-generator
git checkout -b jerome/erp5-feat/doc-generator FETCH_HEAD

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git fetch origin
git checkout origin/master
git merge --no-ff jerome/erp5-feat/doc-generator

Step 4. Push the result of the merge to GitLab

git push origin master

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

  • Discussion 2
  • Commits 2
  • Changes 9
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
0
Labels
None
Assign labels
  • View project labels
Reference: nexedi/erp5!775
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备14008524号