Wikipedia:Bots/Requests for approval/Bot0612 9
[[User:Bot0612|Bot0612 9]]
{{Newbot|Bot0612|9}}
Operator: {{botop|Firefly}}
Time filed: 19:42, Saturday, May 26, 2018 (UTC)
Automatic, Supervised, or Manual: automatic
Programming language(s): Python
Source code available: https://github.com/rwjuk/wikimediabots/blob/master/VitalArticlesBot/update_vital_article_counts.py
Function overview: Update the section counts and article assessment icons for all levels of Wikipedia:Vital articles. Per this BOTREQ.
Links to relevant discussions (where appropriate): Wikipedia:Bot_requests#Updating_vital_article_counts
Edit period(s): Daily, ~0000 UTC or other sensible time
Estimated number of pages affected: ~50 at present - [https://en.wikipedia.org/wiki/Special:PrefixIndex?prefix=Vital+articles&namespace=4&hideredirects=1 list here]
Exclusion compliant (Yes/No): No
Already has a bot flag (Yes/No): No
Function details: Update the section counts and article assessment icons for all levels of Wikipedia:Vital articles. If more than one project has assessed an article differently, the highest assessment is used. See this [https://en.wikipedia.org/w/index.php?title=User:Firefly/sandbox&diff=843083790&oldid=843083567 example edit] - more examples can be provided if needed.
=Discussion=
{{BotTrial|1 page of your choice per level}} Review them for issues immediately after run, revert/fix if there are problems. Headbomb {t · c · p · b} 19:50, 26 May 2018 (UTC)
:I've written a bot fairly recently for the similar function here, which purely based on the talk page categories. I have a few questions for this task
:#After the ga/fa become dga/ffa, does it add the {{icon|DGA}}/{{icon|FFA}} back?
:#:Sidenote here, enwiki doesn't have a DGA category, this is bothering me.
:#Wikipedia:Vital_articles#Post-classical_history_(13_articles)'s Crusades is rated A and GA, and noted as {{icon|A}} {{icon|GA}}, by selecting the highest assessment, would GA status be dropped?
:Justincheng12345 (talk) 08:48, 28 May 2018 (UTC)
::As it stands, yes, the GA status would be dropped, but that doesn't really seem a good idea. GA status is somewhat outside of the main assessment scale, so I'll tweak that functionality. I also missed the adding of the DGA/FFA statuses, I'll fix that. {{BotTrialComplete}} in any case - levels 1-3 didn't need any updating, example edits for 4 and 5 [https://en.wikipedia.org/w/index.php?title=Wikipedia:Vital_articles/Level/4/People&diff=prev&oldid=843112153 here] and [https://en.wikipedia.org/w/index.php?title=Wikipedia:Vital_articles/Level/5/People/Artists,_musicians,_and_composers&diff=prev&oldid=843118645 here]. [https://en.wikipedia.org/w/index.php?title=Wikipedia:Vital_articles&diff=prev&oldid=843099928 This] error was caused by my code erroneously counting line items without articles - I have duly self-trouted and fixed the code. ƒirefly ( t · c · who? ) 10:35, 28 May 2018 (UTC)
:::Were all the assessment icons accurate? Or did it just not touch the icons? Headbomb {t · c · p · b} 11:04, 28 May 2018 (UTC)
::::The bot deemed the assessment icons accurate - for an example of it editing icons, I've done a test [https://en.wikipedia.org/w/index.php?title=User:Firefly/sandbox&diff=843323534&oldid=843323040 here] where I set all the icons to stub beforehand. The bot correctly re-instated all the icons as they were in the revision before my edit. The one difference was Gram per cubic centimetre - which was listed as 'stub' before, but is in fact unassessed. ƒirefly ( t · c · who? ) 11:24, 28 May 2018 (UTC)
{{BotExtendedTrial|1 full run}} Alright, then let's see a full run. Headbomb {t · c · p · b} 12:18, 28 May 2018 (UTC)
:{{BotTrialComplete}} - see the bot's contribs. [https://en.wikipedia.org/w/index.php?title=Wikipedia:Vital_articles/Level/5/People/Sports_figures&diff=prev&oldid=843386726 This error] was caused by the non-standard header formatting - code adjusted to take this and some other potential idiosyncrasies into account. ƒirefly ( t · c · who? ) 22:37, 28 May 2018 (UTC)
{{BotApproved}} I suggest uppercasing the A/B/C/Start... etc classes in the icons, but other than that, it seems good to go. Headbomb {t · c · p · b} 23:46, 28 May 2018 (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 WT:BRFA.