As I said in my previous post, I was working on this small Python script which allows you to plot some of your activities statistics as a OpenStreetMap user. The least I can say is that the code was very bad written, therefore very difficult to maintain. That’s the reason – the only reason – of this release, as no new feature are available.
Now adding some new ones would be easier, thanks to this work of rewriting and refactoring of the code. As a helper to get a cleaner code, I used Pylint. That’s a very nice (and nitpicking) tool that tells you are crappy your code is. In fact, it is quite difficult to get the maximum score (10), especially with HTML code, as OsmUserStats deals with. I used no pylintrc for this evaluation, I probably will use one in the future, in which I’ll disable the convention messages caused by HTML code. This 0.3.2 version gets a fairly good 9.81/10, with 5 warnings messages, 3 convention messages and 1 refactor messages. Warnings are caused by unused variables that have to be created by matplotlib, the plotting library. The refactor message is caused by a function that has 13 branches, one more than the maximum allowed by Pylint (nitpicking as I said).
As usual, the code is available at my gitorious account: http://gitorious.org/osmuserstats/osmuserstats
And the webpage of the project is: http://spechard.dgplug.org/OsmUserStats/
Enjoy!
0 Responses to “OsmUserStats 0.3.2 is out”