Wikipedia:Bots/Requests for approval/DatBot 5


 * The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA. The result of the discussion was Symbol keep vote.svg Approved

DatBot 5
Operator:

Time filed: 17:10, Thursday, December 15, 2016 (UTC)

Automatic, Supervised, or Manual: automatic

Programming language(s): Python

Source code available: Per request

Function overview: Replace deprecated WikiProject Chinese-language entertainment template

Links to relevant discussions (where appropriate): Bot requests

Edit period(s): One time run

Estimated number of pages affected: ~2083

Exclusion compliant (Yes/No): No

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

Function details: I could make it skip pages with the template easily, especially as its AutoWikiBrowser but I see no need.

Discussion

 * — xaosflux  Talk 17:34, 15 December 2016 (UTC)
 * Made 22 edits. 10 in a row were fine, but just encountered a problem. Will fix it tomorrow. Dat GuyTalkContribs 19:37, 15 December 2016 (UTC)
 * Fixed some bugs, "prettied" up the RegEx. Dat GuyTalkContribs 15:03, 16 December 2016 (UTC)
 * Please link to the problematic edits, and similar ones where the bug was fixed &mdash; MusikAnimal  talk  19:24, 16 December 2016 (UTC)

OperatorAssistanceNeeded I noticed you are actively editing. Are you able to tend to this bot task? &mdash; MusikAnimal  talk  04:57, 28 December 2016 (UTC)
 * In the first few edits such as, if the importance was x in the language entertainment template, it was also x when converted to WPChina template. I changed it to remove the importance if there is no WPChina template since it may vary. Then there were multiple fine edits with no issues, but I encountered a minor issue at Talk:Jet Li. The bot was confused about WPChina being on the top, as I made it check only under it. That is fixed now. I've also added a fix for the removal of the newline, causing the }} to be moved to the same line as the WikiProject template. At Talk:Hero (2002 film) I added some RegEx for it to check for other task forces. By the way, the edits you see are good because I did not set it on autosave for debugging reasons. Dat GuyTalkContribs 19:34, 16 December 2016 (UTC)
 * – wonderful :) Let's do another 50 edits, for safe measure &mdash; MusikAnimal  talk  20:01, 16 December 2016 (UTC)
 * is the only major issue I encountered. Can't really do anything about that. Different ratings in different WikiProjects. DatBot sticks with the now-deprecated template. Dat GuyTalkContribs 22:30, 16 December 2016 (UTC)
 * What about here, where there was a class specified for WikiProject China, but not for WikiProject Chinese-language entertainment? Perhaps we should use the class of whichever comes first, so if there's not one on the first instance, use the second. I know it's a pain, but it might be good to fix this particular edit, and any others where there was a classification but there isn't now &mdash; MusikAnimal  talk  22:50, 16 December 2016 (UTC)
 * Will do that, but it's been a long day so I'm going to sleep. Will finish the other request at task 4. I am going on vacation, so I might be able to either fix it there or when I come back. Please don't expire this if I don't fix it during my break. Thanks, Dat GuyTalkContribs 22:53, 16 December 2016 (UTC)
 * Let's also make sure the same issue doesn't happen for the importance parameter. It looks like there may also be aliases, e.g. imp instead of importance . We should take these into account as well.And no worries, we won't expire the BRFA. Enjoy your vacation! :) &mdash; MusikAnimal  talk  22:58, 16 December 2016 (UTC)
 * It already looks for imp. Also, the vacation is actually for nearly THREE weeks, so I'll definitely try my hardest to get it done under that time. Thanks, Dat GuyTalkContribs 14:50, 18 December 2016 (UTC)
 * Yes. Working on it now. Dat GuyTalkContribs 18:40, 28 December 2016 (UTC)

&mdash; MusikAnimal  talk  05:25, 29 December 2016 (UTC)
 * ✅. If there is no class for Chinese-language entertainment, it takes the class from WikiProject China (if it exists). Dat GuyTalkContribs 20:45, 28 December 2016 (UTC)
 * Example of what I added: . Only issue I had was with, since there was a double ||. Not much you can really do about that. There were gaps in the edits, but because of off-wiki situations, not any bugs :). Dat GuyTalkContribs 13:35, 29 December 2016 (UTC)
 * Alright, several issues, I'm afraid: Here it stripped out the inherit, shouldn't we retain that? Here it not only stripped out inherit, but also strangely assigned start, any idea why that happened? Next, here it changed WikiProject banner shell to the nonexistent WikiProject banner Shell (uppercase S), that breaks the display entirely. Here it stripped out yes, I'm unsure if it's OK or makes sense to have both cinema and entertainment as a task force. Next, about the issue you found with double pipes : what happens if the bot runs against that (just curious)? Finally, just to be sure, are we intentionally ignoring the importance of WikiProject Chinese-language entertainment ? &mdash; MusikAnimal  talk  17:28, 29 December 2016 (UTC)
 * I'll go through each point, descending.
 * That'll be quite easy to add. Where would you like it to go? I suggest it being at the end, after any task forces
 * Not sure, weird.
 * I thought I fixed that already while sandbox testing.
 * Nothing happens. It looks specifically for \|.
 * Yes, since chinese-language entertainment is a specific topic within a broader one.
 * Hopefully that addresses everything. Regarding the tasks I'm doing, expect to see them on my sandbox soon. Dat GuyTalkContribs 21:22, 29 December 2016 (UTC)
 * You stated on IRC there are examples in your sandbox. The most recent example still ignores the yes that was on WikiProject China. Let's make sure all valid parameters are retained. The ordering I don't think matters much. For WikiProject Chinese-language entertainment, you can probably ignore any parameter other than the class. Also, are we accounting for template redirects, such as WPCHINA?For the next trial, I strongly recommend you do much of it with autosave off so that you can notice and fix any bugs you encounter. I've fixed all the bot errors I pointed out above, but next time kindly consider reviewing all the trial edits and do any necessary cleanup yourself, pointing out the errors here in the BRFA. This will save time for us both :) &mdash; MusikAnimal  talk  22:25, 29 December 2016 (UTC)
 * Apologies. For some reason, dumb me thought it was a good idea to turn the find+replace off. As per recommendation, tomorrow I'll test with multiple different possibilities on my sandbox. Thanks for your patience. Dat GuyTalkContribs 23:06, 29 December 2016 (UTC)
 * Any updates on resolving the above issues? &mdash; MusikAnimal  talk  00:12, 12 January 2017 (UTC)
 * Any updates on resolving the above issues? &mdash; MusikAnimal  talk  00:12, 12 January 2017 (UTC)

D &mdash; MusikAnimal  talk  19:02, 15 January 2017 (UTC)
 * Last call... We discussed on IRC a while back about doing some test cases in your sandbox, then doing another trial. Any progress on that? Side note, you can of course contact me anytime on IRC, but please do remember the wiki is preferred :) &mdash; MusikAnimal  talk  03:32, 23 January 2017 (UTC)
 * As a note to any BAG members, I am semi-active currently. I've injured my wrist pretty badly, but I'll hopefully get it done by tomorrow (Tuesday) 9 PM UTC. Sorry for delaying the course of this BRFA. I've said this plus some more to MA on IRC, but I can expand on it here if it is requested. Again, apologies if it seemed like I'm 'ignoring' this. Thanks, Dat GuyTalkContribs 20:34, 23 January 2017 (UTC)
 * Due to technical restrictions, I am going to switch to Python. Dat GuyTalkContribs 18:56, 26 January 2017 (UTC)

has informed me over IRC the new Python implemented is good to go, so let's do another 50-edit trial &mdash; MusikAnimal  talk  20:12, 30 January 2017 (UTC)
 * Perhaps 1 too less. In the first 3 edits, I found that the listas param was changed since I was using the lowercase text of the wikipage. I changed it to be more complex, but use the normal wikitext. However, I forgot to change the regex substitute command for if there is no WikiProject China template, to use the China-Ent class (pretty much a backup, this problem was raised with AWB above). Therefore, the last 36 edits do not have a class if there was only WPChina-Ent. This was the only issue as far as I can see. Any comments? Dat GuyTalkContribs 17:05, 31 January 2017 (UTC)
 * First, do you plan on fixing the bad edits? Alternatively you can rollback them all and we'll iterate over them again. Once that's done feel free to do another 50-edit trial, and link to the results if you can (example) &mdash; MusikAnimal  talk  20:43, 31 January 2017 (UTC)
 * Done, contribs here. Selectively done ones with issues regarding the China-Ent class (problem was, I was looking for [wW]ikiproject (note capitalisation) instead of [wW]ikiProject. Dat GuyTalkContribs 21:18, 31 January 2017 (UTC)

Some spot checks after the run is complete would be appreciated, but we've kinked out a lot of bugs over the past month and a half so I trust the bot is stable :) Thanks for your persistence to get this done! &mdash; MusikAnimal  talk  21:22, 31 January 2017 (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.