-
Notifications
You must be signed in to change notification settings - Fork 74
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
Add documentation #38
Comments
certainly more tests are better. Please be my guest. |
Ignoring the spelling mistakes in the commit message, I did some basic filling out of the documentation. It could use more, but it's a start. |
@stumpylog Thats fantastic work. I'm pulling it in now. |
@twoolie I don't see the pull request, nor the pull. |
I just had a look at Sphinx. I assumed it could create reStructuredText (rst) from the docstrings, but it seems mostly aimed to create HTML from reStructuredText with optionally docstrings mixed in. Manually maintaining class and method documentation in two places (in the doc folder and in the Python source) does not seem very useful to me. Two questions:
a. Should the downloadable documentation be text or HTML I presume we like to use reStructuredText for formatting, as that it the Python standard, and is supported by GitHub in both the code and on the wiki. |
FYI, since I wasn't able to figure out how to use Sphinx to generate rst files from Python docstrings, I asked the question on the mailing list: https://groups.google.com/d/topic/sphinx-dev/3BdP0ywfnaI/discussion |
@stumpylog Hi, did you fill the rst files by hand, or did you use a tool to do it automatically? If the later, may I ask how? |
I filled them in by hand, mostly based of comments and docstrings already in the code. A tool that can take the docstrings and output rst or other documentation would be more consistent that I was. |
Last night I got frustrated with Sphinx. The documentation and tool seem to assume that I know what it's doing. I can run it, but it apparently it was using some cached result in some binary .doctree format. I have no clue which tool is making which mapping (I presume it's going from rst to doctree, from docstring to doctree, from doctree to html, from doctree to text), but lacking useful feedback from the tool I'm not sure and working in the dark.
|
I had a look around at a few documentation tools. Epydoc is dead simple, but it has it's own flavor of markup, and quite frankly isn't very pretty. It creates documentation that is very similar to Javadocs. For Sphinx, have a look at sphinx-apidoc. I was playing around with that, and it seems to work well, and was a lot simpler than the quickstart. Using the |
@stumpylog I looked at your sphinx config, and got mine to finally work. Turns out my error was to run
instead of:
(I somehow assumed I need to point to the folder where nbt was located, but it turns out it is just using Anyway, I got it working and committed some preliminary files, based on your work
If you want to format the docstrings, please do! I recommend that you follow the guidlines of PEP 287 and PEP 257. If you make pull requests, it is appreciated if you could use tabs (see #27, and yes I know this is different from what our BDFL has dictated in PEP 0008). If you have time, I haven't been able to figure out these:
PS @stumpylog if you want to make a merge, you may consider merging ( |
Are there suggestions what to include in the git repository and/or setuptools distribution? The .rst to html works fine, but .rst alone is not helpful. Should we include the html, or simply say in the README that users can generate documentation with
If there are no suggestions, I'm going to close this issue. |
Closing this, now that #60 provides automatic doc creation for the wiki Checkout the
|
Most files in the doc folder are rather empty. I haven't find a big need for it, but perhaps we should either remove the empty files or fill them :)
The text was updated successfully, but these errors were encountered: