-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
DOC: documenting cython class (eg Timestamp): "cyfunction is not a python function" #5218
Comments
does |
@jtratner What do you mean? If you include in api.rst
the docstrings of Timestamp and it methods are included in the docs, so I suppose just The issues are that it generates warnings when building the docs and the signatures are not included, but in itself it does work (as in: the docstrings are included in the generated docs). |
|
I am not sure whether this is in your case, but it seems |
That issue might be related, but it is not yet fully solved in any case, as we are using Python 3.6 for the doc build on travis (eg https://travis-ci.org/pandas-dev/pandas/jobs/291468074), and there are still some warnings like
|
This blog http://opendreamkit.org/2017/06/09/CythonSphinx/ might be relevant (maybe not for a solution, but at least it gives some explanation of why it fails) |
#18202 fixed this by including the signature on the first line of the docstring. I think this is a sufficient solution for now (@TomAugspurger ?) |
Closed by #18202 |
Follows from discussion in PR #5160.
When adding
Timestamp
in api.rst to document this class and its methods (as eg done in this commit jorisvandenbossche@3a8a41d), you get warnings when building the docs like for example:Timestamp
is a python class in a cython file (so I suppose then it is a cython class). You get the warnings for all methods that are defined in this class (defined here https://github.com/pydata/pandas/blob/master/pandas/tslib.pyx#L130), but not for inherited functions of _Timestamp or datetime.It seems that the generated docstring pages are built (so with the docstring rendered), but that Sphinx could not detect the signature.
Does somebody know how to let Sphinx handle cython classes/functions?
The text was updated successfully, but these errors were encountered: