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 Approved.
Operator: Plastikspork (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
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
editSeems 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)[reply]
- 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. Rehman 03:59, 9 February 2016 (UTC)[reply]
- 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)[reply]
- 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, Rehman 10:15, 9 February 2016 (UTC)[reply]
- 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)[reply]
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)[reply]
- 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)[reply]
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. Rehman's first suggestion), so whenever you're ready. Approved for trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. — Earwig talk 19:02, 10 February 2016 (UTC)[reply]
- 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, Rehman 00:33, 11 February 2016 (UTC)[reply]
- ...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. Rehman 14:55, 11 February 2016 (UTC)[reply]
- 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)[reply]
- I've pinged Plastikstpork via email, just in case he missed the updates here. Rehman 14:06, 15 February 2016 (UTC)[reply]
- 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)[reply]
- ...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. Rehman 14:55, 11 February 2016 (UTC)[reply]
Trial complete. Rehman and The Earwig. Sorry that took so long. You can find the results 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)[reply]
- I noticed [1] and [2] caused a state (Baden-Württemberg) to be labeled a city. Same goes for [3] --slakr\ talk / 04:28, 4 March 2016 (UTC)[reply]
- Actually, this seems to be my fault, and not the bot's.
location
cannot be directly renamed tobasin_cities
. I will look deeper (and discuss with the template folks if necessary), and update here again. Sorry for the trouble, plastikspork. Rehman 12:46, 4 March 2016 (UTC)[reply] - The template already has
source1_location
,mouth_location
, andbasin_cities
. All to do with types of locations.location
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, Rehman 13:53, 4 March 2016 (UTC)[reply]- 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, Rehman 13:06, 10 March 2016 (UTC)[reply]
- 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)[reply]
- 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, Rehman 13:06, 10 March 2016 (UTC)[reply]
- Actually, this seems to be my fault, and not the bot's.
- Approved for extended trial (200 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. Additional trial, larger scope for finding possibly more exception cases. — xaosflux Talk 03:40, 12 March 2016 (UTC)[reply]
- I have pinged Plastikspork via email. Rehman 14:42, 23 March 2016 (UTC)[reply]
- Trial complete. Here are roughly 200 more edits [4]. 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)[reply]
- 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 (Frietjes or Rehman)? — Earwig talk 02:39, 11 April 2016 (UTC)[reply]
- The Earwig, everything looks good to me. Frietjes (talk) 13:28, 11 April 2016 (UTC)[reply]
- Yes, everything seems to be in order. Good to go IMO. Rehman 15:30, 11 April 2016 (UTC)[reply]
- 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 (Frietjes or Rehman)? — Earwig talk 02:39, 11 April 2016 (UTC)[reply]
- Trial complete. Here are roughly 200 more edits [4]. 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)[reply]
- I have pinged Plastikspork via email. Rehman 14:42, 23 March 2016 (UTC)[reply]
Approved. — Earwig talk 16:13, 11 April 2016 (UTC)[reply]
- 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.