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  Approved.

Operator: DatGuy (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)

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): Wikipedia:Bot requests#Replace deprecated WikiProject Chinese-language entertainment template

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 ((bots)) template easily, especially as its AutoWikiBrowser but I see no need.

Discussion[edit]

Approved for trial (25 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete.xaosflux Talk 17:34, 15 December 2016 (UTC)[reply]
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)[reply]
Trial complete. Fixed some bugs, "prettied" up the RegEx. Dat GuyTalkContribs 15:03, 16 December 2016 (UTC)[reply]
@DatGuy: Please link to the problematic edits, and similar ones where the bug was fixed MusikAnimal talk 19:24, 16 December 2016 (UTC)[reply]
((OperatorAssistanceNeeded)) I noticed you are actively editing. Are you able to tend to this bot task? MusikAnimal talk 04:57, 28 December 2016 (UTC)[reply]
Yes. Working on it now. Dat GuyTalkContribs 18:40, 28 December 2016 (UTC)[reply]

Approved for extended trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. MusikAnimal talk 05:25, 29 December 2016 (UTC)[reply]

Trial complete. Example of what I added: [4]. Only issue I had was with [5], 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)[reply]
@DatGuy: Alright, several issues, I'm afraid: Here it stripped out the |auto=inherit, shouldn't we retain that? Here it not only stripped out |auto=inherit, but also strangely assigned |importance=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 |cinema=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 [6]: 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)) [7]? MusikAnimal talk 17:28, 29 December 2016 (UTC)[reply]
I'll go through each point, descending.
  1. 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
  2. Not sure, weird.  Doing...
  3.  Done
  4. I thought I fixed that already while sandbox testing.  Doing...
  5. Nothing happens. It looks specifically for \|.
  6. 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)[reply]
@DatGuy: You stated on IRC there are examples in your sandbox. The most recent example still ignores the |cinema=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 :) MusikAnimal talk 22:25, 29 December 2016 (UTC)[reply]
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)[reply]
@DatGuy: Any updates on resolving the above issues? MusikAnimal talk 00:12, 12 January 2017 (UTC)[reply]

((OperatorAssistanceNeeded)) MusikAnimal talk 19:02, 15 January 2017 (UTC)[reply]

@DatGuy: 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 :) MusikAnimal talk 03:32, 23 January 2017 (UTC)[reply]
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)[reply]
Due to technical restrictions, I am going to switch to Python. Dat GuyTalkContribs 18:56, 26 January 2017 (UTC)[reply]

Approved for extended trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. DatGuy has informed me over IRC the new Python implemented is good to go, so let's do another 50-edit trial MusikAnimal talk 20:12, 30 January 2017 (UTC)[reply]

Trial complete. 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)[reply]
@DatGuy: 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) MusikAnimal talk 20:43, 31 January 2017 (UTC)[reply]
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)[reply]


 Approved. 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! MusikAnimal talk 21:22, 31 January 2017 (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 WT:BRFA.