Wikipedia:Bots/Requests for approval/BU RoBOT 30


 * 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 30
Operator:

Time filed: 03:29, Saturday, January 21, 2017 (UTC)

Automatic, Supervised, or Manual: Automatic (with supervision of specific instances where the script fails with grace)

Programming language(s): AWB / Lua

Source code available: AWB / Module:Infobox AFL biography/convert

Function overview: Replace deprecated parameters of Infobox AFL biography with new numbered parameters to improve accessibility.

Links to relevant discussions (where appropriate):
 * Template_talk:Infobox_AFL_biography
 * Wikipedia_talk:WikiProject_Australian_rules_football/Archive_6
 * Wikipedia_talk:WikiProject_Australian_rules_football (courtesy notification of relevant WikiProject, since discussion was a while back)

Edit period(s): One-time run (possibly multiple to convert new articles made while editors are learning new parameters)

Estimated number of pages affected: All pages in Category:Infobox AFL biography articles using deprecated parameters, which is still populating.

Exclusion compliant (Yes/No): Yes

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

Function details: Pretty straight-forward. This is a combination Lua module and AWB code. The AWB code takes care of modifying certain inputs to the Lua script and separating out any "total" games/goals into that new parameter. The AWB script also substitutes all the parameters from this infobox into the Lua module, which will take care of separating out the non-accessible lists of teams/years/games(goals) into appropriate numbered parameters.

In a few instances, the Lua module will fail, but it will do so gracefully. Mainly, it will fail when the number of teams and years within one category aren't the same. When this happens, the module prints the original code along with an error message that is searchable, so that I can manually find these articles to correct. It will not cause any errors in the article when failing gracefully.

This module is adapted from Module:Infobox gridiron football person/convert, which was used as part of Bots/Requests for approval/BU RoBOT 2. That bot task was successful when it was run and highly similar. The only purely new bit of code is the bit of AWB replacement done prior to sending everything into the module.

Discussion

 * Please run a short trial and link to the edits here for demonstration purposes. — xaosflux  Talk 16:00, 21 January 2017 (UTC)
 * Contribs. There were no "graceful failures" in this section, partially because I already weeded out many of the probable failures before filing this. One bug was found where unexpected formatting of the total games/goals resulted in trailing characters being vomited into another parameter. See, for instance, and  (both with extra characters in years3). Additional formatting possibilities added to the regex, so this bug is fixed (unless particularly unusual formatting is encountered in the future). ~ Rob 13 Talk 05:38, 22 January 2017 (UTC)
 * I would recommend an extended trial of at least an additional 100 edits, done in 20 edit batches, to help me account for additional unusual formatting of the "total" stuff before this goes live. ~ Rob 13 Talk 17:46, 22 January 2017 (UTC)
 * OK. — xaosflux  Talk 05:13, 26 January 2017 (UTC)
 * Contribs. One error similar to the first bug which stemmed from very odd formatting of the totals (used an endash). I adjusted the find and replace to handle that example. A couple more of these may pop up during the bot run, but additional testing is unlikely to result in more fixes; very unique formatting will always be an issue if unanticipated. The error rate will be very low, if there at all. Two examples of graceful failure:, no issues caused by the failure. Looks ready to go to me. ~ Rob 13 Talk 05:56, 26 January 2017 (UTC)
 * It seems a bit odd to even make a change to the page if you already know there's an error happening. This one, in particular, loses the data it can't parse.  Might it be an idea to skip over those or simply do a supervised run on them so that you can correct errors inline? -- slakr  \ talk / 03:34, 1 February 2017 (UTC)
 * It didn't lose any data. Note that the games/goals had empty spaces. That "error" just identifies that the infobox itself is missing data. All data is preserved when the script "fails". I will be cleaning up after the bot where these "errors" occur, but in most cases, they aren't actually errors. They're flagged because theoretically missing data in a single field may mean that the games/goals or years were matched up with the wrong teams due to incorrect formatting originally. ~ Rob 13 Talk 03:45, 1 February 2017 (UTC)
 * To highlight the lack of lost data, compare the before and after revisions on the edit provided above. 1, 2. They render the tiniest bit differently due to how I coded the numbered parameters, but the information is all there. ~ Rob 13 Talk 23:06, 3 February 2017 (UTC)
 * My bad. For whatever reason I thought the parameter had gone missing. Sorry for the confusion. -- slakr  \ talk / 09:52, 4 February 2017 (UTC)
 * As an aside, on the subject of "why make an edit when an error is happening at all", that's a function of how these numbered parameters are being split out. The correct new parameters (or "errors", in some cases) are returned via substituting a Lua module, and there's no way for an AWB bot to tell whether the result will be an error until the module is substituted. I've done everything I can to limit these, including fixing many of the issues that would have caused errors by hand. The best I can do at this point is flag those pages for human attention and ensure the output isn't negatively affected in the time between when the bot edits the infobox and when I review the graceful failures. When there are errors, that doesn't necessarily mean nothing is being done by the bot; one set of parameters may be successfully split even if another has an issue. This is identical to how Bots/Requests for approval/BU RoBOT 2 was handled, and that was a successful bot run with no complaints. ~ Rob 13 Talk 13:20, 4 February 2017 (UTC)

Does the bot also remove unused parameters? -- Magioladitis (talk) 17:00, 4 February 2017 (UTC)
 * Some, but not all. Lua modules can't distinguish between unused parameters present but blank in an article and unused parameters not present at all (to my knowledge, anyway), so the options are either to print all unused parameters (resulting in a lot of blank parameter spam) or remove those which are unused (through simple if/then conditions). The latter is obviously preferable and was required by a BAG member when task #2, which I linked to above, was approved. There's a small set of parameters that really should always be present which it will include even if they're blank or weren't in the article to begin with. That's because those particular parameters (things like "birth_date") should be filled in on all articles if data is available. ~ Rob 13 Talk 17:16, 4 February 2017 (UTC)

There don't seem to be any objections, and despite my brainfart, it looks otherwise fine. =) -- slakr \ talk / 05:11, 10 February 2017 (UTC)
 * Sorry to poke on this, but have you had a chance to take a look at the trial results? Due to the "graceful failure" business, I did a lot of pre-BRFA cleanup work to minimize the bot edits that will leave manual work to be done, and I'm worried that more articles are being created/edited while this sits here in a way that there will be more post-run manual work to be done. I'd appreciate if you could try to get to this sometime this week or note that you don't mind another BAG member doing it. Thanks! ~ Rob 13 Talk 18:29, 7 February 2017 (UTC)
 * Sorry a bit slammed - but as with most of these I'm fine with any other BAGger completing. — xaosflux  Talk 18:43, 7 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.