User talk:Omegat/Project Proposal for OPW

Hello, nice to see your patches. I'm not a pywikibot maintainer, so I'll wait for your microtasks to be completed (e.g. for the patches to be merged) before evaluating your proposal. In the meanwhile, if you don't know how to make progress and increase your chances to be accepted, I'd be very happy if you worked on getting 167831 merged, i.e. on getting 168084 merged: you could start by checking out that patch and testing it on some wikis, make some changes and submit your amended version (see also Git/Tutorial). --Nemo 08:29, 30 October 2014 (UTC)

ReutersWiki
The ReutersWiki patch needs to be cleaned up, so that the family file looks like other family files. It may not be merged, until there is basic support for v1.11, but that doesnt matter. John Vandenberg (talk) 23:28, 30 October 2014 (UTC)

All pages descending
One of the tests which fail for v1.11 is reading API:Allpages in descending order.

https://gerrit.wikimedia.org/r/#/c/168084/2/tests/site_tests.py,cm "mysite.allpages(reverse=True, start="Aa", total=12)"

First lets look at how it works on this wiki.
 * Ascending order: https://www.mediawiki.org/w/api.php?action=query&generator=allpages
 * Ascending order from B: https://www.mediawiki.org/w/api.php?action=query&generator=allpages&gapfrom=B
 * Descending order: https://www.mediawiki.org/w/api.php?action=query&generator=allpages&gapfrom=B&gapdir=descending


 * Ascending order: http://glossary.reuters.com/api.php?action=query&generator=allpages
 * Ascending order from B: http://glossary.reuters.com/api.php?action=query&generator=allpages&gapfrom=B
 * Descending order: http://glossary.reuters.com/api.php?action=query&generator=allpages&gapfrom=B&gapdir=descending

We can see it does not work on 1.11, but it may also not work in 1.12 or 1.13, etc. We need to know which versions can not use this functionality, so we can raise an appropriate exception for all versions that dont support it.

API:Allpages says the 'all pages' component of the API was added in version 1.8, but it doesnt say when 'apdir'/gapdir was added to the API.

One way to determine which versions support a feature is to test it on a live wiki for that version. e.g. find a mediawiki site running version 1.12 on https://wikiapiary.com/wiki/Generator:MediaWiki_1.12.x, and access its API, and then one running 1.13 from this list https://wikiapiary.com/wiki/Generator:MediaWiki_1.13.x, and access its API. To access those API's, you might set up a family file for each, and run the allpages tests on each site. Or you can query the API using URLs, like I did above. John Vandenberg (talk) 23:28, 30 October 2014 (UTC)



Hmm. Maybe more analysis is needed. API:Allpages now says that apdir was added in 1.12, but I believe that using 'from' and 'dir' combined is problematic in 1.12, but it appears to have been fixed in 1.13 according to MediaWiki 1.13. See this bug originally raised by a pywikibot developer: https://old-bugzilla.wikimedia.org/show_bug.cgi?id=13993. John Vandenberg (talk) 02:45, 11 December 2014 (UTC)

Allusers problem
In https://gerrit.wikimedia.org/r/#/c/168084/2/tests/site_tests.py,cm, you will see I have commented out the following several times.

self.assertIn("registration", user)

API:Allusers doesnt indicate when 'registration' was added to the API, so again we need to try various versions to determine when it was added. Somewhere between those versions is the version it was added, which we need to know in order to change the test when the site doesnt support this feature. John Vandenberg (talk) 16:05, 27 November 2014 (UTC)
 * It fails for 1.11 : http://glossary.reuters.com/api.php?action=query&list=allusers&auprop=registration&format=jsonfm
 * It works for 1.16 : http://theaquariumwiki.com/api.php?action=query&list=allusers&auprop=registration&format=jsonfm



Next task: helping a real bug
See https://phabricator.wikimedia.org/T67981#703948, we need to know which MediaWiki version supports 'cmtype'. John Vandenberg (talk) 09:52, 30 November 2014 (UTC)