Wikipedia:Bots/Requests for approval/JJPMaster (bot)
Operator: JJPMaster (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 22:20, Thursday, January 2, 2025 (UTC)
Automatic, Supervised, or Manual: automatic
Programming language(s): Python
Source code available: https://github.com/JJPMaster/jjpmaster-bot-enwp-t1 (GPLv3)
Function overview: Updates User:JJPMaster/Editnotice requests
Links to relevant discussions (where appropriate):
Edit period(s): Continuous
Estimated number of pages affected: 1
Exclusion compliant (Yes/No): No
Already has a bot flag (Yes/No): No
Function details: Every time a new request to modify or create an editnotice is made, the bot adds an entry to User:JJPMaster/Editnotice requests. While this falls under WP:EXEMPTBOT, I am asking for the bot to be flagged for the sake of avoiding rate-limiting.
Discussion
[edit]- As per https://gerrit.wikimedia.org/r/plugins/gitiles/operations/mediawiki-config/+/refs/heads/master/wmf-config/InitialiseSettings.php#3137, your bot can currently perform 90 edits per minute without a bot flag. Will it exceed this limit? – DreamRimmer (talk) 06:20, 3 January 2025 (UTC)
- @DreamRimmer: I wasn't really concerned about limits on the actual number of edits (I doubt it will exceed that), but more the fact that it attempts to make an edit every time the Template talk namespace is edited. I know from AWB experience that null edits are considered edits for the sake of API limits, so I was concerned about that being a problem here. JJPMaster (she/they) 06:25, 3 January 2025 (UTC)
- You can add a condition to check if there are any edit requests before making an API request to edit the page, ensuring that the page is only edited when there are edit requests (i.e., when editnotices is not empty). This is just a suggestion; I have no problem with this BRFA :)
- @DreamRimmer: I wasn't really concerned about limits on the actual number of edits (I doubt it will exceed that), but more the fact that it attempts to make an edit every time the Template talk namespace is edited. I know from AWB experience that null edits are considered edits for the sake of API limits, so I was concerned about that being a problem here. JJPMaster (she/they) 06:25, 3 January 2025 (UTC)
if editnotices:
annotated_list = ''.join(f'* [[{j}]]\n' for j in editnotices) if len(editnotices) > 0 else '\n* \'\'None\'\''
print(editnotices)
page.text = "Current editnotice edit requests:\n" + annotated_list
page.save(f"Bot: Updating editnotice request list ({len(editnotices)} requests)")
else:
print("no edit requests found")
– DreamRimmer (talk) 09:13, 3 January 2025 (UTC)
- @DreamRimmer: This has been Implemented, although I didn't use your specific code to do it. See commit, diff. JJPMaster (she/they) 13:06, 3 January 2025 (UTC)
- Looks good! You are smart. Thanks for doing this. – DreamRimmer (talk) 13:25, 3 January 2025 (UTC)