User:DWalden (WMF)/SimilarEditors
Testing done
edit- High volume automation
- The test data has a relatively small number of usernames/IPs it knows about (we can extract them with this script)
- We can submit to Special:SimilarEditors via a Pywikibot script with this script
- We can extract data from the Similarusers service (with this script) and from the MediaWiki debug logs (with this script)
- This data can be merged together for easier analysis (with this script)
- Examples of using this technique:
Testing not done
edit- Accuracy of Similarusers service
- We don't have something that is functionally equivalent to do a direct comparison against
- The test data is incomplete and not internally consistent, so cannot use consistency oracles
Test Environments
editBeta
edit- You will need a user in the Check users group on https://en.wikipedia.beta.wmflabs.org
- Visit https://en.wikipedia.beta.wmflabs.org/wiki/Special:SimilarEditors
Locally
editHow to install locally:
1. In the directory of your mediawiki repository:
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/EventLogging extensions/EventLogging
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/QuickSurveys extensions/QuickSurveys
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/SimilarEditors extensions/SimilarEditors
2. Add this to your LocalSettings.php
:
wfLoadExtension( 'EventLogging' );
wfLoadExtension( 'QuickSurveys' );
wfLoadExtension( 'SimilarEditors' );
$wgGroupPermissions['similar-editors']['similareditors'] = true;
$wgQuickSurveysConfig = [
'similareditors' => [
// T307025
'name' => 'similareditors',
'type' => 'internal',
'layout' => 'single-answer',
'answers' => [],
// Ensures a text input is added
'freeformTextLabel' => 'similareditors-survey-freeform-text-label',
'question' => 'similareditors-survey-question',
'privacyPolicy' => 'ext-quicksurveys-example-external-survey-privacy-policy',
'enabled' => true,
'platforms' => [
'desktop' => [ 'stable' ],
'mobile' => [ 'stable' ]
],
'audience' => [
// This prevents audience being checked on every page.
// However, we must still load quicksurveys manually on
// Special:SimilarEditors, because automatic loading only
// works for page IDs of pages that exist (not special pages).
// 0 matches the page ID check for Special:SimilarEditors.
'pageIds' => [ 0 ],
],
// Ensures the correct survey is added if multiple are enabled
'embedElementId' => 'similareditors-survey-embed',
'coverage' => 1,
],
];
3a. If you use docker:
docker-compose up -d
docker-compose exec mediawiki composer update
docker-compose exec mediawiki php maintenance/update.php --quick
3b. If you don't use docker:
composer update
php maintenance/update.php --quick
4. Go to Special:UserRights/<username>
and add yourself to the similar-editors
group.
5. Go to Special:SimilarEditors
.