Wikipedia:Bots/Requests for approval/Qwerfjkl (bot) 32
- 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: Qwerfjkl (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 19:33, Thursday, March 13, 2025 (UTC)
Automatic, Supervised, or Manual: automatic
Programming language(s): Python
Source code available: User:Qwerfjkl (bot)/code/WPNFL, because I can't figure out how to share notebooks on paws
Function overview: Tag pages in Category:National Football League players by team with {{WikiProject National Football League}}
Links to relevant discussions (where appropriate): Request on my talk page / discussion at WPNFL
Edit period(s): one time run
Estimated number of pages affected: ~500
Exclusion compliant (Yes/No): Yes
Already has a bot flag (Yes/No): Yes
Function details: The bot will tag pages in Category:National Football League players by team with {{WikiProject National Football League}}. Because I just modified the code for Task 26, it will additionally run all of the changes from that task. Please let me know if this is undesirable, and I will disable this - I just did it this way because it was the easiest.
Discussion
[edit] Approved for trial (30 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. Feel free to make PIQA changes if it helps. – DreamRimmer (talk) 04:04, 14 March 2025 (UTC)[reply]
I haven't had time to do a full code review, but a few notes so far:
- Don't you need to import requests and json?
- Line 7 (
import datetime
) and line 13 (from concurrent.futures import ThreadPoolExecutor # threading
) are not necessary. - Line 254 (
old_section = deepcopy(new_code)
) createsold_section
but then that is never used. - Line 257 (
wpnfl = new_code.filter_templates(matches=wp_nfl_filter)
) referenceswp_nfl_filter
but I think that should bewpnfl_filter
instead?
Has this been tested in any dry-run mode yet? — Naomi Amethyst 04:11, 14 March 2025 (UTC)[reply]
- DreamRimmer,
Trial complete. See these 32 contributions (don't know how I managed to do an extra edit there). Most of the "PIQA" changes were limited to things like removing
|1=
, moving|blp=
to the top of WPBS, and expanding the template name for WPBS. I also forget to mention (sorry!), I used ORES to determine whether the articles were stubs or not (with >0.8 confidence). This occured for these edits: Talk:Bobby Rome II (Diff ~1280399022), Talk:C. J. Ravenell (Diff ~1280399042), Talk:Carlos Locklyn (Diff ~1280399055). The first seems reasonable, the other two seem more like start-class to me, so I've bumped the threshold to 0.9 - let me know if you want me to disable this completely.
Also, I made this PetScan query to check how many pages will need to be edited - the number is about 230.
NaomiAmethyst, I did no testing for the code I published. (PAWS refused to run it for some reason.) I've run it on my computer instead, and fixed various bugs. (old_section
is just used for debugging, to show a difference between wikicode before and after without showing the whole page.) — Qwerfjkltalk 12:05, 14 March 2025 (UTC)[reply]- For the moment! I anticipate at least 500 more between the end of April and beginning of September. Hey man im josh (talk) 21:37, 14 March 2025 (UTC)[reply]
- Look good. ORES is generally reliable for assessing stub articles, so I don't see any issue. Since this is a one-time task, there is nothing that needs to be changed for now, but since Josh mentioned there might be more pages to fix in the future, it would be best for future tasks to use LiftWing instead, as ORES is being deprecated. – DreamRimmer (talk) 07:05, 15 March 2025 (UTC)[reply]
Approved. – DreamRimmer (talk) 07:07, 15 March 2025 (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.