Wikipedia:Bots/Requests for approval/DeprecatedFixerBot 2


 * 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

DeprecatedFixerBot 2
Operator:

Time filed: 16:40, Wednesday, March 14, 2018 (UTC)

Automatic, Supervised, or Manual: automatic

Programming language(s): Python

Source code available: https://github.com/TheSandDoctor/DivCol-ColumnsList-Fix

Function overview: Remove deprecated parameters from both Template:Columns-list and Template:Div col transclusions, as found in Category:Pages using Columns-list with deprecated parameters and Category:Pages using div col with deprecated parameters

Links to relevant discussions (where appropriate): Template talk:Div col

Edit period(s): Routine runs until categories are cleared, possible maintenance runs in future

Estimated number of pages affected: 57,000+

Exclusion compliant (Yes/No): Yes

Already has a bot flag (Yes/No): Yes

Function details: The bot would run through one category at a run in a series of subsequent runs.

As described in the linked discussion, (etc. for other redirects)
 * 1) 1 &rarr;
 * 2) 2 &rarr;
 * 3) 3 &rarr;
 * 4) 4 &rarr;
 * 1) 4 (or cols=3) &rarr;
 * 2) 4 (or cols=4) &rarr;
 * 3) 4 (or cols=5) &rarr;
 * 4) 4 (or cols=6) &rarr;
 * 5) 4 (or cols=7+) &rarr;  (any number of columns 7 or higher)
 * 6) 5 {{Columns-list|2| &rarr; {{Columns-list|colwidth=30em| (while we're here; also do for all redirects to this one)
 * 7) 5 {{Columns-list|3| &rarr; {{Columns-list|colwidth=22em| (and etc. as below)
 * 8) 6 {{div col||([0-9]em)}} &rarr; {{div col|colwidth=$1}}
 * 9) 7 {{div col|([0-9]em)}} &rarr; {{div col|colwidth=$1}} (as currently coded, this is an error, but fixable)
 * 10) 8 {{colend}} &rarr; {{div col end}} (replace all end template redirects with div col end)

If the bot finds the first unnamed parameter, it assesses its value. If the value is less than 2 (1), then it removes that parameter so the template is set to its default value. If the value is between 2 and 6, it changes as shown above. If the value is 7 or greater, then the bot changes the value to 10em.

In offline tests (printing both input and output to individual local files on a random few), it worked as expected.

Discussion

 * If you would like a dry run with outputted files put in the GitHub repository, I would certainly be open to doing that. --TheSandDoctor (talk) 16:48, 14 March 2018 (UTC)

Per WP:BOTACC "The account's name should identify the bot function (e.g. Bot), or the operator's main account (e.g. Bot)." I would find it extremely confusing if a Twitter-related bot started to do div-related changes. We need either a new bot account, or a rename of the existing bot account (such as TheSandDoctor's Bot / TheSandDoctorBot or similar). This also applies to Bots/Requests for approval/TweetCiteBot 2. Headbomb {t · c · p · b} 21:33, 17 March 2018 (UTC)
 * Moved task from TweetCiteBot to DeprecatedFixerBot. --TheSandDoctor (talk) 21:59, 17 March 2018 (UTC)
 * BAGAssistanceNeeded -- The SandDoctor Talk 16:41, 21 March 2018 (UTC)

I'm a bit concerned this could fall under WP:CONTEXTBOT. I can conceive of cases where exactly two or exactly three columns is what is meant, rather than a more lax "well on my screen, 3 columns looks nicer so let's go with that". You might argue that those should be done with different templates, but how would the bot deal with something like say


 * Team A
 * Alice
 * Bob
 * Charles
 * Team B
 * Denver
 * Emily
 * Fiona
 * Team C
 * Gilligan
 * Hector
 * Ines

Headbomb {t · c · p · b} 17:08, 21 March 2018 (UTC)
 * It would just remove "cols" and use the default, nothing would visibly change (aside from a slight shift left on my screen at least, but barely noticeable).


 * Team A
 * Alice
 * Bob
 * Charles
 * Team B
 * Denver
 * Emily
 * Fiona
 * Team C
 * Gilligan
 * Hector
 * Ines


 * Like that. -- The SandDoctor Talk 17:23, 21 March 2018 (UTC)
 * What about the 3 column output then (updated my example)? Also this seems to contradict the listed logic " &rarr;   " Headbomb {t · c · p · b} 17:53, 21 March 2018 (UTC)
 * , please read the linked discussion above. Specifying a number of columns is deprecated behavior, for the same reason that the behavior was deprecated (and removed) in reflist. This is just a continuation of that work. – Jonesey95 (talk) 18:16, 21 March 2018 (UTC)
 * I agree it's deprecated, what IOwant to know is how the bot deals with when this is intended behaviour and either screws up with that intended behaviour, or how it avoids screwing up with that intended behaviour. The discussion offers no insight on this. Headbomb {t · c · p · b} 19:12, 21 March 2018 (UTC)
 * It would look like this


 * Team A
 * Alice
 * Bob
 * Charles
 * Team B
 * Denver
 * Emily
 * Fiona
 * Team C
 * Gilligan
 * Hector
 * Ines


 * I was hesitant in responding until I figured out the issue. For some reason, when I previously set colwidth to 22em, it just gave a vertical list, yet now it posts normally. Clearly I did something wrong. Either way, works now? (cc -- The SandDoctor Talk 18:20, 21 March 2018 (UTC)
 * Also, sorry about the contradictions, they have now been resolved. -- The SandDoctor Talk 18:21, 21 March 2018 (UTC)

So what's the plan for avoiding the issue of screwing up intentionally specific column numbers? Or dealing with screwups when they happen? Headbomb {t · c · p · b} 19:09, 21 March 2018 (UTC) You mean 10 times the number of "types" specified in the original list in nomination, correct? -- The SandDoctor Talk 01:04, 22 March 2018 (UTC)
 * Can you please clarify what a "screwup" would look like? If you mean converting "cols=2" to "colwidth=30em", that is not a screwup, that is the consensus of the editors at the linked discussion. Specifying a fixed number of columns using the div col template is deprecated behavior (see the template's documentation) that is being removed. Since there are 40,000 articles that use deprecated parameters in the template, a bot is the least disruptive way to make that change. – Jonesey95 (talk) 20:20, 21 March 2018 (UTC)
 * I've already clarified above with the 3 column example above. The 3 columns in that case would be intentional, and it is not something that converted to 22em because it screws up the intended layout (zoom in/out of the page to see that it's messed up). So the question is how does the bot plan on either a) avoiding those sort of edits or b) providing a way for editors to restore the fixed-column format when it was intended / is desired, without the bot edit-warring with them over and over. Headbomb {t · c · p · b} 20:39, 21 March 2018 (UTC)
 * Thank you. The example was not clear to me, because the "after the bot" example used div col without any parameters, which is not how the bot will work. I have added colwidth=22em to the "after" example, and the columns look the same to me on my normal-sized screen.
 * I see what you mean about zooming in and out, but that is the best compromise. The cols=3 format fails on mobile (it displays only one column), so it is already broken. It has been deprecated for four years for this and other reasons, so editors have had plenty of time to make other choices. Changing to use colwidth makes div col work better on a wider variety of devices. If people want fixed columns, they need to use one of the other templates listed in the See also section of the documentation. – Jonesey95 (talk) 20:52, 21 March 2018 (UTC)
 * Then the bot should point to that documentation, either with instructions on the bot page on what to do when the bot touches something people don't want touched, similar to this, or with an edit summary link to the documentation which points to the templates people can use to create fixed columns. Or both. Headbomb {t · c · p · b} 21:02, 21 March 2018 (UTC)
 * Good idea. I have updated the template documentation to clarify how to get a fixed number of columns. The bot's edit summary should contain a link to the template. – Jonesey95 (talk) 21:15, 21 March 2018 (UTC)
 * That works for me. The edit summary should specifically point to Template:Div col as a resource link for editors. Headbomb {t · c · p · b} 21:21, 21 March 2018 (UTC)
 * Could you please clarify "type"? Pages with 1-10 as the cols parameter or? -- The SandDoctor Talk 00:30, 22 March 2018 (UTC)
 * Could you please clarify "type"? Pages with 1-10 as the cols parameter or? -- The SandDoctor Talk 00:30, 22 March 2018 (UTC)

Done. I've numbered the 'types' in the original description. Anything with the same # is the same 'type'. Headbomb {t · c · p · b} 01:06, 22 March 2018 (UTC)
 * Thanks . Would it be okay if I (or you or anyone else) set up these situations in a sandbox and just had the bot run over that? It would be simpler/easier and quicker to do. -- The SandDoctor Talk 02:08, 22 March 2018 (UTC)
 * Sure. But after you've done sandbox testing, do 50 random edits in mainspace. What's in the wild is often not as we expect it to be. Headbomb {t · c · p · b} 02:26, 22 March 2018 (UTC)
 * Sandbox test done. I don't think I missed any. If you are happy with that, then I will do the 50 random articles. (If you aren't, bot can easily be tweaked and re-run on sandbox) -- The SandDoctor Talk 03:24, 22 March 2018 (UTC)
 * sure, go to mainspace. 50 edits, as stated above. Headbomb {t · c · p · b} 03:25, 22 March 2018 (UTC)
 * As a note, I'd use "or message" rather than "and message" in the summary, otherwise it makes it seems like people need to do both. Headbomb {t · c · p · b} 03:28, 22 March 2018 (UTC)
 * Didn't see that until after the run, but rest assured I just changed it in the code. All 50 edits done, no issues. -- The SandDoctor Talk 03:41, 22 March 2018 (UTC)
 * Nice work. I inspected all of the edits and saw only one problem, templates being changed from their actual names to lower-case names, in some cases breaking the templates. I see that you reverted that change and it did not happen again. – Jonesey95 (talk) 04:08, 22 March 2018 (UTC)
 * Ah, yes. That problem. TweetCiteBot's rewrite and the first task for this bot had that issue (as they all share some code in common). It was a line left over from testing in dry runs (just outputting text to in and out.txt locally) that was A: redundant and B: didn't work as intended. Because I have had issues like that in the past, I tend to run any live editing task with 1 or 2 edits tops at the beginning to check for errors like that (that way they are easily reverted and corrected). I reran the bot on that page shortly after (1 minute later) to confirm that the issue had been sorted (which it had). -- The SandDoctor Talk 04:18, 22 March 2018 (UTC)

got a link to trial diffs? Headbomb {t · c · p · b} 16:11, 23 March 2018 (UTC)
 * They kind of were buried, weren't they. Starting (and ending) here (about half way down or just to Ctrl + F for "div col" to find them). Some randomly selected diffs from that page : 1, 2, 3, 4) -- The SandDoctor Talk 16:31, 23 March 2018 (UTC)


 * [//en.wikipedia.org/w/index.php?title=8_Thottakkal&type=revision&diff=831977172&oldid=828888531 what the hell?] Frietjes (talk) 15:17, 24 March 2018 (UTC)
 * That is unrelated to this bot request, but I accidentally substituted Infobox film as well. Thank you for reverting that as I had not noticed. I have since gone back and correctly substituted just Infobox Album (which cleans up its params and properly removes deprecated params per Category:Music infoboxes with deprecated parameters, Template:Infobox album, Substitution trick. -- The SandDoctor Talk 15:45, 24 March 2018 (UTC)

BAGAssistanceNeeded -- The SandDoctor Talk 23:15, 29 March 2018 (UTC)
 * Sorry, with the end of the semester here, I forgot about this one. to ensure the issues above have been resolved. Headbomb {t · c · p · b} 17:27, 4 May 2018 (UTC)
 * Actually, the tail end of the trial confirms these issues were fixed. Headbomb {t · c · p · b} 17:32, 4 May 2018 (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.