Wikipedia:Bots/Requests for approval/Dreamy Jazz Bot 7
- 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.
Operator: Dreamy Jazz (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 12:17, Wednesday, March 31, 2021 (UTC)
Automatic, Supervised, or Manual: automatic
Programming language(s): Python (pywikibot)
Source code available: Not planning to release, but available on request.
Function overview: Adding |musician-work-group=yes
and |musician-priority=
to {{WikiProject Biography}} on the talk pages of musicians. If there is no assigned class the bot will attempt to autoassess, and if there is no living parameter the bot will autofill it. The bot will add {{WikiProject Biography}} and the above parameters if it not there.
Links to relevant discussions (where appropriate): Wikipedia talk:WikiProject Musicians § A proposed bot to tag people as supported by this WikiProject
Edit period(s): Infrequent runs (probably every few months)
Estimated number of pages affected: Around 29,000 talk pages on the first run
Exclusion compliant (Yes/No): Yes
Already has a bot flag (Yes/No): Yes
Function details: This proposed bot would work on talk pages of articles which are in a date of birth or death category and are in a musician category. The bot task would:
- If {{WikiProject Biography}} is present with a defined class, living parameter and also has
|musician-work-group=yes
the bot will skip the page - If {{WikiProject Biography}} is present with a defined class and living parameter but does not have
|musician-work-group=yes
, add|musician-work-group=yes
and|musician-priority=
(the priority being deliberately empty) - If {{WikiProject Biography}} is present without a defined class or living parameter, add
|musician-work-group=yes
and|musician-priority=
with auto-assessing / auto-filling where possible class / living respectively - If there is no {{WikiProject Biography}}, add
{{WikiProject Biography|living=yes or no|class=autoassesed if possible otherwise blank|listas=|musician-work-group=yes|musician-priority=}}
I will generatehave generated a list of categories which would be used for the musician category check. The bot will check if the article is in at least one of both sets of categories, so that the article has been categorised as musician related and also as a person. This task would extend code written for Wikipedia:Bots/Requests for approval/Dreamy Jazz Bot 5 such that living people will be tagged as living, autoassessing would be done if possible and {{WikiProject Biography}} would be added if it isn't already there. The bot will respect {{nobots}}. This bot task will not edit the page if Task 4.3 (this task) has edited the page before, and will not attempt to autoassess, fill living parameter or add {{WikiProject Biography}} to the talk page if Task 4.2 or Task 4 has edited the page (but will add the musician work group parameters to existing {{WikiProject Biography}} templates). This is done to prevent the bot from edit warring by reinstating material it already has added before as Task 4 and 4.2 auto assess, add living and add the template. If the talk page is missing any one of these three the bot has been partially / fully reverted.
What a musician category is will be defined by a list of categories I will generate and then refine soonon the computer, but the next wikilink allows others to see it. Said list will beis at User:Dreamy Jazz Bot/Task 4.3/musician categories. These categories will be all subcategories of Category:Musicians, which I will filter to remove categories which shouldn't be used. Dreamy Jazz talk to me | my contributions 14:01, 31 March 2021 (UTC) (modified 22:50, 1 April 2021 (UTC))[reply]
- I've created the list. I would add that the WikiProject dicussion only had one support with no one else commenting. I did leave it for a while, so I don't think there is opposition for this from members of the WikiProject. Dreamy Jazz talk to me | my contributions 11:44, 1 April 2021 (UTC)[reply]
- I would note that said list is large so your browser may take a while to load the page. If so, I suggest using the edit link as it doesn't have to render the links (i.e. this link). The bot won't use this page as the definitive list of categories as that will be a text file stored on the computer. The list is there for the convenience of other editors, but I can fix missed issues with the category list. I generated it by filtering out all subcategories of Category:Musician using keywords (such as "bassists") and I'm pretty confident that the list does not contain any non-musician related categories. Dreamy Jazz talk to me | my contributions 22:39, 1 April 2021 (UTC)[reply]
- Based on running a script on the first 5000 pages in Category:WikiProject Biography articles, 80 of them would have been edited. Assuming that the distribution of pages to edit is equal throughout the category, around 29,000 pages will be edited once all 1,817,343 talk pages are processed. This is a very rough estimation, but I can't see the actual number of pages edited being very different. This does not include where the bot would add the banner, but as my bot just ran BRFA approved tasks to add WikiProject Biography to people very few pages on the initial run will include adding the banner. Dreamy Jazz talk to me | my contributions 21:44, 4 April 2021 (UTC) (modified 23:03, 5 April 2021 (UTC))[reply]
- I would note that said list is large so your browser may take a while to load the page. If so, I suggest using the edit link as it doesn't have to render the links (i.e. this link). The bot won't use this page as the definitive list of categories as that will be a text file stored on the computer. The list is there for the convenience of other editors, but I can fix missed issues with the category list. I generated it by filtering out all subcategories of Category:Musician using keywords (such as "bassists") and I'm pretty confident that the list does not contain any non-musician related categories. Dreamy Jazz talk to me | my contributions 22:39, 1 April 2021 (UTC)[reply]
Discussion
editApproved for trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. Straight-forward task. Primefac (talk) 13:11, 9 April 2021 (UTC)[reply]
- I'll get this fully coded and run the trial soon. I'm a little busy at the moment, but it shouldn't take too long as a lot of the code is already written. Dreamy Jazz talk to me | my contributions 22:22, 10 April 2021 (UTC)[reply]
- I've run around 15 edits so far. I encountered a few errors, which I think I've fixed. Will start the bot again tomorrow to complete the trial. Dreamy Jazz talk to me | my contributions 23:19, 11 April 2021 (UTC)[reply]
- Trial complete. I've run the bot for the trial period. I had an issue with the code that counted the number of edits made, so it made 2 more than the 50 granted. There were a few errors that were encountered in the bot trial, but issues are confined to the first 20 edits or so with only a few of them having issues. These issues were mostly ensuring that the bot did not change whitespace in pre-existing {{WikiProject Biography}} templates. I've fixed all the errors which have presented themselves. I'll give a better analysis soon of errors and my fixes, but for the time being these edits, this edit and this edit are the edits made in the trial by the bot. Dreamy Jazz talk to me | my contributions 11:06, 12 April 2021 (UTC)[reply]
- 1, 2: Whitespace issues in the edit caused spacing inside the template to change. Didn't effect the visual output of the page. I found an issue in the code and fixed it
- 3: Similar issues to above, but fixed.
- 4, 5, 6: Duplicate arguments added if the pre-existing argument was the first argument in the wikitext. Issue with how the code detected a pre-existing argument meant that the first parameter name included | which caused the check to add the duplicate argument. Fixed.
- 7: Whitespace issues again. Fixed.
- The 45 other edits had no issues. Also all the talk pages edited were talk pages for articles about musicians, so the addition of the workgroup parameter was appropriate. The bot ran through the first few categories in the musicians list and I think all situations have been covered. Dreamy Jazz talk to me | my contributions 13:17, 12 April 2021 (UTC)[reply]
- Trial complete. I've run the bot for the trial period. I had an issue with the code that counted the number of edits made, so it made 2 more than the 50 granted. There were a few errors that were encountered in the bot trial, but issues are confined to the first 20 edits or so with only a few of them having issues. These issues were mostly ensuring that the bot did not change whitespace in pre-existing {{WikiProject Biography}} templates. I've fixed all the errors which have presented themselves. I'll give a better analysis soon of errors and my fixes, but for the time being these edits, this edit and this edit are the edits made in the trial by the bot. Dreamy Jazz talk to me | my contributions 11:06, 12 April 2021 (UTC)[reply]
- I've run around 15 edits so far. I encountered a few errors, which I think I've fixed. Will start the bot again tomorrow to complete the trial. Dreamy Jazz talk to me | my contributions 23:19, 11 April 2021 (UTC)[reply]
- For benefit of record, diffs permalink. --TheSandDoctor Talk 01:08, 15 April 2021 (UTC)[reply]
- @Dreamy Jazz: How does this task determine who a musician is? --TheSandDoctor Talk 01:13, 15 April 2021 (UTC)[reply]
- TheSandDoctor, as I've mentioned above its any article which:
- Is in at least one of the categories at User:Dreamy Jazz Bot/Task 4.3/musician categories (might take a while to load as it's a long page)
- Is also in at least one of the categories listed at either User:Dreamy_Jazz_Bot/Task_4.2/categories or User:Dreamy Jazz Bot/Task 4/categories
- The first page contains subcategories of any depth of Category:Musicians which have been filtered to ensure that the final list contains categories for musicians by using keywords (i.e. categories containing bassists are good but categories containing actors isn't). I also checked using AWB all categories where it was not clear from the category name alone whether they were for musicians. The second set of categories is the categories used for Wikipedia:Bots/Requests_for_approval/Dreamy_Jazz_Bot_5 and Wikipedia:Bots/Requests_for_approval/Dreamy_Jazz_Bot_4 which means that this checks if the article is in a year of death or birth like category (excluding Category:Living people).
- This means that in summary the bot will add the musician work group to a talk page if the article has been categorised as a musician and a person (specifically death / birth categories being used).
- On a side note the year of death / birth lists need updating as I notice there are some redlinks now present, so I will be regenerating the lists. However, they will still contain year of death and year of birth categories as before. I would also note that the bot uses a local copies of these lists, so editing them won't affect the bot. Dreamy Jazz talk to me | my contributions 07:37, 15 April 2021 (UTC)[reply]
- TheSandDoctor, as I've mentioned above its any article which:
- @Dreamy Jazz: Thank you. --TheSandDoctor Talk 14:25, 15 April 2021 (UTC)[reply]
Approved. Looks good to me. As per usual, if amendments to - or clarifications regarding - this approval are needed, please start a discussion on the talk page and ping. --TheSandDoctor Talk 14:27, 15 April 2021 (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.