robertwb / issues-import-test

0 stars 0 forks source link

Cython needs better support for API documentation #9

Closed robertwb closed 8 years ago

robertwb commented 8 years ago

Reported by robertwb on 6 May 2008 00:13 UTC Currently, Python functions and methods in Cython generated C modules cannot provide their signature to interactive introspection. This is a major problem for the "help()" function in the interpreter (where function signatures look like "parse(...)"), but also to API doc generation tools like epydoc.

epydoc supports a special first line in the docstring here that mimics the look of the signature:

http://epydoc.sourceforge.net/api/epydoc.docstringparser-module.html#parse_function_signature http://epydoc.sourceforge.net/api/epydoc.docstringparser-pysrc.html#parse_function_signature

Cython could generate such a line based on the original source signature.

Migrated-From: http://trac.cython.org/ticket/2

robertwb commented 8 years ago

Modified by robertwb on 6 May 2008 00:13 UTC

robertwb commented 8 years ago

Modified by robertwb on 6 May 2008 00:23 UTC

robertwb commented 8 years ago

Modified by robertwb on 19 Aug 2008 03:56 UTC

robertwb commented 8 years ago

Comment by Stefan Behnel on 5 Sep 2008 08:33 UTC On the mailing list, Dag Seljebotn provided an idea how to implement this.

http://permalink.gmane.org/gmane.comp.python.cython.devel/2830

robertwb commented 8 years ago

Modified by dagss on 8 Sep 2008 15:12 UTC

robertwb commented 8 years ago

Comment by dagss on 19 Sep 2008 14:34 UTC The main work is now done by Lisandro Dalcin: http://hg.cython.org/cython-devel/rev/075511424c24

There's still a problem with formatting of some types, notably all ints are displayed as int and buffers etc. aren't displayed at all.

In order to remedy this, the transform should be moved to after AnalyseDeclarations so that parsed PyrexType objects can be queried for their description, however then one should factor out how cpdef creates a def-node into a post-analysis transform so that copying the doc isn't necesarry.

robertwb commented 8 years ago

Modified by dagss on 19 Sep 2008 14:43 UTC

robertwb commented 8 years ago

Comment by dagss on 24 Sep 2008 14:54 UTC http://article.gmane.org/gmane.comp.python.cython.devel/2937 http://hg.cython.org/cython-devel/rev/d115fd6ed2df

robertwb commented 8 years ago

Modified by robertwb on 8 Oct 2008 07:15 UTC

robertwb commented 8 years ago

Modified by robertwb on 8 Nov 2008 23:34 UTC