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.

BU RoBOT 30

[edit]

Operator: BU Rob13 (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)

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):

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 Wikipedia: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

[edit]
Approved for trial (30 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. Please run a short trial and link to the edits here for demonstration purposes. — xaosflux Talk 16:00, 21 January 2017 (UTC)[reply]
Trial complete. 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, [1] and [2] (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). ~ Rob13Talk 05:38, 22 January 2017 (UTC)[reply]
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. ~ Rob13Talk 17:46, 22 January 2017 (UTC)[reply]
Approved for extended trial (100 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. OK. — xaosflux Talk 05:13, 26 January 2017 (UTC)[reply]
Trial complete. 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: [3] [4], no issues caused by the failure. Looks ready to go to me. ~ Rob13Talk 05:56, 26 January 2017 (UTC)[reply]
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? --slakrtalk / 03:34, 1 February 2017 (UTC)[reply]
@Slakr: 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. ~ Rob13Talk 03:45, 1 February 2017 (UTC)[reply]
To highlight the lack of lost data, compare the before and after revisions on the edit Slakr provided above. 1, 2. They render the tiniest bit differently due to how I coded the numbered parameters, but the information is all there. ~ Rob13Talk 23:06, 3 February 2017 (UTC)[reply]
Facepalm Facepalm My bad. For whatever reason I thought the parameter had gone missing. Sorry for the confusion. --slakrtalk / 09:52, 4 February 2017 (UTC)[reply]
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 Wikipedia:Bots/Requests for approval/BU RoBOT 2 was handled, and that was a successful bot run with no complaints. ~ Rob13Talk 13:20, 4 February 2017 (UTC)[reply]

Does the bot also remove unused parameters? -- Magioladitis (talk) 17:00, 4 February 2017 (UTC)[reply]

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. ~ Rob13Talk 17:16, 4 February 2017 (UTC)[reply]

 Approved. There don't seem to be any objections, and despite my brainfart, it looks otherwise fine. =) --slakrtalk / 05:11, 10 February 2017 (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.