Some of the WBQC tests use the JsonFileEntityLookup class to load test data from Q….json files in the test directory. This bloats the repository (the JSON files are usually verbose, and much longer than a NewItem version with the same important parts) and makes the tests unreadable (you have to peruse the Q5.json file to understand the properties of the Q5 entity referenced in test code). For new tests, we’ve instead been using the NewItem and NewStatement builders from some time, and some existing tests have been migrated to that as well; we should finish that migration and get rid of JsonFileEntityLookup completely.
Description
Details
Related Objects
Event Timeline
Been on the campsite since the end of 2018 but not picked up any further.
This ticket is basically "Ready to go" so maybe we should but it there?
But also this is low impact in the grand schema of things, so perhaps we should hold off on that.
Also low cost, and could be a good candidate for a volunteer, or an on boarding task?
Change 521557 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Stop using JsonFileEntityLookup in ConnectionChecker tests
Change 521557 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Stop using JsonFileEntityLookup in ConnectionChecker tests
Change 615858 had a related patch set uploaded (by Reedy; owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@REL1_31] Stop using JsonFileEntityLookup in ConnectionChecker tests
Change 615858 merged by Reedy:
[mediawiki/extensions/WikibaseQualityConstraints@REL1_31] Stop using JsonFileEntityLookup in ConnectionChecker tests
$ find tests/ -name '*.json' | wc -l 16 $ git grep JsonFileEntityLookup tests/ | wc -l 14
Not done yet.
Prio Notes:
- Does not affect end users / production
- Affects development efforts
- Does not affect onboarding efforts
- Does not affect additional stakeholders
Change 876195 had a related patch set uploaded (by Noa wmde; author: Noa wmde):
[mediawiki/extensions/WikibaseQualityConstraints@master] Stop using JsonFileEntityLookup in CheckerHelper tests
Change 876195 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Stop using JsonFileEntityLookup in TypeChecker tests
I think that was the last use of JsonFileEntityLookup \o/
Left to do:
- Remove the class itself, as well as its mention in the README
- Remove the unused JSON files
Change 881575 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Remove JsonFileEntityLookup
Change 881582 had a related patch set uploaded (by Noa wmde; author: Noa wmde):
[mediawiki/extensions/WikibaseQualityConstraints@master] Remove redundant JSON files used for PHPunit tests
Change 881582 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Remove redundant JSON files used for PHPunit tests
Change 881575 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Remove JsonFileEntityLookup