The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at Wikipedia:Bots/Noticeboard. The result of the discussion was Approved.
If there is a banner shell already on the page, then add |class= parameter and remove from project banners, e.g. [1]
If there is no banner shell, then add it and move class rating from project banners, e.g. [2]
If there are no assessments on page, then add empty |class= parameter to encourage editors to add a rating, e.g. [3]
If assessments of projects differ, then add the majority rating to the banner shell and leave any different assessments on those banners, e.g. [4]. These will be manually reviewed by human editors.
If assessments of projects differ, but there is no majority rating, then add banner shell with empty |class= parameter. These will be tracked and reviewed manually.
The bot will also replace redirects to wikiprojects with the actual template.
The bot will obey MOS:TALKORDER insofar as it is reasonable to do so (GIGO), including moving a pre-existing {{WikiProject banner shell}} (this can be changed if desirable).
@Qwerfjkl: Hi. Is the source code publicly available (in your userspace or github)? With such a high number of pages effected, I think it should be. —usernamekiran (talk)00:14, 20 November 2023 (UTC)[reply]
The template redirects are not listed in those categories. I think GoingBatty was asking how you can identify these redirects. — Martin (MSGJ · talk) 13:32, 1 December 2023 (UTC)[reply]
Please note that the module has been edited and now treats opt-out projects differently. It is no longer necessary to treat these banners differently, so I have struck point 8 above — Martin (MSGJ · talk) 14:37, 10 December 2023 (UTC)[reply]
MSGJ, okay, looking at this now, I assume this only holds if the opted-out WikiProject has a class that follows the standard quality assessments? That is to say, if the opted out WikiProject has a non-standard rating it still should be changed, is that right? — Qwerfjkltalk10:51, 11 December 2023 (UTC)[reply]
If it has the same rating as the PIQA rating then it can be removed. If it has a different rating, then it should be retained. (This is the same as all other projects, except that it won't be tracked as a conflicting rating.) — Martin (MSGJ · talk) 11:34, 11 December 2023 (UTC)[reply]
MSGJ, okay, I've updated the code. By the way, is there a list of all the standard quality assessments somehwere? I just realised I should make sure the unified class is on the standard scale. — Qwerfjkltalk11:39, 11 December 2023 (UTC)[reply]
Approved for trial (100 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. In the interest of getting more eyes on this, please do not mark these as minor edits, and be sure to include a link to this page in the edit summary. Primefac (talk) 12:50, 14 December 2023 (UTC)[reply]
Primefac, I am truly sorry, but I seem to have cocked this up. I did not realise that pywikibot saves edits as minor, and somehow the edit-limiting part of the code seems to have failed. You can see the edits here. There are 321 of them, including 100 before I realised I had set the bot to edit exactly one page (and for some reason the bot stopped at exactly 100 there). Again, I apologise for this mess. Martin, you may wish to look over the edits and see if there are any undesirable changes. I have checked a few of them. Here are some mistakes I noticed:
Talk:Zaghloul - stripped the disambig class from a disambiguation page. This happens because it doesn't have a standard content assessment - not sure if this is desirable?
Talk:Aaron Welles - it left the invisible comments behind when moving the WikiProjects. Not much I can do about this.
MSGJ, regarding the multiple new lines issue, can you give a diff to clarify what you mean? For the Disambig issue, would you also suggest keeping other page type classes e.g. File class, Draft class, Category class? Currently I'm only running it on the main talkspace, but I assume it will also need to be run on other talkspaces. I'll make sure the bot doesn't make any more cosmetic edits. — Qwerfjkltalk21:31, 14 December 2023 (UTC)[reply]
Regarding the cosmetic issue, there isn't really an easy way to make sure the bot isn't making a cosmetic edit because it's doing so many different things. I'm not sure the added complexity would be worth it. — Qwerfjkltalk12:42, 16 December 2023 (UTC)[reply]
MSGJ, regarding the insertion of multiple new lines after the banner shell, I believe I know what you're referring to, but could you provide diff where this happened? — Qwerfjkltalk12:20, 16 December 2023 (UTC)[reply]
MSGJ, sorry, my mistake. Anyway that's fixed now, and I believe I have now sorted out all of the bugs from the trial (most of them were more straightforward than I expected). — Qwerfjkltalk14:35, 16 December 2023 (UTC)[reply]
It was mentioned to me that Cewbot 12 is basically running the same task, but with extra features. Do you see any reason that both tasks should be running concurrently? I've struck the extended trial for now until that gets answered. Primefac (talk) 18:29, 17 December 2023 (UTC)[reply]
┌───────────────────────────┘ Primefac, I believe the plan was for Cewbot to run on vital article talk pages and my bot would handle the rest. My code has already been tested in previous bot tasks (#19). I'm also unsure that Cewbot has exactly the same functionality has mine (but I'm on my tablet right now and the code is 2000 lines long, so I might have missed something). Specifically I don't think Cewbot obeys MOS:TALKORDER (though as I said, I'm not entirely sure about this). That said, if you feel it is unnecessary to have both bots run I will defer to your judgement. — Qwerfjkltalk21:44, 17 December 2023 (UTC)[reply]
Primefac, Trial complete. See the latest edits here. There were a few minor bugs (such as here where it added leading whitespace). The only non-cosmetic one that I could see was on Talk:Judicial Commission of Pakistan, where it didn't add the class because it treated a newline as a valid class. The only other bug was it not adding a blank |class= where the talk page already had a WikiProject banner shell but didn't have |class=. I have fixed all of the bugs I found (described above). I also remembered not to make the edits minor this time. — Qwerfjkltalk14:39, 18 December 2023 (UTC)[reply]
I'm not a bot operator but I noticed a non-cosmetic bug on Talk:Apple A14. I think reading the bot logic it should have added an empty class parameter for human assessment right? It just removed the 1=. PARAKANYAA (talk) 18:35, 18 December 2023 (UTC)[reply]
Is it possible for the bot to consolidate the banners into one line? At [8] whoever added the banners added them in a non-conventional way, so now we are left with stuff like
I agree that would be nice. However there are banners which use a lot of parameters (e.g. MilHist) that display on multiple lines (example below). I don't think it would be received well if these parameters were bunched up
{{WPMILHIST|class=Start
<!-- B-Class 5-criteria checklist -->| B1 <!-- Referencing and citations --> = n
| B2 <!-- Coverage and accuracy --> = n
| B3 <!-- Structure --> = n
| B4 <!-- Grammar and style --> = y
| B5 <!-- Supporting materials --> = y
|Historiography-task-force=yes}}
Will your bot make edits like this? Although it is cosmetic, I think it would be beneficial because it discourages editors from using the class parameter in individual banners — Martin (MSGJ · talk) 12:41, 19 December 2023 (UTC)[reply]
MSGJ, yes. It will override whatever class value the old WPBS had, if it can find one on the majority of WikiProjects that is different to the WPBS' one. — Qwerfjkltalk15:12, 19 December 2023 (UTC)[reply]
I don't understand your answer. In the example I gave, the WPBS already had class=start. I am asking if the redundant ones will be removed or if the bot will pass over this page? — Martin (MSGJ · talk) 17:14, 19 December 2023 (UTC)[reply]
I do hope the bot will not be overriding the WPBS parameter in any event. That is for humans to review, if there is a conflict. — Martin (MSGJ · talk) 17:15, 19 December 2023 (UTC)[reply]
Yes, the bot would remove the class parameters from the wikiprojects in that event.
The bot will override a pre-existing WPBS class if the one it finds is different from the one in the WPBS. (I assumed the one from the wikiprojects is more likely to be corrrect.) If this is undesirable I can change that.
Yes, that should not happen. If there is a |class= in WPBS then that has already been set by a human editor. — Martin (MSGJ · talk) 17:23, 19 December 2023 (UTC)[reply]
Yes |blp=no would be useful on biographies I think. It doesn't actually do anything but we can use it to track missing uses — Martin (MSGJ · talk) 21:48, 22 December 2023 (UTC)[reply]
MSGJ, so what it would do is this: Remove |blp=or|living= from WPBIO. If WPBS has |blp=, stop there. Otherwise, if |blp=yes add that to the WPBS. If|blp=no and the article is a biography (which it will be because WPBIO is present) add that to the WPBS. If|blp= is anything else it will totally removed. It will always be removed from WPBIO. One other thing, what's the preferred class for disambiguation pages? I'm unsure which alias to use. — Qwerfjkltalk22:26, 22 December 2023 (UTC)[reply]
That all looks good to me Qwerjkfl. I think we can use |blp= instead of |living=. Disambiguation pages will be automatically detected, so should not need a class in that case. — Martin (MSGJ · talk) 22:11, 26 December 2023 (UTC)[reply]
MSGJ, ah, so we can now remove the class for dabs? Great. As|living= is an alias of |blp=, I assume I should treat it the same i.e. if WPBS has |living= I wouldn't add |blp= or change anything in the WPBS. — Qwerfjkltalk10:45, 27 December 2023 (UTC)[reply]
I'm also slightly concerned in cases like:
WPBIO has a different value from WPBS, so WPBIO's value will be removed, ignoring the conflicting values
WPBIO has an unexpected value (not "y", "yes", "n" or "no"), which would be removed
Yes, that works too. But can I suggest using |blp= rather than |living= (even though the latter is an alias of the former)? — Martin (MSGJ · talk) 17:45, 31 December 2023 (UTC)[reply]
┌──────────────────────────────┘ MSGJ, I've done that. It will not switch |living= over to |blp=, but it will prefer to use |blp= when adding it to the WPBS. — Qwerfjkltalk17:47, 31 December 2023 (UTC)[reply]
{{BAG assistance needed}} I have just approved Cewbot 12, as it seems to have passed its trials with more aplomb than this task. I am looking for a second BAG opinion as I do not see a great need to approve both bots to do the same task, other than maybe the fact that the scope is essentially "every talk page with a banner shell". Primefac (talk) 13:36, 31 December 2023 (UTC)[reply]
I believe it would be a good idea to have a second bot approved for this task, mainly because of the huge number of pages to be touched, sharing responsibility and avoiding reliance on one operator. I support the ramped deployment that Cewbot is using. — Martin (MSGJ · talk) 09:43, 4 January 2024 (UTC)[reply]
A error has come to light and I have reinstated point 8 of the function details. Sorry for any confusion but what I wrote earlier was not quite accurate. — Martin (MSGJ · talk) 16:52, 2 January 2024 (UTC)[reply]
Approved. I would ask that you start slowly (maybe batches of <1000 per day) at the outset just to make sure any lingering issues that weren't seen in the trials can be dealt with. Primefac (talk) 14:23, 6 January 2024 (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 Wikipedia:Bots/Noticeboard.