Wikipedia:Bots/Requests for approval/BU RoBOT 33


 * 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

BU RoBOT 33
Operator:

Time filed: 16:17, Friday, February 10, 2017 (UTC)

Automatic, Supervised, or Manual: Automatic

Programming language(s): AWB / Lua

Source code available: AWB / Module:WikiProject Central America/convert

Function overview: Converts deprecated task forces in WikiProject Central America to the new country WikiProject templates

Links to relevant discussions (where appropriate):
 * Template_talk:WikiProject_Central_America
 * Bot_requests

Edit period(s): One-time run

Estimated number of pages affected: Up to 17,000 (but likely much less - this will only edit pages where at least one task force is present)

Exclusion compliant (Yes/No): Yes

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

Function details: Uses a Lua module to remove the old task forces from WikiProject Central America and replace them with country-specific templates. If there are zero task forces defined, no edit will be made. If there's 1-2 task forces defined, WikiProject Central America will be removed and the WikiProject(s) associated with the deprecated task forces will be added in its place. If there are 3+ task forces defined, the task force parameters will be removed from WikiProject Central America (as this likely indicates a true continent-wide interest, not a country-specific interest. See the bot request for more details.

The new country-specific banners will use the same parameters (e.g. importance, rating, listas, etc.) as the WikiProject Central America banner, unless there are country-specific parameters (e.g. Panama-importance), which are converted to their country-specific banner counter-parts. If the WikiProject Central America banner is removed and it has parameters (e.g. needs-infobox) that are not supported by country-specific banners, then the parameter is also removed and not added to country-specific banner(s).

Discussion
Everything looks good.

I assume this will correctly add WikiProjectBannerShell?

If so, (hopefully a good sample of both cases). Please grab the pages randomly from the list. Please use a descriptive edit summary with links (if possible, noting which change of the two is being done). — HELL KNOWZ  ▎TALK 18:56, 11 February 2017 (UTC)

Just to comment that BU Rob13 keeps asking me to release pieces of the code I use, while they never do. This BRFA provides no info of how this is going to be done. -- Magioladitis (talk) 19:02, 11 February 2017 (UTC)
 * Botops aren't required to provide their code. You may ask BU Rob13 to provide code, but this won't really affect their BRFA. — HELL KNOWZ  ▎TALK 19:34, 11 February 2017 (UTC)
 * I know. Just underlying the fact. -- Magioladitis (talk) 22:32, 11 February 2017 (UTC)
 * I've asked you to post or explain your regex in limited cases where you've had difficulty putting your bot's task in plain English. If you have any questions about what my task does, I certainly invite them and I'll answer them until you're satisfied, just as I would expect you to do at your own BRFAs. ~ Rob 13 Talk 22:45, 11 February 2017 (UTC)

No, it would not add WikiProjectBannerShell. First, that would require me to enable AWB general fixes, which I avoid doing due to errors often appearing as a result (especially on talk pages). Second, the Lua module's substitution takes place after the bot saves the edit based on how the MediaWiki software does its thing, so it wouldn't be possible for AWB to actually figure out how many banners are on the page. Lastly, the Lua module substitution wouldn't be interpreted as a WikiProject banner at all by AWB genfixes, so it would likely move it out of the banner, even if it was already inside. Note that this task adds, at most, one banner to a page, so it won't be spamming a page with lots of banners outside a shell. Is this still fine to trial? ~ Rob 13 Talk 22:45, 11 February 2017 (UTC)
 * Also, note that I can't differentiate the edit summary with AWB, as the differentiation is being done entirely via Lua module. I could have the Lua module output a comment making it more clear what change has been done if you'd like me to, but I think that would probably just clutter up the page. I'll link to this BRFA, so they can find all the info if they'd like it. ~ Rob 13 Talk 22:47, 11 February 2017 (UTC)
 * So the problem case scenarios are 1) the bot adds a third banner, but doesn't add a shell; or 2) there are already 3+ banners without a shell and the bot adds at most another banner, but doesn't add a shell; or 3) there is 1 banner within a shell that is replaced with 2 banners, but the bot doesn't remove the shell. So 2 and 3 are "left it as it found it", which is nice to fix, but not really critical. 1 is a bit more desired, but probably acceptable. Past bots have set high expectations for banner tasks, so I'm a little reluctant here. It's probably fine, but I'll let the BRFA stew a little. — HELL KNOWZ  ▎TALK 00:13, 12 February 2017 (UTC)
 * Banner shells aren't particularly mandatory, in my opinion. This seems to be supported by the template itself, which allows you to set the banner shell to uncollapsed and mentions in the documentation that this is fine. I don't apply them to the talk pages of my articles, personally, since they make it harder to see the class at a glance. The alternatives would be to implement this inside AWB, which would take an absolute mess of nested if/then conditions, or outside AWB, requiring a bot operator to code something entirely new to handle the bannershell stuff. That's definitely not trivial, as any such code has to identify exhaustively all wikiproject templates and their redirects. Seems like a lot of coding for something that's cosmetic. It's worth noting that the number of articles with exactly two task forces is likely quite small. Most topics are either country-specific, region- or continent-specific (implying >2), or not specific to any of these countries at all. ~ Rob 13 Talk 00:40, 12 February 2017 (UTC)
 * The last sentence is why I'm probably okay with this not adhering strongly to what is the suggested banner usage. But WP:LEADTALK is the relevant editing guideline, which goes with 2+ banners and--from previous BRFAs--bots are usually fine to start with 3. But--as you say--this adds at most 1 banner and is a one-time task. I'm gonna say it's acceptable. — HELL KNOWZ  ▎TALK 13:02, 12 February 2017 (UTC)

(hopefully a good sample of both cases). Please grab the pages randomly from the list. Please use a descriptive edit summary with links. — HELL KNOWZ  ▎TALK 13:02, 12 February 2017 (UTC)


 * Alright, waiting on the answer to a question about one of the parameters from the project member who initiated this request. Is alphabetical sufficiently random or do you want me to cherry-pick more than that? ~ Rob 13 Talk 16:30, 12 February 2017 (UTC)
 * Probably...? Alphabetical is sometimes not sufficiently random, because it ends up with like 50 pages of "Alphabet in Albania", "Alphabet in Argentina", "Alphabet in Armenia" etc. I don't know what your exact list is or how you build it or if the tool you use has a "random shuffle" option (I think AWB did last I checked ages ago). I'm just wanting to avoid a possible re-trial because all the pages are essentially the same (has happened to me before). — HELL KNOWZ  ▎TALK 16:37, 12 February 2017 (UTC)
 * To my knowledge, AWB has no such option. I can basically go alphabetical or just scroll through the list and pick 50 pages to trial. I'll take a look at what pops up when I pre-parse and see which is better. ~ Rob 13 Talk 20:13, 12 February 2017 (UTC)
 * Contribs. I made sure all use cases were present in the first ~20 edits and then just let the rest of the 50 run automated on a somewhat diverse-looking section of the alphabetized list. Everything seems to be working properly. As predicted, there were almost no cases of exactly two countries. The only one I noticed was here, where it was already in a BannerShell. ~ Rob 13 Talk 22:58, 12 February 2017 (UTC)
 * I spot checked 10 of the edits and didn't find any problems. Kaldari (talk) 02:19, 13 February 2017 (UTC)

Looked through all the edits.

A question I'm wondering is if the bot should impose the multiline syntax for the banners (examples for cases: add, replace, reformat). Vast majority of the pages use single-line banners, except some like. (Ideally, the bot should match the existing styles or whatever the original template used, but I also realize that's asking for a fairly involved coding task.) I'm thinking that empirical evidence (albeit from a small pool, but still random) shows that single line is more common.

removed no.

, also - The closing tag is on the new line. This goes together with having multi-line at all, but it still feels more like a glitch than intentional. This also ties with the next one.

Should the bot not leave empty importance and class parameters, when no data is available? I thought it was a fairly standard practice, as it makes human rating easier (when not using assisted tools).

— HELL KNOWZ  ▎TALK 16:56, 13 February 2017 (UTC)
 * None of the country-specific templates support needs-infobox (last time I checked) so it's actually OK to drop it. I agree that leaving empty importance and class params would be ideal, but I'm ambivalent on the single-line vs. multi-line style. Kaldari (talk) 23:51, 13 February 2017 (UTC)
 * Lua prints each individual "print" command on a different line. This is not behavior which can be easily changed. I do use a "printfd" function which would allow me to insert multiple arguments in a single print line, but to use this to produce single-line output would require either a large number of if/then statements (basically, it would need nested if/thens to consider every single possible grouping of task forces, and then additional if/then statements within those to consider the presence or absence of each individual parameter) or the presence of many blank and possibly irrelevant parameters (which is probably a more egregious stylistic error). I could theoretically take a stab at doing this if you're certain it's necessary, but this is a cosmetic-only alteration to the source code, and I don't consider it very important. It would involve a complete re-write of the Lua module, and the necessary if/then statements would be in the realm of 500. I'm not certain I would bother with that level of effort for a somewhat minor task. Note that I did pass this behavior by Kaldari, who represents the project the task is for, and they were fine with it. As for the class/importance blank parameters, I limit blank parameters by default, but I can easily include those. Making that change now. ~ Rob 13 Talk 03:15, 14 February 2017 (UTC)
 * Can you really not do (have not actually tested):
 * — HELL KNOWZ  ▎TALK 12:07, 14 February 2017 (UTC)
 * Probably, hadn't thought about that possibility. (Not much of a programmer - usually stick to AWB.) I'll take a stab at this tonight. ~ Rob 13 Talk 13:15, 14 February 2017 (UTC)
 * I've gotten rather busy, so I'm putting off re-writing the module until my bot is close to running out of things to do. At the current rate, it has enough edits to last it for a good 1.5-2 weeks if editing continuously. In the meantime, could you approve an extended trial so I can test this once the module is re-written? ~ Rob 13 Talk 19:02, 16 February 2017 (UTC)
 * I've gotten rather busy, so I'm putting off re-writing the module until my bot is close to running out of things to do. At the current rate, it has enough edits to last it for a good 1.5-2 weeks if editing continuously. In the meantime, could you approve an extended trial so I can test this once the module is re-written? ~ Rob 13 Talk 19:02, 16 February 2017 (UTC)

Extended trial
Sure thing, no rush. — HELL KNOWZ  ▎TALK 19:41, 16 February 2017 (UTC)
 * Contribs. ~ Rob 13 Talk 18:59, 23 February 2017 (UTC)

Checked all edits. — HELL KNOWZ  ▎TALK 20:47, 23 February 2017 (UTC)
 * -- these two has 1 task force, but didn't get converted to the corresponding project.
 * After digging into how the task forces sub-template works for WPBannerMeta, fixed. I don't think another trial should be needed, but I'm happy to make one if requested. I've rolled back those two edits and can also just re-run on those to confirm the issue is fixed. ~ Rob 13 Talk 21:06, 23 February 2017 (UTC)
 * Oh, I see, WPCA banner doesn't care what the value is, as long as the parameter is set. That probably fixes it. I think we're good, don't think more trials will catch anything previous ones didn't. — HELL KNOWZ  ▎TALK 21:55, 23 February 2017 (UTC)

Issues resolved, everything looks good. — HELL KNOWZ  ▎TALK 21:56, 23 February 2017 (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.