Blogs are not my thing. Coding is.
I know I’m way behind on this, so I’ll skip detailed details. I’m through the first midterm, which I passed. (Yay!) I thought it was on to phase 2, thanking Flow posts. But there’s been a digression. My new job is to write a replacement to Faebot’s thanker/thankee reports, using the phase 1 code (log entries, in particular). I’ll try to post more details on the implementation in my next post.
As for what I did in phase 1, Pywikibot can now thank users for normal revisions and work with the Thanks log entries. Here’s a video of a demo which thanks users for revisions on random testwiki pages.
The phase 1 code has already been merged, so try it now!
Finally, I would like to make people aware of a task to allow users to opt out of Thanks. As an attempt to get the ball rolling again, I’ll be posting a change soon related to this task. Stay tuned!
Am I ahead, or am I behind? It depends on who you ask.
Over the past couple of weeks, I have been busy with summer courses, so my activity has been lower than some others’. I did finish fixing up the code submitted by last year’s intern, and that was merged this past Thursday. Since then, I have been writing tests for the new code, and that seems to be going well. I ran into a stumbling block Tuesday. I tried to add a test to check that the API returns an error when thanking someone while not logged in. However, Pywikibot wouldn’t allow that API call to even be made. I also discovered that passing a tuple with a first value of 19 didn’t cause an “invalid revision” error server-side, so I had to change the values to be below 2.
We do have an interesting design question to deal with. Thanks does not allow a user to thank their own edit, so the user who is logged in should be noted as unthankable. The dilemma is whether to just return
False from that property or to raise an exception. I prefer the boolean, but the debate continues.
Once that’s done, we can merge the new normal revision code and move on to thanking Flow posts. This will probably use a more intuitive design, which will be based on my 2015 GSoC work on adding Flow objects to Pywikibot. I’ll start work on that over the next weekend.
It is called Google Summer of Code for a reason, right?
My project is “Implement Thanks support in Pywikibot”. It’s just that, implementing Pywikibot support for the Thanks extension. This was the subject of a GSoC project last year, which unfortunately was not completed. There is code from that project still in Gerrit, which we have to sift through and pull out salvageable parts.
The base idea for the Pywikibot side of my project is adding methods to the
Site class for the two Thanks API calls,
flow-thanks, and adding methods to serve as the “external” API in classes representing MW objects. I’m pretty sure I’ll add a
Post.thank() method, but my mentor and I will have to further discuss where the normal revision thanking method will go. My original plan was to put it in the
Revision class, but that class doesn’t currently support such an interface because it’s basically a glorified
On the server-side front, my mentor and I decided to have me, as my first server-side task, write a proof-of-concept implementation of logging when a user enables and disables Thanks notifications, as a way to get that discussion moving.
We’re actually in the middle of a full review of the 2016 patches. I’ll write about those discussions next week.
This was so much easier in 2015.
I just found out I was supposed to post this on Thursday. But, really, what was there to post? I already know Pywikibot, Thanks is remarkably simple compared to Flow, and I was completely unaware that the community bonding requirements have changed so much in the past two years. I have no progress to report, but I work quickly when motivated.
I’ll post more later.
But what do I muse about? The fact that I ended the preceding sentence with a preposition? No, and that aspect of English grammar isn’t really a big deal to me.
This blog is about me as a programmer, a Wikipedia and Wikidata editor, and much on top of those, and my thoughts (musings, really) on stuff I deal with while I contribute to the world’s bytes.
I wonder how many bytes this post will take up. And, so, I muse.