Analytics/Wikimetrics/FAQ

This is the frequently asked questions page for Wikimetrics.

What is the project code?
The WMF has a lot of different projects, see the site matrix for a complete overview. To construct the code:
 * For Wikipedia it's just the language code (for example en)
 * For Commons it's commons
 * For chapters it's ....
 * For mediawiki it's ....
 * For wikibooks it's ....
 * For wikidata it's ....
 * For wikimania it's ....
 * For wikinews it's ....
 * For wikiquote it's ....
 * For wikisource it's ....
 * For wikispecies it's ....
 * For wikiversity it's ....
 * For wikivoyage it's ....
 * For wiktionary it's ....

Where is the source code?
https://git.wikimedia.org/log/analytics%2Fwikimetrics/HEAD and https://github.com/wikimedia/analytics-wikimetrics

Where is the data coming from?
Wikimetrics uses the copy of the WMF databases at Wikimedia Labs.

On vagrant: Tests work fine when I run all of them but fail when I just run just one. What is going on?
nosetest is not executing properly tests that are two levels deep from main tests directory. Make sure your test is located only one level deep, for example the following would be executed properly:

/vagrant/wikimetrics/tests/some-directory/your-test.py

But the following would not: /vagrant/wikimetrics/tests/some-directory/some-deeper-directory/your-test.py

This is a bug with nosetest, it is similar, although not identical, to this one: https://code.google.com/p/python-nose/issues/detail?id=342

Looks like it was fixed in some python 2.7.* release, we are running 2.7.3 in vagrant. Things seem to work in 2.7.5

Guide
https://www.mediawiki.org/wiki/UserMetrics/Guide