Wikipedia:Bots/Requests for approval/SporkBot 7


 * 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 keep vote.svg Approved

SporkBot 7
Operator:

Time filed: 00:06, Tuesday, February 9, 2016 (UTC)

Automatic, Supervised, or Manual: Supervised

Programming language(s): Perl using the MediaWiki::Bot library

Source code available: Standard Perl regular expressions

Function overview: Update transclusions of Template:Infobox river to use new syntax

Links to relevant discussions (where appropriate): Discussion on the talk page for Infobox River.

Edit period(s): One time run

Estimated number of pages affected: 13,320 transclusions

Exclusion compliant (Yes/No): Yes, assuming MediaWiki::Bot is compliant

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

Function details: The syntax for Template:Infobox river is being revamped, with some parameters being renamed, and others being merged. The bot would go through all the article-space transclusions of Template:Infobox river and update the syntax, as outlined in the linked discussion.

Discussion
Seems sane. Would it be safe for us to trial given the sandbox doesn't appear to have been pushed yet, though? How shall we implement the changes? —  Earwig   talk 00:27, 9 February 2016 (UTC)
 * Hi Earwig. Once the bot is ready to run, we could copy the code from the sandbox to the main template, and temporarily include the old parameters in the new template code for compatibility, and after the bot run is complete, simply remove the old parameters from the main template. Or, just as the bot is ready to run, we could simply copy the code from the sandbox, to the main template. Depending on the bot's editing speed, the latter may hide some parameter fields in some articles for a couple of minutes, until the bot successfully completes the necessary updates. Reh  man  03:59, 9 February 2016 (UTC)
 * 13,000+ edits will take several hours, even with an impossibly high edit rate. Generally you don't want to go above 10 EPM. —  Earwig   talk 04:05, 9 February 2016 (UTC)
 * If my math is correct, there should not be more than 3,000 articles, based on the previous scan. Regardless, I am willing to do the compatibility edit as soon as the bot is ready/approved. Best, Reh  man  10:15, 9 February 2016 (UTC)

The paradigm of finite state automata is unfit to deal with sequences produced by context-free grammars. ie you shouldn't use regex to parse templates. I don't expect a typical infobox transclusion to contain enough nested templates to the point that this would be a problem, but could you show us what your regexes look like? → Σ σ  ς. (Sigma) 00:35, 9 February 2016 (UTC)
 * For simple parameter replacement on a few thousand articles, I'm not concerned, but reviewing the regexes would be nice nonetheless. —  Earwig   talk 19:02, 10 February 2016 (UTC)

I'd like to trial this, so I'm hoping we can do a run-through of the parameter replacement while still keeping the template output correct during the transitional period. I assume this will require temporary extra code in the template to support both parameters (i.e. 's first suggestion), so whenever you're ready. —  Earwig   talk 19:02, 10 February 2016 (UTC)
 * Great! I'll start working on the code today when I get back home (I'm just leaving to work). P.s. Just FYI, Plastikspork also helped in the exact same task on Infobox power station and Infobox dam some time ago. Hence I am quite positive that he knows the way to get this done smoothly. Kind regards, Reh  man  00:33, 11 February 2016 (UTC)
 * ...just came back, and quite exhausted. Please give me another day or two, I will get the code sorted. And just for the record (since this is a discussion to approve the bot), I too support this bot task. Reh  man  14:55, 11 February 2016 (UTC)
 * I added the transitional double syntax, so we should be ready to go. I will add a tracking category (Category:Pages using infobox river with deprecated parameters) for all the articles with the old syntax shortly. Frietjes (talk) 16:31, 11 February 2016 (UTC)
 * I've pinged Plastikstpork via email, just in case he missed the updates here. Reh  man  14:06, 15 February 2016 (UTC)

and. Sorry that took so long. You can find the results [//en.wikipedia.org/w/index.php?title=Special:Contributions/SporkBot&offset=20160302034545&limit=51&target=SporkBot here]. It went fairly well, with a few minor whitespace issues, which should be corrected. I will need to tweak some of the more complicated coord template conversions as I see them. But, the bot is programmed to skip anything that it doesn't recognize. Thanks! Plastikspork ―Œ (talk) 01:21, 3 March 2016 (UTC)
 * I noticed and  caused a state (Baden-Württemberg) to be labeled a city.  Same goes for  -- slakr  \ talk / 04:28, 4 March 2016 (UTC)
 * Actually, this seems to be my fault, and not the bot's.  cannot be directly renamed to  . I will look deeper (and discuss with the template folks if necessary), and update here again. Sorry for the trouble, plastikspork.  Reh  man  12:46, 4 March 2016 (UTC)
 * The template already has,  , and  . All to do with types of locations.   should be dissolved in to the first three on conditional basis. This is something that I had overseen, and needs to be reviewed at the template talkpage. I believe it should not impact the overall purpose of this bot request. @Plastikspork, I will update the template tasks page accordingly, sorry for the trouble. Thank you,  Reh  man  13:53, 4 March 2016 (UTC)
 * Sorry for the late update. Frietjes seems to have fixed the location issue. The other fields will be discussed separately as that is not relevant to this discussion. @Plastikspork: I have updated the tasks list (no changes to "location" parameter). Thanks, Reh  man  13:06, 10 March 2016 (UTC)
 * yes, we can safely proceed without modifying the location parameter. The Earwig, do we need a second trial? Frietjes (talk) 13:25, 10 March 2016 (UTC)
 * Additional trial, larger scope for finding possibly more exception cases. — xaosflux  Talk 03:40, 12 March 2016 (UTC)
 * I have pinged Plastikspork via email. Reh  man  14:42, 23 March 2016 (UTC)
 * Here are roughly 200 more edits [//en.wikipedia.org/w/index.php?limit=220&title=Special%3AContributions&contribs=user&target=SporkBot&namespace=&tagfilter=&year=2016&month=-1]. The bot was doing another task at the same time, so there are some other edits mixed in, and I had to update the code to use 'coord_region' rather than 'iso-region' mid-run after noticing the syntax in the template code.  Otherwise, everything thing went pretty well.  Nothing blew up as far as I can tell :)  Thanks! Plastikspork ―Œ (talk)  21:44, 5 April 2016 (UTC)
 * I spot-checked about 50 with no apparent issues. Can I get an confirmation that we're good to go from someone involved with the template ( or )? —  Earwig   talk 02:39, 11 April 2016 (UTC)
 * The Earwig, everything looks good to me. Frietjes (talk) 13:28, 11 April 2016 (UTC)
 * Yes, everything seems to be in order. Good to go IMO. Reh  man  15:30, 11 April 2016 (UTC)

—  Earwig   talk 16:13, 11 April 2016 (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.