Wikipedia:Bots/Requests for approval/PeerReviewBot
- The following discussion is an archived debate. Please do not modify it. Subsequent comments should be made in a new section. The result of the discussion was Approved.
Automatic or Manually Assisted: Automatic, runs once daily
Programming Language(s): Perl, using the same Mediawiki::API framework as VeblenBot
Function Summary: Archive old peer reviews from Wikipedia:Peer review
Edit period(s) (e.g. Continuous, daily, one time run): daily
Already has a bot flag (Y/N): N
Function Details: This was requested by the person who currently archives old peer reviews by hand; see User talk:CBM/Archive_8#Possible_Bot_work_at_Peer_Review.
Each peer review uses an independent subpage, like AFD. A peer review subpage can be archived if it meets any of these criteria:
- it has had no comments in two weeks
- it is over 30 days old and has no comments in 2 days
- the article has since been nominated on FAC or FLC
The script makes a list of these articles. Archiving requires two edits: one to the peer review subpage and one to the article talk page. The script gets the content of both these pages, does a sanity check that the templates can be replaced, then replaces the templates and saves the pages.
The source code can be browsed online.
Discussion
[edit]As the person who currently does almost all of the peer review archiving by hand, I thank Carl for this, and ask that it be approved for a trial. Thanks in advance, Ruhrfisch ><>°° 02:11, 8 May 2008 (UTC)[reply]
- For the talk: page, this is just replacing {{peer review|archive=N}} with {{old peer review|archive=N}}, right? Gimmetrow 06:24, 8 May 2008 (UTC)[reply]
- Yes, except I do not include spaces when I do it by hand, so it is {{oldpeerreview|archive=N}}. My understanding is that the bot does not change or update the article history template. Ruhrfisch ><>°° 11:13, 8 May 2008 (UTC)[reply]
- The only change on the article talk page is to replace Template:Peer review with Template:Oldpeerreview. At the moment the script is set up to not subst the Oldpeerreview template. Part of the sanity check is to make sure that this replacement can be made. — Carl (CBM · talk) 11:28, 8 May 2008 (UTC)[reply]
- What do you do when a page gets moved during peer review? Other than that, I can't think of any edge cases. I'm probably conflicted since this task was one on my plate, so I'm relieved someone else got to it. Consider this a support, and hopefully another BAG will approve a trial soon. Gimmetrow 07:51, 9 May 2008 (UTC)[reply]
- If a page got moved during peer review, the sanity check would fail, because the bot would not be able to find the peerreview template on the talk page corresponding to the peer review page. So the bot would not archive that peer review. — Carl (CBM · talk) 10:43, 9 May 2008 (UTC)[reply]
- I have already told Carl I would archive anything that failed the sanity check by hand. Sometimes users just remove the peer review template from the talk page to "archive" it too. Ruhrfisch ><>°° 12:48, 9 May 2008 (UTC)[reply]
- The bot does detect these mistakes, it just doesn't try to fix them. I am planning to add code to have the bot make a post on the PR talk page listing any articles that it wanted to archive but couldn't. The code so far was written to facilitate leaving those messages; I just haven't written that function yet. — Carl (CBM · talk) 14:23, 9 May 2008 (UTC)[reply]
- I have already told Carl I would archive anything that failed the sanity check by hand. Sometimes users just remove the peer review template from the talk page to "archive" it too. Ruhrfisch ><>°° 12:48, 9 May 2008 (UTC)[reply]
- If a page got moved during peer review, the sanity check would fail, because the bot would not be able to find the peerreview template on the talk page corresponding to the peer review page. So the bot would not archive that peer review. — Carl (CBM · talk) 10:43, 9 May 2008 (UTC)[reply]
- What do you do when a page gets moved during peer review? Other than that, I can't think of any edge cases. I'm probably conflicted since this task was one on my plate, so I'm relieved someone else got to it. Consider this a support, and hopefully another BAG will approve a trial soon. Gimmetrow 07:51, 9 May 2008 (UTC)[reply]
- Seems complete. Trial? CWii(Talk|Contribs) 22:50, 13 May 2008 (UTC)[reply]
- I have added logging to the code, and updated the link above to the latest svn revision. — Carl (CBM · talk) 22:55, 13 May 2008 (UTC)[reply]
Approved for trial (7 days). Please provide a link to the relevant contributions and/or diffs when the trial is complete. — Werdna talk 11:05, 14 May 2008 (UTC)[reply]
- The trial went well, and I know of no lingering bugs in the code. I think the bot is ready to be set to automatic. — Carl (CBM · talk) 15:05, 27 May 2008 (UTC)[reply]
- Approved. It may be worthwhile having the bot sign the PR comments, to link to User:PeerReviewBot and provide a timestamp, for documentation. Otherwise, I agree, everything looks fine. This bot is to run with a flag. Thanks, Daniel (talk) 09:52, 29 May 2008 (UTC)[reply]
- The above discussion is preserved as an archive of the debate. Please do not modify it. Subsequent comments should be made in a new section.