Wikipedia:Bots/Requests for approval/WikiCleanerBot 22


 * The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at Bots/Noticeboard. The result of the discussion was

WikiCleanerBot 22
Operator:

Time filed: 21:28, Sunday, September 27, 2020 (UTC)

Function overview: Fix some occurrences of Special:LintErrors/bogus-image-options

Automatic, Supervised, or Manual: Automatic

Programming language(s): Java (WPCleaner)

Source code available: On GitHub (especially algorithm 534)

Links to relevant discussions (where appropriate):

Edit period(s): Twice a month

Estimated number of pages affected: Currently, Special:LintErrors/bogus-image-options contains 7342 pages. A dry run on this list resulted in 2399 pages modified.

Namespace(s): Main

Exclusion compliant (Yes/No): Yes

Function details: The bot will fix some cases of Special:LintErrors/bogus-image-options. I already ran this task on frWP, last run with 140 edits. Examples of cases fixed:
 * Extra "|", like here
 * Error in the name of an option, like here (in an other language), here (letter inversion)
 * Doubled option, like here

Discussion

 * Comment: I have a large number of patterns in User:Jonesey95/AutoEd/doi.js, in the section headed "Bogus file options". You are welcome to copy those patterns for your bot. Thank you for setting up this bot! – Jonesey95 (talk) 16:13, 28 September 2020 (UTC)
 * Thanks Jonesey95. I will first run my bot as it is, and add some of your patterns to the bot. --NicoV (Talk on frwiki) 05:40, 29 September 2020 (UTC)
 * Please run 25 with your logic, and 25 after adding any parts of Jonesey95's logic that you feel would be beneficial. Primefac (talk) 21:58, 29 September 2020 (UTC)
 * Thanks Primefac.
 * 25 edits with my initial logic, no problem seen
 * I've added what I could easily do from Jonesey95's logic, and ran my bot again on frwiki: 3 edits
 * 25 edits with the added logic, no problem seen
 * --NicoV (Talk on frwiki) 06:51, 30 September 2020 (UTC)
 * I checked all of the above edits, and they all appeared to be valid. I would like to see another 100 test edits on a random sample from the list. At least half of the 50 listed above were essentially identical since they were from the top of the alphabetical listing, limiting the usefulness of the test. – Jonesey95 (talk) 19:28, 30 September 2020 (UTC)
 * Hi Jonesey95. No problem for me for running another test, with random order (by parsing the dump file). Just waiting for the go from a BAG member I think. --NicoV (Talk on frwiki) 20:07, 30 September 2020 (UTC)
 * Go for it. Primefac (talk) 15:07, 2 October 2020 (UTC)
 * Thanks Primefac and Jonesey95. 20+80 edits, and no problem for me.--NicoV (Talk on frwiki) 17:45, 2 October 2020 (UTC)
 * Jonesey95. I don't understand why you revert some edits... . Ok, I followed the documentation in mw:Help:Images, "Format option: one of border and/or frameless, frame, thumb (or thumbnail). If multiple of these options are present, only the first one will be used;". And that doesn't seem to work in all situations... --NicoV (Talk on frwiki) 18:34, 2 October 2020 (UTC)
 * (edit conflict) I inspected all of the edits. They all looked fine except this one (no Linter error in the initial version; very complex syntax, and the edit made things worse; best to skip it), this one (border+thumb, thumb removed; Linter error present but not reported in the initial version), this one (thumb removed; there was no reported Linter error in the initial version; the error "border+thumb" should probably be converted to "thumb", not "border"), and this one (same). These three latter errors are essentially the same error: removing "thumb" instead of "border".
 * I have filed to ask for a Linter error to be displayed when conflicting border/frame/thumb options are present. I think that when multiple of these options are present, the "border" option should always be removed, since frame and thumb/thumbnail both show the caption, which most people want.
 * If the bot's regex to remove "thumb" can be fixed or commented out, and the first error can be addressed, I think it is ready to go. Nice work! – Jonesey95 (talk) 18:56, 2 October 2020 (UTC)
 * The documentation at Help:Images was wrong. See this version of my sandbox, which shows that frame/thumb overrides border, even if border is listed first. If border is present along with thumb, thumbnail, or frame, please have the bot remove border, which will preserve the existing rendering. – Jonesey95 (talk) 19:05, 2 October 2020 (UTC)
 * Hi Jonesey95. I think all the errors are in fact the same problem: border before frame or thumb. My bot behavior was based on mw:Help:Images, which is incorrect: I agree with you that the correct solution should be to remove border even if it's listed before. With this modification in my code, WPCleaner removes border even if it's before frame/thumb in Chechnya, Polish Corridor, Piston, Prometheus, Mel Brooks and the image is correctly displayed. What do you think? --NicoV (Talk on frwiki) 07:48, 3 October 2020 (UTC)
 * Hi Jonesey95 and Primefac. I took the liberty to run my bot again for 25 more edits with the modification on how border is handled. --NicoV (Talk on frwiki) 08:53, 3 October 2020 (UTC)


 * And given that we found that Special:LintErrors/bogus-image-options is missing a lot of errors, I'm running my bot on frwiki directly on the last dump to see what modifications are applied (edit comment "Options de fichier factices"). I will post results here --NicoV (Talk on frwiki) 07:53, 3 October 2020 (UTC)
 * A few examples with border: Caral (one border before thumb, one after), Breitenbach (Bas-Rhin) (border before thumb), Région naturelle de France (border after thumb), Forces armées bulgares (border before thumb), Daniel Lévi (border after thumb), Confédération européenne des Junior-Entreprises (border before thumb). --NicoV (Talk on frwiki) 08:18, 3 October 2020 (UTC)
 * I agree that all of the errors I pointed out above were the same error (border before frame or thumb), and the new code appears to have fixed the problem. I think this bot is ready to get to work (note that I am not a BAG member).
 * In case you haven't seen it, I have updated mw:Help:Lint errors/bogus-image-options with links to missing Linter errors that you might be able to detect and fix. I see that your code already fixes some of them, like changing "Left" to "left". – Jonesey95 (talk) 14:10, 3 October 2020 (UTC)
 * , if you have a minute, everything is resolved here, I am pretty sure, and this bot is ready to go. – Jonesey95 (talk) 00:28, 6 October 2020 (UTC)
 * Primefac (talk) 17:28, 7 October 2020 (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 Bots/Noticeboard.
 * 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 Bots/Noticeboard.