Wikipedia:Bots/Requests for approval/JJMC89 bot 10


 * The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA. The result of the discussion was Symbol_kept_vote.svg Approved

JJMC89 bot 10
Operator:

Time filed: 00:28, Monday, February 6, 2017 (UTC)

Automatic, Supervised, or Manual: Automatic

Programming language(s): Python

Source code available: Pending

Function overview: Correct coordinate parameter errors and warnings from the enwiki ghel report.

Links to relevant discussions (where appropriate): N/A

Edit period(s): Weekly

Estimated number of pages affected: ~17,000 initially; varies afterward

Exclusion compliant: Yes

Already has a bot flag: Yes

Function details: Correct coordinate parameter errors and warnings from the enwiki (alt view) ghel report.

Example regex inside a coord parameter value: Before saving changes, coordinate parameters are checked for possible errors. For example, the value for region against.
 * Too many colons: Replace:  &rarr; \1 (e.g. type:dim:1000 &rarr; dim:1000)
 * Missing colon: Remove:  (e.g. dim:1000_type &rarr; dim:1000)

Any error or warning that requires judgement (e.g. dim override) will be skipped.

Discussion

 * This request is very esoteric, and a short trial run to produce a demonstration of the changes should help illustrate it best for reviewers. — xaosflux  Talk 01:30, 6 February 2017 (UTC)
 * [ 25 edits] The first four correct 'too many colons' and the rest correct 'missing colon'. —&thinsp;JJMC89&thinsp; (T·C) 02:26, 6 February 2017 (UTC)
 * Thank you, please run a larger batch. — xaosflux  Talk 15:52, 12 February 2017 (UTC)
 * It made 20 extra edits: [ 520 edits] . —&thinsp;JJMC89&thinsp; (T·C) 21:23, 12 February 2017 (UTC)

Could you please list some examples in function details of what the correct syntax is and what the incorrect ones are, including what is meant by "separated by underscores"? Template:Coord explains almost nothing and took me some guessing to finally figure out the general syntax. But I'm having trouble verifying some of these. Something like type:type:landmark is obviously wrong. It's not obvious how type:region:IT is wrong -- is it "region" or "type" that should be removed? — HELL KNOWZ  ▎TALK 22:17, 23 February 2017 (UTC)
 * -- this change isn't listed in function details.
 * Coordinate parameters (type, scale, dim, region, globe, source) are specified in a single parameter (3, 5, 7, or 9) with each parameter separated by underscores (name1:value1_name2:value2). Similar to template parameters being separated by pipes   with name and value separated by equals (=), coordinates parameters are separated by underscores  (_) with name and value separated by colon  . Coordinates parameters cannot by empty.
 * #2 type is empty, and IT is the ISO 3166-1 alpha-2 country code for Italy.
 * #3 Should have been skipped. It is meant to remove the parameter if it is emptied after removing.
 * —&thinsp;JJMC89&thinsp; (T·C) 06:04, 24 February 2017 (UTC)
 * Let's say it had been type:region:river. Would the bot replace it with region:river or type:river? — HELL KNOWZ  ▎TALK 22:40, 24 February 2017 (UTC)
 * It should skip the page after attempting to change it to region:river since river would not match . —&thinsp;JJMC89&thinsp; (T·C) 04:44, 25 February 2017 (UTC)
 * So if it skips reasonably invalid values, why not add this to function details? As it stands, the task description does not distinguish valid/invalid values. The only exception appears to be country codes for region. Do you check other values listed in Coord? Is it likely that there are invalid ones? — HELL KNOWZ  ▎TALK 12:37, 26 February 2017 (UTC)
 * Only coordinate parameters are checked. There could be problems with other parameters; however, they should be visible on the page, and many would not be fixable by a bot. —&thinsp;JJMC89&thinsp; (T·C) 20:22, 26 February 2017 (UTC)

Looks good. Also, can you please update the bot to use more descriptive summaries (other tasks too, e.g. "Replace BSicon(s)"), ideally linking to the task description. — HELL KNOWZ  ▎TALK 12:16, 27 February 2017 (UTC)


 * The above discussion is preserved as an archive of the debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA.