Page MenuHomePhabricator

Implement Thanks support in Pywikibot
Closed, ResolvedPublic

Description

My name is Alexander Jones, and I want to implement support in Pywikibot for the Thanks extension.

Personal info and past contributions

See T93991 for information which has not changed since my last proposal.

I am currently a fourth-year junior at the Univeristy of Texas at San Antonio (UTSA). My major is computer science, and I have a perfect 4.0 GPA. I have earned an associate degree, also in computer science, from Northwest Vista College. Since my last participation in GSoC, I have started writing a series of competition-related packages for Python, which can be found in several of my GitHub repositories.

I was previously accepted to GSoC in 2015, where I implemented basic Flow support in Pywikibot. I have occasionally continued work on that since then, though it's been hard to get eyes on the code with Flow no longer under active development.

Email address: happy5214 <at> gmail.com
IRC: happy5214 on Freenode (usually in #wikipedia-en-roads)
GitHub: happy5214
Wikimedia wikis: Happy5214

Why I want to work on this

I am already familiar with the Pywikibot code from my 2015 GSoC project, so I feel I would already have a leg up on this idea. I can't say I have the same passion for Thanks as I did for Flow, but it is an extension that I personally use, and I recognize the important role it plays in editor retention. Looking at the extension code, it seems much easier to work with than Flow.

Issues

Currently, bots using Pywikibot cannot send thanks to editors for edits or Flow comments. Pywikibot also has no support for doing things with thanked revisions, such as generating statistics about who has sent thanks.

Goals

My goal is to enable Pywikibot developers to work with the Thanks extension, allowing them to build bots to thank users for edits/comments and generate statistics based on the Thanks log.

During this project, I hope to:

  1. Establish working relationships with the Pywikibot and Thanks teams.
  2. Refresh my knowledge of prerequisites, including the MW API, Travis-CI and the testing framework, and the codebase and convention of Pywikibot; and learn the Thanks code and its conventions.
  3. Create an initial implementation of Thanks support in Pywikibot.
  4. Test frequently, including in live testing environments.
  5. Finish a stable implementation of Thanks support in Pywikibot.
  6. Do useful things with the new Thanks support, including generating lists of thanks and statistics pages for frequent thankers.

Time

My spring semester ends around May 9, with two summer classes between May 30 and August 12. The fall semester starts on August 22. I will probably spend the first week or two delving into the Thanks code and refreshing my Pywikibot knowledge. By the midterm evaluation, I plan to have the code for sending thanks for normal edits and Flow comments completed, as well as at least one server-side fix done. By the final evaluation, I project that I will have points 3-5 of T129049 completed.

Detailed timeline

Before May 30Communication with Thanks and Pywikibot teams; research into architectures; learning any requisite technologies; finalizing plan
May 30 - June 25Reviewing old Pywikibot-Thanks patches and adding code for thanking normal revisions and log entries
June 26 - July 2Midterm
July 3 - July 16Adding code for thanking Flow posts
July 17 - July 23Metadata-related code
July 24 - July 30Midterm
July 31 - August 6Statistics table script
August 7 - August 13Unit tests and documentation for new code
August 14 - August 20Buffer/optional server-side work
After August 22Final evaluations/start of semester

Other

  • I am only eligible for GSoC.
  • I am currently registered for 3 courses this summer, since registration at my university is extremely competitive. I certainly would take no more than 1 class if accepted to GSoC. I'm taking two classes, since I probably wouldn't be able to get into those classes this fall at this point.

Microtasks

I made several commits to Pywikibot during my previous project, so I don't think a microtask for that is necessary. The only remaining Thanks microtask is assigned to the developer who attempted this project last year, so a new one might be needed.

I hope you will accept my second proposal. Thank you.

Event Timeline

Restricted Application added a subscriber: Mattflaschen-WMF. · View Herald Transcript

@happy5214 , you have 11 hours to submit a 'final' PDF, or Google automatically rejects your application.

I hate that new requirement. I hope a PDF print-out of this page is fine.

Copy-pasted from my blog

Google Summer of Code 2017 has wrapped up. Again, my project was to implement support for Thanks in Pywikibot. I am happy to say that I achieved that goal. Now, Pywikibot bots can thank users for normal (wikitext) revisions and for Flow posts. Also merged was code to model Thanks log entries in Pywikibot. An old patch for adding Flow revisions to Pywikibot was almost finished, but it wasn't a requirement for this project.

While there wasn't any merged server-side code, I did post a patch that can serve as a basis for publicly logging changes to a user's thankability status. I wish I could have done more work on the extension, but Pywikibot was the priority, and wisely so.

Also written as part of this project was a script to implement Faebot's reporting of frequent thankers and thankees. That script available on a personal GitHub repository, along with some unit tests that pass on Travis CI.

I'll admit this experience was more stressful than my other GSoC project in 2015. There were more community and social expectations than last time, which I eventually disregarded at the advice of my mentor. I also took two college courses over the summer, limiting the time I had to spend coding. Owing to my previous experience with Pywikibot, I had lofty expectations. While I failed to meet all of them, overall I got the job done.

I would like to thank my mentor, John Vandenberg, the Wikimedia Foundation and their organizers, Google, and the countless coders on whose work I built. Barring rule changes, I won't be eligible for Summer of Code again, but I would love to continue contributing to Wikimedia and FOSS in general.