Wikipedia:Bots/Requests for approval/UrbanBot 2


 * The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at Bots/Noticeboard. The result of the discussion was

UrbanBot 2
Operator:

Time filed: 18:17, Saturday, July 15, 2023 (UTC)

Automatic, Supervised, or Manual: supervised

Programming language(s): Python (Pywikibot)

Source code available: Main repository for UrbanBot's code Source code file for task

Function overview: UrbanBot's task is to mass-add short descriptions to pages that don't have one.

Links to relevant discussions (where appropriate): Original discussion at village pump Wikidata discussion for bot task

Edit period(s): Runs whenever the bot operator runs the script

Estimated number of pages affected: Any page lacking a short description may be edited by UrbanBot. This is not to say it will try to add short descriptions to every page lacking one.

Exclusion compliant (Yes/No): Yes

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

Function details: 1. The bot operator will first enter a category name from the English Wikipedia. This category will be used to group pages lacking a short description which will all have the same short description added to them.

2. The bot operator will enter the short description to be added to the pages in the Wikipedia category.

3. The code will check the short description entered to ensure that it does not exceed the character limit.

4. The bot will follow through these steps for each page:

4a. The bot will check if the page already has a short description or a template-applied short description.

4b. If the Wikipedia page does not already have a short description, the bot will write the short description specified by the bot operator in step 2 into the item.

4c. The bot will loop through to the next page in the category and run all steps in step 4 again until every page has been scanned.

5. The bot will output statistics on the number of pages scanned, number edited, etc.

Note: The bot was originally submitted at Wikidata and was designed to edit Wikidata per this village pump discussion, but upon reviewing the Wikiproject Short Descriptions page and receiving feedback and information at Wikidata it's evident that for the intended task the bot should be based at Wikipedia and edit Wikipedia short descriptions rather than Wikidata descriptions.

Note 2: Running the bot through limited testing for the code.

Discussion

 * Can you give some examples where it's helpful for all pages in the category to have the same short description? In such cases, it would probably be more useful to apply the shortdesc via a template instead. – SD0001  (talk) 06:55, 16 July 2023 (UTC)
 * One such category would be Category:Linux distributions. I ran UrbanBot through this category to test the code when UrbanBot was still editing Wikidata. UrbanBot applied the following Wikidata description to articles in the category that did not have a short description or Wikidata description: "Linux distribution". This sort of thing works well when all pages in a category share the same main property, such as all being a Linux distribution. However, other categories wouldn't be as good for this, such as Category:Alumni of Lancaster University, when the only thing the pages in this category have in common was that they were all alumni of Lancaster University. This isn't what these people are known for though, evident by a variety of existing Short descriptions in this category such as "Danish sociologist" and "Irish politician". Urban Versis 32KB ⚡ (talk / contribs) 16:40, 16 July 2023 (UTC)
 * How will the bot or bot operator ensure that the category assignment is correct? Honor (brand) is in, but it does not appear to be a Linux distribution. Also TurnKey Linux Virtual Appliance Library, which is in that category but does not appear to fit the proposed SD. – Jonesey95 (talk) 03:22, 17 July 2023 (UTC)
 * That's why the bot is classified as supervised; I will look at the edit history of the bot and make sure each article is a Linux distro, in this case. Also, if a page that's not a Linux distribution is in the category for Linux distributions, then there's not reason for it to be in that category IMO. Urban Versis 32KB ⚡ (talk / contribs) 15:02, 17 July 2023 (UTC)

In step 1 or step 4a, how does the bot determine if there is a short description that has been assigned by a template? Will the bot apply manual short descriptions to override template-based SDs? If so, why, or under what conditions? – Jonesey95 (talk) 03:25, 17 July 2023 (UTC)
 * Good point. I have fixed this to where the bot will also check if there is a template-applied short description on the page, and if so, to not override the SD as it would have before. Urban Versis 32KB ⚡ (talk / contribs) 15:22, 17 July 2023 (UTC)

According to there are over 1 million pages that are lacking shortdescs. Are you seriously saying (based on the "supervised" nature of this task) that you and your bot are going to add 1 million shortdescs? Primefac (talk) 16:09, 6 August 2023 (UTC)
 * No. If you're referring to the fact that I put "any page lacking a short description" to the estimated number of pages affected, I was trying to explain that any page lacking an SD could potentially be modified by UrbanBot. I wasn't saying that UrbanBot would try to add an SD to every single page lacking one. Urban Versis 32KB ⚡ (talk / contribs) 20:57, 6 August 2023 (UTC)
 * A slightly more well-defined scope would be appreciated. Feel free to amend the main proposal directly. Primefac (talk) 07:42, 8 August 2023 (UTC)
 * It seems to me that the intended scope is "pages lacking short descriptions in manually selected categories". Difficult to put a number on that. casualdejekyll  02:38, 17 September 2023 (UTC)
 * ...I had a brainfart and for some reason thought I was replying to a week old comment and not a month old comment. Oops. casualdejekyll  02:38, 17 September 2023 (UTC)
 * @Casualdejekyll Again, there is no defined number of pages affected by UrbanBot. Any of the million or so pages could possibly be affected by UrbanBot, but not all million pages will be affected. I am just trying to help reduce the number of pages lacking a short description. (Also I know that this page hasn't gotten any attention for the past month, I'm still waiting for an approval.) Urban Versis 32KB ⚡ (talk / contribs) 15:43, 17 September 2023 (UTC)
 * @Urban Versis 32, I don't think this is a good task for a bot. You can use AWB for this. You haven't given a clear enough scope for this task. — Qwerfjkl  talk  14:42, 11 October 2023 (UTC)
 * The scope of this bot is to mass-add short descriptions to articles which don't already have an sd in a category. This could automate long arduous tasks needed to be done by a human. Urban Versis 32KB ⚡ (talk / contribs) 00:37, 12 October 2023 (UTC)
 * @Urban Versis 32, I feel there are few categories that would actually be suitable for this. Have you posted a notice at Wikipedia talk:Short description? — Qwerfjkl  talk  06:19, 12 October 2023 (UTC)

If such a task is to be run, it would need to be supervised pre-edit. There are a lot of irregularities in Wikipedia's category tree so I will look at the edit history of the bot and make sure each article is a Linux distro doesn't sound like a great idea. You would probably want to restructure the task so that the bot shows a proposed diff for each page on the command line and prompts approval from the operator. In such a case, it would be considered "semi-automation" and so edits can be done via main account, or a dedicated alt account. No bot approval is required.

If there are indeed some categories in which all pages have been checked and fit a single short description, please file a BRFA limiting the scope to those categories specifically. – SD0001  (talk) 14:18, 12 October 2023 (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 Bots/Noticeboard.