Wikipedia:Bots/Requests for approval/WugBot 5

WugBot 5

[[User:WugBot|WugBot 5]]

{{BRFA help}}

{{Newbot|WugBot|5}}

Operator: {{botop|Wugapodes}}

Time filed: 21:48, Friday, September 4, 2020 (UTC)

Function overview: Applies the change at Special:Diff/976752348 as a patch to previously substituted DYK nominations to resolve the issue described at Special:Diff/973099117/973390814.

Automatic, Supervised, or Manual: Automatic

Programming language(s): Python3

Source code available: Yes, as [https://public.paws.wmcloud.org/User:Wugapodes/Untitled1.ipynb?kernel_name=python3 a PAWS notebook]

Links to relevant discussions (where appropriate):

Edit period(s): One time run

Estimated number of pages affected: 12,000

Namespace(s): Template

Exclusion compliant (Yes/No): No

Function details: For every month from January 2019 to August 2020 (inclusive) the bot selects all DYK nominations in the category Failed) DYK nominations from {month} {year}. It iterates over these nominations and patches the categorization by surrounding the category link with the change shown at Special:Diff/976752348. The bot leaves an edit summary describing the purpose and links to a diff describing the problem on my talk page.

=Discussion=

I believe the problem started following Wikipedia:Bots/Requests for approval/WugBot 3 which was approved in June 2019. The start date of January 2019 was chosen because it makes the loop easier to code. The end date of August 2020 was chosen because the fix has already been implemented so there may be collisions with already fix templates in the September category. Since it's only been a few days, I plan to fix the September 2020 noms by hand. Wug·a·po·des 21:53, 4 September 2020 (UTC)

  • LGTM. Looking at the code, you'd probably want to put content=True on calls to members() (so that texts of many pages are fetched in a single API call, rather than one a time, per mw:API:Etiquette). – SD0001 (talk) 09:00, 5 September 2020 (UTC)
  • :{{botTrial|edits=20}} Primefac (talk) 16:33, 15 September 2020 (UTC)
  • ::I plan to run the trial around 06:00 UTC. I'll be back with updates. Wug·a·po·des 23:29, 15 September 2020 (UTC)
  • :::I did 5 before realizing I was logged into this account not WugBot. I'll run the test on toolforge tomorrow after some sleep. For posterity, the edits under my account were 1, 2, 3, 4, and 5. Wug·a·po·des 07:30, 16 September 2020 (UTC)
  • :::: {{BotTrialComplete}} Wug·a·po·des 19:37, 5 October 2020 (UTC)
  • :::::{{u|Wugapodes}}, would I be correct in assuming that the last 20 edits were for this task? Primefac (talk) 16:48, 16 October 2020 (UTC)
  • ::::::{{re|Primefac}} you would not; sorry for not including a link. Here's the contributions page [https://en.wikipedia.org/w/index.php?target=WugBot&namespace=10&tagfilter=&start=2020-09-26&end=2020-09-27&limit=50&title=Special%3AContributions] filtered so that the trial edits are at the top. Wug·a·po·des 17:42, 16 October 2020 (UTC)
  • {{BotApproved}} Please link to this BRFA in your edit summaries. Primefac (talk) 17:56, 16 October 2020 (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 Wikipedia:Bots/Noticeboard.