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
Bring wiki to github #12
Comments
Here's a list of pages to move. Anyone is invited to move one or two pages, so we can gradually get this done without massive work by a single person. The conversion basically consists in replacing mediawiki syntax with markdown (
It might also be a good idea to include relevant information from
|
Hm, most of these pages are descriptions of classes and methods. I believe it would be easier to keep up-to-date if these were generated from comments in the source code. What do you think about using Sphinx and readthedocs.org? The latter is quite cool, since it hooks up with GitHub. I made a very simple and incomplete test and the result is here. Currently the source-code comments are not optimized for Sphinx, but I could work with that. |
That would be great! I've never worked with Shpinx before. How can I help? What do I need to know? |
I've not really worked with it before either, just done some testing, so I'm not really sure :) I guess I can continue setting up the structure and start moving info from the wiki into the source code, and if it's a lot of work we can share it. But if you have a look at #21 that's great. Then I can send in another pull request for code-cleanup, to have a better starting point. |
Let me see if I got this correctly: so we setup Sphynx by creating/customizing the appropriate configuration files, and then hook it to readthedocs, which periodically rebuilds the API documentation without any human intervention. If that's the case, does that mean that the documentation folder doesn't actually contain the generated files? That's not necessarily a bad thing especially if the documentation comes from the code; I'm just asking. Do you see any way to have a similar process based on docco/pycco and gh-pages (i.e. hosting the pages directly on mwclient.github.io)? I think that would be nicer. I've read a bit about git hooks, but it seems github only supports "webhooks", not running arbitrary programs such as pycco (which makes sense). Client-side hooks could work for this but I'm not sure we can setup the repo so that anyone who clones it gets the hooks as well... any ideas? |
That's right. You provide a configuration file and some "templates", and can then build the documentation by typing Looks lite it's possible to host directly on github, but I'm not sure if that's necessarily an advantage. Readthedocs provides versioning and a nicer stylesheet than the default. I'm not familiar with pycco, but it looks much less powerful than Sphinx (well, minimalism can be a good thing, but not too much of it :)) |
I actually have no bias towards hosting on github rather than readthedocs; I only mentioned it because RTD seems to only support sphynx, and I couldn't find any other similar documentation hosting service which could perhaps have different requirements. Indeed, I would prefer a simpler approach such as pycco (what powerful features would we need from sphynx, btw?); that's why I asked about "self"-hosting + local hooks, as that would be equivalent to automatically run |
Indeed, hook propagation isn't possible. Sphinx it is, then. Can I start moving wiki documentation into the code, or are you doing something locally? |
Nope, not yet, so feel free to start. Btw. it's the autodoc extension that pulls in data from the docstrings. |
I tried reading that page but it seemed to require quite a lot of custom documentation markup to get autodoc to work. Apparently I wasn't the only one thinking the same. Fortunately, the solution mentioned on that page has since been integrated as the sphinx-apidoc tool, which is meant to be used with autodoc. This tutorial seems to imply that no special documentation format is required when adding docstrings to be extracted with apidoc+autodoc. But surely there must be some way to, say, describe parameters, and I assume rST formatting is parsed as well. Do you have any insight regarding this? Once I know how to add the docstrings I will start adding the information from the wiki to the actual code. |
btw, the coverage extension also seems like a useful one. I wonder if it could somehow be integrated into the tests, or something. |
My impression is that there are few standards when it comes to Python documentation... I tried to look at some other projects now. The MongoDB driver for instance seems to have a good style: https://github.com/mongodb/mongo-python-driver/blob/master/pymongo/mongo_client.py It uses http://api.mongodb.org/python/current/api/pymongo/mongo_client.html#module-pymongo.mongo_client Coverage testing is nice. I'm not sure how it implements with Sphinx, but I'm using coverage with |
Update: mwclient is now managed through an organization, currently managed by @btongminh, @danmichaelo and me. We can now set up the ReadTheDocs hook and try to import some documentation from the sourceforge wiki. Do you want to do that, @danmichaelo? I did look into the mongodb example but I'm a little unsure about the keywords and formatting. For example, the list here, while formatted similarly to the mongodb example here, doesn't seem to be interpreted the same way by Sphynx. I'm not sure whether that has to do with using the "parameters" keyword before it, or something else; I'd be more comfortable to start from a mwclient-specific example and work up using the readthedocs output for feedback. Btw, I have no opinions on the unit tests. |
Also, the old wiki should be updated to point to Github. The files in the On Wed, Jul 3, 2013 at 11:57 PM, Waldir Pimenta notifications@github.comwrote:
|
@btongminh nope, not yet — I was going to ask for it after the migration was finished, ayway ;) |
Done now. On Fri, Jul 5, 2013 at 6:45 AM, Waldir Pimenta notifications@github.comwrote:
|
Thanks! I'll make sure to update it as soon as things are settled around here :) |
This has to be completed before June 19th, since SourceForge will be discontinuing the mediawiki hosting service on that date and migrating it to a new service. I don't know how much detail is preserved in the migration, e.g. page history. |
Ok, taking note of the date |
Update: I've just moved another bunch of pages, and edited the wiki a little (updated the main page, converted the "Documentation" page to the sidebar, since it was an index anyway, etc). Right now the only pages that still need to be moved are those of the Site class and its methods :) |
Ok, all pages have now been moved! 🎉 I included @jace's tutorial as well. @pfctdayelise's demo code was suggested here, but it's not really a tutorial, so I'm not sure it would either fit with the others, or be useful considering the rest of the documentation is quite comprehensive actually (thanks @DCoetzee!). @danmichaelo I'll open a new issue for discussing the setup of in-code documentation. |
Thanks for keeping those pages alive. |
The wiki currently lives here: http://sourceforge.net/apps/mediawiki/mwclient. It should be moved to https://github.com/btongminh/mwclient/wiki.
There are only 3 users with edits, so it's probably ok to just copy the pages here with a quick note about the original authors in the bottom, just like what was made with the issues from sourceforge.
If someone wants to investigate a way to convert a mediawiki wiki to a git repo (github wikis are git repositories), that would be nice as well, but just an extra, so don't sweat it :)
The text was updated successfully, but these errors were encountered: