Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate API docs from Cython sources #204

Open
cztomczak opened this issue Feb 8, 2016 · 1 comment
Open

Generate API docs from Cython sources #204

cztomczak opened this issue Feb 8, 2016 · 1 comment

Comments

@cztomczak
Copy link
Owner

  • Create apidocs.py tool to generate API docs from sources. It should also call DocToc to generate table of contents. Generated markdown file should contain a comment that it was auto-generated from sources and should not be modified. This tool needs a mechanism to decide for which .pyx files to generate doc - if there is a corresponding .md file for a .pyx file it should do it (cefpython/browser.pyx <=> docs/objects/Browser.md). When there is a new .pyx file that needs a doc just create an appropriate .md file. Such file should contain a html comment <!-- Generated by tools/apidocs.py --> and only files that contain such comment should be overwritten to avoid mistakes.
  • Use Sphinx doc conventions for docstring:
  • See also PEPs:
    • PEP 216 - Docstring Format
    • PEP 224 - Attribute Docstring
    • PEP 256 - Docstring Processing System Framework
    • PEP 257 - Docstring Conventions
    • PEP 287 - reStructuredText Docstring Format
  • Also take a look at this StackOverflow answer that mentions reStructureText and Sphinx as the most popular standards in Python.
  • Documenting callbacks (handlers and others) may require more effort. See Issue Expose handlers as classes/interfaces: ClientHandler, DisplayHandler, LifespanHandler, etc. #215 - "Expose handlers as classes/interfaces". When such interfaces are available we can use them to generate docs.
  • The translator.py tool (Issue Create translator.py tool to provide full CEF API coverage in an automated way  #214) will generate classes for most of the CEF constants/types. In docs only these will be included, CEF uppercase constants will still be kept for BC, but won't be visibile in official docs.
  • In Python and in Cython as well any module or object that has a docstring will have this comment accessible in a __doc__ attribute.
@jegger
Copy link
Collaborator

jegger commented Feb 8, 2016

I would really favor such a documentation.
It seems to me that Kivy generates doc pages out of cython code.
Example: source doc
But I'm not sure how they do it - I didn't looked into it...

@cztomczak cztomczak added this to the Chrome 47 milestone Feb 11, 2016
@cztomczak cztomczak changed the title Generate API documentation from Cython sources Generate API docs from Cython sources Feb 18, 2016
@cztomczak cztomczak modified the milestones: v51, Chrome 50+ Feb 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants