Wikipedia:Bots/Requests for approval/ZackBot 12
- 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 Approved.
Operator: Zackmann08 (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 18:55, Friday, October 26, 2018 (UTC)
Function overview: Replace deprecated parameters on {{Infobox islands}}
Automatic, Supervised, or Manual: automatic
Programming language(s): Ruby
Source code available: User:ZackBot/infobox islands
Links to relevant discussions (where appropriate): Template_talk:Infobox_islands#Can_we_clean_up_these_params?
Edit period(s): one time run
Estimated number of pages affected: all transclusions so currently 6821 pages.
Namespace(s):Mainspace
Exclusion compliant (Yes/No): yes
Function details:
Very straight forward. There are a whole bunch of parameters on this template that have been deprecated (replacing spaces with underscores so for example {{{image name}}}
→ {{{image_name}}}
). This bot would be a one time run to go through and replace the deprecated parameters with their new version. A very simple find and replace that would only make changes within the infobox. @Frietjes and Plastikspork: pinging you both in case you wish to chime in. --Zackmann (Talk to me/What I been doing) 18:55, 26 October 2018 (UTC)[reply]
Discussion
edit- I generally support the task. I would like to see the bot function similar to SporkBot which preserved comments and fixed indentation at the same time. I don't know how hard that would be to code, or if it would be better to just use SporkBot. Frietjes (talk) 13:58, 30 October 2018 (UTC)[reply]
- For a simple parameter replacement, I'm fine with leaving the indentation alone if it seems like too much extra work to normalize (speaking from experience, it can be quite hard to automate in complex cases). That said, find + replace should preserve comments and other idiosyncrasies, so I think this is safe. Zackmann08, let us know when it's ready and I think a trial is in short order afterwards. — Earwig talk 02:35, 1 November 2018 (UTC)[reply]
- @The Earwig: all ready to go! Let me know when I'm clear to test it out. :-) --Zackmann (Talk to me/What I been doing) 04:36, 1 November 2018 (UTC)[reply]
- @Zackmann08: Cool. One thing sticks out from the code: I think the replacements will be made anywhere within the template body, not just parameter names. The risk of this is probably quite low, but if a string like "capital city" was found in an image caption, wouldn't the bot replace it with "capital_city"? I suspect this is easy to fix by testing for
\s*=
after the parameter name in each case. — Earwig talk 04:51, 1 November 2018 (UTC)[reply]- @The Earwig: fair enough. I can add a check for the equal sign after that one. :-) --Zackmann (Talk to me/What I been doing) 04:54, 1 November 2018 (UTC)[reply]
- @The Earwig: anything else you'd like me to address or can I give it a trial run? --Zackmann (Talk to me/What I been doing) 05:15, 1 November 2018 (UTC)[reply]
- @Zackmann08: Nope, I think that's it, let's go for it. Approved for trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. — Earwig talk 05:31, 1 November 2018 (UTC)[reply]
- @The Earwig: anything else you'd like me to address or can I give it a trial run? --Zackmann (Talk to me/What I been doing) 05:15, 1 November 2018 (UTC)[reply]
- @The Earwig: fair enough. I can add a check for the equal sign after that one. :-) --Zackmann (Talk to me/What I been doing) 04:54, 1 November 2018 (UTC)[reply]
- @Zackmann08: Cool. One thing sticks out from the code: I think the replacements will be made anywhere within the template body, not just parameter names. The risk of this is probably quite low, but if a string like "capital city" was found in an image caption, wouldn't the bot replace it with "capital_city"? I suspect this is easy to fix by testing for
- @The Earwig: all ready to go! Let me know when I'm clear to test it out. :-) --Zackmann (Talk to me/What I been doing) 04:36, 1 November 2018 (UTC)[reply]
- For a simple parameter replacement, I'm fine with leaving the indentation alone if it seems like too much extra work to normalize (speaking from experience, it can be quite hard to automate in complex cases). That said, find + replace should preserve comments and other idiosyncrasies, so I think this is safe. Zackmann08, let us know when it's ready and I think a trial is in short order afterwards. — Earwig talk 02:35, 1 November 2018 (UTC)[reply]
@The Earwig: done. Did the first few one at a time and found a few small typos which I corrected (both in my script and in the page itself). But other than that, looks good to me. let me know if you see anything. --Zackmann (Talk to me/What I been doing) 06:18, 1 November 2018 (UTC)[reply]
- @The Earwig: any update? Would love to unleash this bad boy. --Zackmann (Talk to me/What I been doing) 17:15, 6 November 2018 (UTC)[reply]
- Hi. Looked through the edits; I see a couple small issues/nitpicks. Nothing too serious, but a few points worth fixing.
- In [1], the bot replaced the valid
|width min km=
and|width max km=
with the invalid|width_min km=
and|width_max km=
, causing the width to get removed from the infobox. (This is the only change I saw affecting an actual rendered page.) The page remains in the deprecated params maintenance cat, so we would've caught it eventually, but still should be fixed. - In [2], [3], [4], and [5], the bot either (1) messes with a (fake?) parameter, turning
|locator map size=
into|locator map size=
, or (2) replaces "native name:" with "native_name:" in a comment that's not referring to a parameter name. Since the parameter doesn't seem to exist, it's not a serious issue (arguably GIGO), but I would still prefer not touching it in that case. For the latter thing, again, it's very minor, but we would ideally leave it alone. - In [6], the bot changed some text in the value of the
|ethnic_groups=
parameter. No actual effect because it was a link title, but if that link wasn't piped, it would have been visible. This is basically what I was worried about above, but it seems you didn't apply the fix to every parameter, only some of them?
- In [1], the bot replaced the valid
- Thanks! — Earwig talk 05:15, 8 November 2018 (UTC)[reply]
- @The Earwig: thank you for taking the time to go through all of these! Great catches. I've got a number of projects I'm working on right now but I will get to this ASAP. --Zackmann (Talk to me/What I been doing) 01:27, 11 November 2018 (UTC)[reply]
- @The Earwig: I have completely redone the bot. Can I get another 50 edit trial? --Zackmann (Talk to me/What I been doing) 19:38, 12 November 2018 (UTC)[reply]
- @Zackmann08: Sure. Approved for trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. — Earwig talk 03:07, 13 November 2018 (UTC)[reply]
- @The Earwig: Done! diffs. Let me know. :-) --Zackmann (Talk to me/What I been doing) 03:22, 13 November 2018 (UTC)[reply]
- @The Earwig: any update on this? --Zackmann (Talk to me/What I been doing) 18:12, 16 November 2018 (UTC)[reply]
- Not yet. — Earwig talk 19:23, 17 November 2018 (UTC)[reply]
- Approved. Looks good now. Thanks for your patience. — Earwig talk 07:36, 19 November 2018 (UTC)[reply]
- Not yet. — Earwig talk 19:23, 17 November 2018 (UTC)[reply]
- @The Earwig: any update on this? --Zackmann (Talk to me/What I been doing) 18:12, 16 November 2018 (UTC)[reply]
- @The Earwig: Done! diffs. Let me know. :-) --Zackmann (Talk to me/What I been doing) 03:22, 13 November 2018 (UTC)[reply]
- @Zackmann08: Sure. Approved for trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. — Earwig talk 03:07, 13 November 2018 (UTC)[reply]
- @The Earwig: I have completely redone the bot. Can I get another 50 edit trial? --Zackmann (Talk to me/What I been doing) 19:38, 12 November 2018 (UTC)[reply]
- @The Earwig: thank you for taking the time to go through all of these! Great catches. I've got a number of projects I'm working on right now but I will get to this ASAP. --Zackmann (Talk to me/What I been doing) 01:27, 11 November 2018 (UTC)[reply]
- Hi. Looked through the edits; I see a couple small issues/nitpicks. Nothing too serious, but a few points worth fixing.
- 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.