Wikipedia:Bots/Requests for approval/VahurzpuBot

VahurzpuBot

[[User:VahurzpuBot|VahurzpuBot]]

{{Newbot|VahurzpuBot|}}

Operator: {{botop|Vahurzpu}}

Time filed: 22:26, Sunday, November 15, 2020 (UTC)

Automatic, Supervised, or Manual: automatic

Programming language(s): Python

Source code available: https://public.paws.wmcloud.org/user/VahurzpuBot/notebooks/RemoveRedirectClass.ipynb

Function overview: Remove Redirect-Class from articles that aren't redirects

Links to relevant discussions (where appropriate): Wikipedia:Bot requests#Removing Redirect-Class from articles that aren't redirects

Edit period(s): No set frequency (not sure how fast this fills up); no more than weekly

Estimated number of pages affected: 2574 for the first run, fewer afterwards

Exclusion compliant (Yes/No): Yes

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

Function details: This clears explicit |class=redirect declarations from WikiProject banner templates on mainspace talk pages where the associated article is neither a true redirect nor an interwiki soft redirect (as far as I can tell, there's only one non-interwiki soft redirect on the project, and has no project template).

It additionally clears |importance=na parameters (including |taskforce-importance=na). It doesn't touch any other parameters, nor importance if it's anything other than na.

=Discussion=

{{ping|Vahurzpu}} A few questions

  1. Would the bot touch the military history banners or are those excluded from this request out of curiosity?
  2. Does the bot also clear the class on actual redirect pages for preventive purposes, or does it leave those alone?
  3. Would the bot import assessments from the other banners (e.g. {{WP Journals|class=redirect}}{{WP Journals|class=B}} if there was {{WP Physics|class=C}} elsewhere on the page)?

Headbomb {t · c · p · b} 23:44, 15 November 2020 (UTC)

:{{reply to|Headbomb}}

:#Currently, it does, though I could turn it off by commenting out one line.

:#It doesn't clear the class for actual redirect pages, as that would expand the scope of the bot to many more pages (Special:Search/insource:"class=redirect" suggests that this would affect >250,000 pages); I'm also not sure whether that would be allowed by WP:COSMETICBOT, as it wouldn't change any of the categorization.

:#It doesn't import assessments from other banners; I could modify it to do so if desired.

:Vahurzpu (talk) 01:11, 16 November 2020 (UTC)

::For #1, does it handle all the special values for the milhist banner? Headbomb {t · c · p · b} 01:13, 16 November 2020 (UTC)

:::{{reply to|Headbomb}} It will replace (case-insensitive) "redirect", "redir", "rdr", and "red" for any of the templates, so yes, it should deal with all MILHIST and WPBannerMeta redirect aliases. Vahurzpu (talk) 01:42, 16 November 2020 (UTC)

Alright, let's go to trial then. {{BotTrial|25 edits}} Headbomb {t · c · p · b} 01:46, 16 November 2020 (UTC)

:{{BotTrialComplete}}, with [https://en.wikipedia.org/w/index.php?target=VahurzpuBot&namespace=all&tagfilter=&start=2020-11-14&end=&limit=50&title=Special%3AContributions relevant contributions here]. Upon review, all of the edits the bot did make were appropriate. It failed to make a few edits that it should have (e.g. it didn't remove the manual class from {{tl|WikiProject Biography}} in Special:Diff/988927564) due to a whitespace-handling issue, but that has since been fixed. The bot also made some null edits that ended up recategorizing some pages; based on the number of these it made, I suspect the true number of non-null edits it will make is a bit lower than the 2500 returned by the query. Vahurzpu (talk) 02:38, 16 November 2020 (UTC)

{{BotApproved}} no concern. Headbomb {t · c · p · b} 04:51, 16 November 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.