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.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s