-
Notifications
You must be signed in to change notification settings - Fork 324
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
Refactoring documentation #22
Comments
Once you decide which style for docstrings to use, I can start refactoring. A look at this http://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html page shouldn't take more than 10 minutes. |
I took a look, I think we should follow the NumPy style. The reason for this is that the types of arguments can be lengthier (for instance Another important detail is that I have decided to move the repository to an organizational GitHub account (https://github.com/modAL-python). As a first step, I would like to move the website and API documentation first from the modAL repository itself to a separate one (https://github.com/modAL-python/modAL-python.github.io). I'll add you as a collaborator to this organization, so we can work there together. |
Considering docstrings style, if there is type annotation (that I propose to use) in function signatures, then it is redundant to specify types also in docstrings (it will lead to inconvenient duplications which eventually result in inconsistency, http://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html#type-annotations). Considering website, both scikit-learn and PyTorch use Sphinx to build html-pages for their websites, doing commits with these artifacts to special repositories. So, after every change in your documentation sources, you should not forget to rebuild the doc and make a commmit to this special repo. You definetely should set up CI step for this, for instance in Travis. However, readthedocs suggests building documentation automatically after each commit to the repo with sources. |
What I plan is to combine the modAL tutorial page (https://cosmic-cortex.github.io/modAL/) with the readthedocs API reference (https://modal-python.readthedocs.io/en/latest/) to a single website in the style of the PyTorch documentation. So, I would like to get rid of readthedocs completely and use Sphinx only to build the website. I'll go ahead and try to set this up. |
I have set up the new website at https://modal-python.github.io, the old website redirects from here also. The new one uses Sphinx instead of Jekyll. |
See https://github.com/modAL-python/modAL-python.github.io/compare/notebooks_rendering?expand=1 for the demonstration of my suggestion on dealing with jupyter notebooks ( This kind of deduplication could become even more efficient if sources for the doc and the code itself are stored in a single repo (i.e. main modAL repo). |
Thanks, awesome! This GitHub pages hosted website is not a final solution. The thing is, I am not very familiar with neither Sphinx nor RTD, so in order to keep the problems manageable, I focused on converting the previous website to Sphinx. Since RTD uses Sphinx, it was the logical thing to do. I'll set up the current website on RTD soon in the main repository, then we add the API reference generated automatically from the docstrings, and finally the modAL main repository can be moved to the organizational account. |
Ok, I have set up the new RTD site, check it out! I have two issues however.
Do you have a solution in mind for these? Perhaps you have encountered them before. If you have some progress in refactoring the docstrings, let me know! Now it should be easy to include the documentation in the RTD site. |
Yeah, I also faced this problem... my solution was to use '.' instead of 'source' for .rst files... so docs/examples/my_notebook.ipynb looks more discoverable if you surf directly on GitHub. I haven't started docstrings refactoring yet. Since it is semi-automatic task, I will try to make pull request tomorrow. |
No description provided.
The text was updated successfully, but these errors were encountered: