Open lo-co opened 8 years ago
It is not clear to me how to format the docstring when using reStructuredText. jupyter is not able to make any sence of this:
def test(bla,suelz):
"""something
:param bla: info
:param suelz: info
:type bla: float
:type suelz: int
"""
return 'huhu'
do you know of a good example project on github that uses reStructuredText.
I am not following this. We are not talking about notebooks, are we? Notebooks are used for gists, personal work, demonstations, etc. Why is this an issue?
As far as examples go - scipy, numpy, ALL OF PYTHON.
From Python Guide:
A README file at the root directory should give general information to both users and maintainers of a project. It should be raw text or written in some very easy to read markup, such as reStructuredText or Markdown. It should contain a few lines explaining the purpose of the project or library (without assuming the user knows anything about the project), the URL of the main source for the software, and some basic credit information. This file is the main entry point for readers of the code.
From the python docs:
The Python language has a substantial body of documentation, much of it contributed by various authors. The markup used for the Python documentation is reStructuredText, developed by the docutils project, amended by custom directives and using a toolset named Sphinx to post-process the HTML output.
numpy and scipy use a flavor of it. Django uses it. And I am pretty sure most every library uses some form of it. Look at how these use it, but the fact that it is recommended by the Python Software Foundation seems sufficient to me.
There is a post on reddit discussing just this issue. I don't think that we should worry about this though as the best case scenario is that we are able to produce documentation that can be extracted and presented as PDF or HTML. We can do this with rst.
Do you have an alternative proposal?
No, sounds great to me. I am asking because I assume that sphinx pulls in docstrings into the documentation. I am wrong about that? And I was afraid that we have to use the syntax i posted further up, which is kinda hard to read.
It looks like far and away the most popular format for documenting python modules is reStructuredText with Sphinx for generating the documentation for this. Any thoughts?
Also, starting a hacking guide in the top-level-directory in the NewStructure branch...