Wikipedia:Bots/Requests for approval/WikiCleanerBot 22
[[User:WikiCleanerBot|WikiCleanerBot 22]]
{{BRFA help}}
{{Newbot|WikiCleanerBot|22}}
Operator: {{botop|NicoV}}
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: [https://github.com/WPCleaner/wpcleaner On GitHub] (especially [https://github.com/WPCleaner/wpcleaner/blob/master/WikipediaCleaner/src/org/wikipediacleaner/api/check/algorithm/CheckErrorAlgorithm534.java 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, [https://fr.wikipedia.org/w/index.php?title=Sp%C3%A9cial:Contributions/WikiCleanerBot&offset=20200927191300&target=WikiCleanerBot&limit=140 last run with 140 edits]. Examples of cases fixed:
- Extra "|", like [https://fr.wikipedia.org/w/index.php?title=Trieste&diff=prev&oldid=175089808 here]
- Error in the name of an option, like [https://fr.wikipedia.org/w/index.php?title=%C3%89quipe_de_France_masculine_de_squash&diff=prev&oldid=175089848 here] (in an other language), [https://fr.wikipedia.org/w/index.php?title=Wouri&diff=prev&oldid=175089828 here] (letter inversion)
- Doubled option, like [https://fr.wikipedia.org/w/index.php?title=Vi%C3%A0GrandParis&diff=prev&oldid=175089821 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)
- {{BotTrial|edits=50}} 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)
- : {{BotTrialComplete}} Thanks Primefac.
- :* [https://en.wikipedia.org/w/index.php?title=Special:Contributions/WikiCleanerBot&offset=20200930060800&target=WikiCleanerBot&limit=25 25 edits with my initial logic], no problem seen
- :* [https://github.com/WPCleaner/wpcleaner/commit/478b870d2578ba0d307923ff047b32f88e68acc5 I've added what I could easily do] from Jonesey95's logic, and ran my bot again on frwiki: [https://fr.wikipedia.org/w/index.php?title=Special:Contributions/WikiCleanerBot&offset=20200930063800&target=WikiCleanerBot&limit=3 3 edits]
- :* [https://en.wikipedia.org/w/index.php?title=Special:Contributions/WikiCleanerBot&offset=20200930065300&target=WikiCleanerBot&limit=25 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)
- ::::{{BotExtendedTrial|edits=100}} Go for it. Primefac (talk) 15:07, 2 October 2020 (UTC)
- ::::: {{BotTrialComplete}} Thanks Primefac and Jonesey95. [https://en.wikipedia.org/w/index.php?title=Special:Contributions/WikiCleanerBot&offset=20201002170800&target=WikiCleanerBot&limit=20 20]+[https://en.wikipedia.org/w/index.php?title=Special:Contributions/WikiCleanerBot&offset=20201002174200&target=WikiCleanerBot&limit=80 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 [https://en.wikipedia.org/w/index.php?title=Polish_Corridor&diff=prev&oldid=981497443 this one] (no Linter error in the initial version; very complex syntax, and the edit made things worse; best to skip it), [https://en.wikipedia.org/w/index.php?title=Piston&diff=prev&oldid=981497373#Hydraulic_cylinders this one] (border+thumb, thumb removed; Linter error present but not reported in the initial version), [https://en.wikipedia.org/w/index.php?title=Prometheus&diff=prev&oldid=981497005 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 [https://en.wikipedia.org/w/index.php?title=Chechnya&diff=prev&oldid=981492654#Prehistory this one] (same). These three latter errors are essentially the same error: removing "thumb" instead of "border".
- :::::::I have filed {{phab|T264464}} 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 [https://en.wikipedia.org/w/index.php?title=User:Jonesey95/sandbox&oldid=981508576 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 [https://github.com/WPCleaner/wpcleaner/commit/84f0db0d3331b9b0940f84f7717d65bac5bbaf1c 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 [https://en.wikipedia.org/w/index.php?title=Special:Contributions/WikiCleanerBot&offset=20201003085300&target=WikiCleanerBot&limit=25 25 more edits] with the modification on how border is handled. --NicoV (Talk on frwiki) 08:53, 3 October 2020 (UTC)
{{unindent}}
: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: [https://fr.wikipedia.org/w/index.php?title=Caral&diff=prev&oldid=175242784 Caral] (one border before thumb, one after), [https://fr.wikipedia.org/w/index.php?title=Breitenbach_(Bas-Rhin)&diff=prev&oldid=175242869 Breitenbach (Bas-Rhin)] (border before thumb), [https://fr.wikipedia.org/w/index.php?title=R%C3%A9gion_naturelle_de_France&diff=prev&oldid=175242882 Région naturelle de France] (border after thumb), [https://fr.wikipedia.org/w/index.php?title=Forces_arm%C3%A9es_bulgares&diff=prev&oldid=175242966 Forces armées bulgares] (border before thumb), [https://fr.wikipedia.org/w/index.php?title=Daniel_L%C3%A9vi&diff=prev&oldid=175243061 Daniel Lévi] (border after thumb), [https://fr.wikipedia.org/w/index.php?title=Conf%C3%A9d%C3%A9ration_europ%C3%A9enne_des_Junior-Entreprises&diff=prev&oldid=175243144 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)
::::{{U|Primefac}}, 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)
:::::{{BotApproved}} 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 Wikipedia:Bots/Noticeboard.