Wikipedia:Bots/Requests for approval/Mdann52 bot 15
- 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.
New to bots on Wikipedia? Read these primers!
- Approval process – How this discussion works
- Overview/Policy – What bots are/What they can (or can't) do
- Dictionary – Explains bot-related jargon
Operator: Mdann52 (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 09:24, Wednesday, June 12, 2024 (UTC)
Function overview: Removing instances of {{AMQ}}/{{FMQ}} following TfD, and adding other missing IDs in related templates
Automatic, Supervised, or Manual: Automatic
Programming language(s): Python, PWB framework
Source code available: github PR
Links to relevant discussions (where appropriate): WP:BOTREQ#Adding Facility IDs to AM/FM/LPFM station data
Edit period(s): one time run
Estimated number of pages affected: c20,000 pages using the template or linked to the categories in the BOTREQ
Namespace(s): Article
Exclusion compliant (Yes/No): Yes
Function details: The bot will initally remove all instances of {{FMQ}}/{{AMQ}} following TfD, updating those and the templates that currently transclude them. It will query the new FCC public API, and if the callsign has a FCC Facility ID it will update the template and update the relevant Wikidata entry (seperate BRFA filed over there). If the facility ID is not found, then it will remove the template (this will largely affect Mexican and Canadian stations, which have been removed from the new database).
Following this, I will run on Category:Pages using AM station data without facility ID, Category:Pages using FM station data without facility ID and Category:Pages using LPFM station data without facility ID, which may or may not have any members remaining after this task.
Discussion
[edit]Approved for trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. Please do 25 for each template. Primefac (talk) 15:19, 27 June 2024 (UTC)[reply]
- Trial complete. 50 edits done. There may be more than 25 of each, as some pages use both templates (such as this edit), and other pages were caught as they used templates that link to those two
- Few issues encountered I want to flag up:
- this edit - was due to a regex issue in my code, now fixed. Bot reran on page, here
- A number of stations (callsign represented by [A-Z][0-9]{3}[A-Z]{2}) are present in FCC data but not in the API. I've manually excluded these for now, will have to get the data from the FCC in another way. I don't think this will affect the bot, other than having an extra bit of CSV processing, and doing a second sweep (or manual fixes).
- Additional wrapper template was noted - {{LPFM station data}}, in addition to the ones mentioned in the BRFA ({{AM station data}}/{{FM station data}}). The bot will also now fix these, as they just wrap the basic templates above. Apologies I forgot to mention these would be changed above.
- this edit where the bot reverted itself. I've added validation that the callsign looks "right" (starts with A-Z) before processing it, if not it will skip.
- Some FM radio stations don't include the FM in the callsign, as the previous template and site handled it. I've had to change so the bot can do this to add it back in to make the new search work
- I'm happy, after a few issues being found while supervising the first few edits, the bot is working as expected. Happy to do an extended trial if you want to further test the issues in the first few edits, but I don't think it will help (I've manually run the bot against those revisions and all now looks ok) Mdann52 (talk) 21:01, 27 June 2024 (UTC)[reply]
- {{BAG assistance needed}} extended trial? Or approve? HouseBlaster (talk · he/they) 17:05, 5 July 2024 (UTC)[reply]
- Approved. Trusted operator, no need to test the fixes. Primefac (talk) 18:01, 5 July 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.