Project:Pywikibot/Documentation RFC

February 2016

Based on the Lyon Hackathon discussion and some later IRC discussions, I have started to clean up the pywikibot manual. I have classified all current pages into five categories:

  • documentation on getting started and running an existing bot? Keep, but clean up
  • documentation on scripts: Move to Manual:Pywikibot/Scripts/ and update for core
  • compat-only page? Move to Manual:Pywikibot/Compat/ and document on Manual:Pywikibot/Compat (done)
  • discussion page? Move to Project: namespace, (done)
  • documentation on writing a bot? Move to doc.wm.o
  • documentation on contributing to pywikbot? Move to doc.wm.o


PAGE GETTING STARTED SCRIPTS COMPAT PWB: WRITING DEV / to repo
PywikibotX
Manual:Pywikibot/2.0
Manual:Pywikibot/2.0/Conversion
Manual:Pywikibot/2.0/login.py
Project:Pywikibot/2.0/Porting statusx
Manual:Pywikibot/2.0/Porting status/headerx
Manual:Pywikibot/2.0/Porting status/rowx
Manual:Pywikibot/add text.pyx
Manual:Pywikibot/archivebot.pyx
Manual:Pywikibot/archivebot.py/setupx
Manual:Pywikibot/articlenos.pyx
Manual:Pywikibot/Basic usex
Manual:Pywikibot/basic.pyx
Manual:Pywikibot/blockpageschecker.pyx
Manual:Pywikibot/casechecker.pyx
Manual:Pywikibot/catall.pyx
Manual:Pywikibot/category redirect.pyx
Manual:Pywikibot/category.pyx
Manual:Pywikibot/cfd.pyx
Manual:Pywikibot/checkimages.pyx
Manual:Pywikibot/claimit.pyx
Manual:Pywikibot/clean sandbox.pyx
Manual:Pywikibot/Code of conduct RFCx
Manual:Pywikibot/commons category redirect.py
Manual:Pywikibot/commons link.pyx
Manual:Pywikibot/commonscat.pyx
Manual:Pywikibot/Communicationxxx
Manual:Pywikibot/Compatx
Manual:Pywikibot/Compat deprecationx
Manual:Pywikibot/coordinate import.pyx
Manual:Pywikibot/copyright.pyx
Manual:Pywikibot/cosmetic changes.pyx
Manual:Pywikibot/create categories.pyx
Manual:Pywikibot/Create your own scriptx
Manual:Pywikibot/delete.pyx
Manual:Pywikibot/delinker.pyx
Manual:Pywikibot/Developmentx
Manual:Pywikibot/Development guidelinesx
Manual:Pywikibot/disambredir.pyx
Manual:Pywikibot/djvutext.pyx
Manual:Pywikibot/Documentation RFCx
Manual:Pywikibot/editarticle.pyx
Manual:Pywikibot/featured.py
Manual:Pywikibot/fixes.pyx
Manual:Pywikibot/fixing redirects.pyx
Manual:Pywikibot/flickrripper.pyx
Manual:Pywikibot/Flowx
Manual:Pywikibot/freebasemappingupload.pyx
Manual:Pywikibot/Generate user files.pyx
Manual:Pywikibot/Gerritx
Manual:Pywikibot/Global Optionsx
Manual:Pywikibot/harvest template.pyx
Manual:Pywikibot/Historyx
Manual:Pywikibot/i18nx
Manual:Pywikibot/i18n conversionx
Manual:Pywikibot/i18n progressx
Manual:Pywikibot/illustrate wikidata.pyx
Manual:Pywikibot/image.pyx
Manual:Pywikibot/imagecopy.pyx
Manual:Pywikibot/imageharvest.pyx
Manual:Pywikibot/imagerecat.pyx
Manual:Pywikibot/imagetransfer.pyx
Manual:Pywikibot/imageuncat.pyx
Manual:Pywikibot/Installationx
Manual:Pywikibot/Installation/compatx
Manual:Pywikibot/Installation/Labsredirect to TL docs
Manual:Pywikibot/Installation/SVNx
Manual:Pywikibot/interwiki.pyx
Manual:Pywikibot/interwiki.py/Phabricator Projectx
Manual:Pywikibot/interwiki.py/Wiktionary functionality discussionx
Manual:Pywikibot/interwiki.py/Wiktionary functionality discussion/2007x
Manual:Pywikibot/isbn.pyx
Manual:Pywikibot/listpages.pyx
Manual:Pywikibot/login.pyx
Manual:Pywikibot/lonelypages.pyx
Manual:Pywikibot/maintainer.pyx
Manual:Pywikibot/maintcont.pyx
Manual:Pywikibot/makecat.pyx
Manual:Pywikibot/Migrating to bugzillax
Manual:Pywikibot/misspelling.pyx
Manual:Pywikibot/movepages.pyx
Manual:Pywikibot/newitem.pyx
Manual:Pywikibot/noreferences.pyx
Manual:Pywikibot/nowcommons.pyx
Manual:Pywikibot/OAuthx
Manual:Pywikibot/Overview
Manual:Pywikibot/pagefromfile.pyx
Manual:Pywikibot/pagegenerators.pyx
Manual:Pywikibot/panoramiopicker.pyx
Manual:Pywikibot/PAWSx
Manual:Pywikibot/picasacopier.pyx
Manual:Pywikibot/protect.pyx
Manual:Pywikibot/pwb.pyx
Manual:Pywikibot/query.pyx
Manual:Pywikibot/rciw.pyx
Manual:Pywikibot/Recipesx
Manual:Pywikibot/redirect.pyx
Manual:Pywikibot/reflinks.pyx
Manual:Pywikibot/replace.pyx
Manual:Pywikibot/replicate wiki.pyx
Manual:Pywikibot/revertbot.pyx
Manual:Pywikibot/Scriptsx
Manual:Pywikibot/selflink.pyx
Manual:Pywikibot/solve disambiguation.pyx
Manual:Pywikibot/spamremove.pyx
Manual:Pywikibot/speedy delete.pyx
Manual:Pywikibot/standardize interwiki.pyx
Manual:Pywikibot/standardize notes.pyx
Manual:Pywikibot/Survey2012x
Manual:Pywikibot/table2wiki.pyx
Manual:Pywikibot/template.pyx
Manual:Pywikibot/templatecount.pyx
Manual:Pywikibot/Test coveragex
Manual:Pywikibot/Third-party Wiki Quick Startx
Manual:Pywikibot/touch.pyx
Manual:Pywikibot/transferbot.pyx
Manual:Pywikibot/unusedfiles.pyx
Manual:Pywikibot/upload.pyx
Manual:Pywikibot/User-agentxx
Manual:Pywikibot/user-config.pyx
Manual:Pywikibot/user-fixes.pyx
Manual:Pywikibot/Version tablex
Manual:Pywikibot/version.pyx
Manual:Pywikibot/warnfile.pyx
Manual:Pywikibot/watchlist.pyx
Manual:Pywikibot/weblinkchecker.pyx
Manual:Pywikibot/welcome.pyx
Manual:Pywikibot/Wikidata
Manual:Pywikibot/Wikidata/compatx
Manual:Pywikibot/Wikidata/Rewrite proposalx
Manual:Pywikibot/wikilogbot.pyx
Manual:Pywikibot/wikipedia.py/docx
Manual:Pywikibot/Windowsx

Conclusion from Lyon Hackathon discussion

See https://etherpad.wikimedia.org/p/Pywikibot_doc_sprint / https://phabricator.wikimedia.org/T100109#1306324



pywikibot documentation

This is an initial braindump on issues with the current pywikibot documentation and possible solutions, by Valhallasw (talk) 19:49, 20 May 2014 (UTC).


Current issues

  1. The documentation is spread out. There is the documentation here on mw.org, but also documentation on basically every Wikipedia (e.g. nl:Help:Gebruik_van_bots), every wikibook and even on wikiversity. Then there's also botwiki: and various guides on wikia. There should be only one authoritative and comprehensive place for users to go for help.
  2. The documentation is outdated. The wikia links above are the worst (Python 2.3 and CVS), but even more recent documentation is only valid for compat, and often documentation does not clarify for which version it was written. The documentation is rarely updated by developers.
  3. The documentation lacks structure. This is, of course, a direct result of the wiki structure. People add a page to write down what they did, instead of trying to merge it into the central documentation, or they add documentation in a section it doesn't really belong.
  4. There is no API documentation

The good things

There are also some things awesome with the current documentation:

  1. It's really easy to contribute: anyone with an mw.org account can edit/improve a page;
  2. Documentation can be translated relatively easily (which is important)
  3. Documentation is in a sensible location -- the same place as MediaWiki documentation.

What can we do?

To tackle the 'bad' points mentioned above, I think there are a few things we should get:

  1. Curation: developers need to take an active role in curating content added to the documentation by others (spread out; outdated; structure)
  2. Developers need to take an active role in keeping documentation up to date (spread out; outdated)
  3. Some sort of automated documentation generation (outdated; API docs)

However, we should do that without losing the good points mentioned above.

Options

A few possible options:

CurationActive updatingAuto-docsEasy contributionTranslationsLocationAvailability
Status quo

(docs on mw.org)

Oppose Negative

No active review possible (Flaggedrevs has been disabled)

Oppose Negative

Outside the normal developer workflow and therefore hard to enforce.

Neutral Neutral- Positive

Possible with bots

Positive

SUL login; familiar syntax and interface

Positive

Built-in

Positive

mw.org

Positive

status quo

Sphinx

(docs on docs.mw.org or readthedocs)

Positive

Changes pass through Gerrit

Positive

Changes pass through Gerrit, so patches can be held for merge until documentation is added.

Positive

sphinx-autodoc can create documentation from code docstrings

Oppose Negative

Needs git; uses ReStructuredText instead of wikitext; previewing is difficult (needs local installation)

Oppose Negative

Sphinx does support it via .po files, but these also would need updating. Maybe possible via translatewiki?

Neutral Neutral

docs.mw.org is hard to find; readthedocs is used a lot for python apps, so good from the framework perspective

Neutral Neutral

initial attempt in Gerrit

Hybrid (A)

Documentation in git, exported to (locked) pages on wiki

Positive

Changes pass through Gerrit

Positive

Changes pass through Gerrit, so patches can be held for merge until documentation is added.

Neutral Neutral-Oppose Negative

Full doc-gen to mediawiki is difficult: sphinx has no MW output and sphinx.autodoc is hard to use outside of sphinx

Oppose Negative

Needs git; previewing is difficult (probably would need to edit on-wiki, then copy-paste to editor?); wikitext is familiar.

Positive

On mw.org

Positive

mw.org

Neutral Neutral-Oppose Negative

needs a dump of Help:Pywikibot/* pages to text files & a bot/jenkins job to update pages on-wiki

Hybrid (B)

Documentation in git, but with a wiki-to-git bridge.

Positive

Changes pass through Gerrit

Positive

Changes pass through Gerrit, so patches can be held for merge until documentation is added.

Neutral Neutral- Positive

Should be possible through jenkins, maybe with some sphinx-autodoc help?

Positive

No git necessary; previewing is easy (built-in!), wikitext is familiar

Positive

On mw.org

Positive

mw.org

Oppose Negative

needs a dump of Help:Pywikibot/* pages to text files, a bot/jenkins job to update pages on-wiki as well as some way to move wiki edits to git

Suggestions from pywikibot gold-standard evaluation

As a part of the gold standard evaluation for pywikibot, I identified several documentation-related issues: API:Client code/Evaluations/Pywikibot#Suggested TODOs. --Fhocutt (talk) 19:07, 25 July 2014 (UTC)

Changes that would improve the documentation include:

  • Add code samples to the documentation to provide easy-to-use examples for common tasks (including queries/lists/searches and edits)
  • Add easy-to-find, complete, and intuitive installation instructions to the documentation. This should include installation via pip (https://bugzilla.wikimedia.org/show_bug.cgi?id=65176) and into virtual environments (https://bugzilla.wikimedia.org/show_bug.cgi?id=61783).
  • Add documentation for people who aren't running bots with existing scripts (particularly researchers who extract data via the API and beginning/intermediate bot writers).
  • Method docstrings should include a link to the corresponding mw:API subpage.
Category:Pywikibot archive#rfc%20documentation
Category:Pywikibot archive