RangeChecker and DiffWithinRange checker need to account for units. Hopefully, it won’t be too hard to calculate and return the normalized value (which we already have for the query service) in RangeCheckerHelper.
Description
Details
Event Timeline
Hm, what happens if any values can’t be converted to standard units? Perhaps we can just compare the raw quantities in that case (as before), and assume that most properties would also have a Units constraints which would report this case instead.
Change 352162 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Convert quantities to standard units
Copying this comment from Gerrit so it doesn’t get buried:
There’s one remaining problem [with Change Ic5dee62c01, PS12]: While the conversion of units in “difference within range” is very nice in theory (at least, IMHO :) ), it doesn’t really work on Wikidata. There are only three “difference within range” constraints on Wikidata, and they all use the unit “year” (Q577), which doesn’t have a standard unit conversion. We might have to make “year” a special case, where we really just count the full years between two dates.
Change 382204 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Add support for “year” ranges
Change 352162 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Convert quantities to standard units
Change 382204 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Add support for “year” ranges