Refactoring and Quality

Lately I have been doing an extensive amout of refactoring and quality improvement work to Editra's code base. The project has been abit over due for this iteration of work especially with all the major advancements and features that have gone in recently. Overall the work has been very rewarding and has removed allot of potential error cases and created lot cleaner and easier to follow code.

I broke the refactoring/cleanup into number iterations using pylint under its default configuration as the gauge and detector of what tasks to perform, the tasks were roughly broken up as follows.

  1. Remove all pylint detected Errors and add docstrings anywhere they were missed
  2. Remove all easily removable warnings, such as "redefining built-in type" and "unused variable" warnings
  3. Refactor all docstrings to use epytex formatting to make it possible to generate better api documentation.
  4. More detailed module by module cleanup of pylint warnings
  5. Tackle as many Convention/Refactoring warnings as made sense to fix. Some ignored such as the function naming conventions that differ from the projects own conventions

The packages pylint score prior to the cleanup was just under 6 which was a little low but it is now rated at 7.85 with almost all of the warnings being because of the function naming conventions (pylint wants functions like this "my_function()" but Editra uses "MyFunction()" mixed case lettering as it fits in better with the wxPython/wxWidget api's that Editra uses. Changing the regular expression in the pylint config file to allow for mixed case would probably bring the code score into the upper 9's.

Another tool that was helpful in this refactoring process was the cheesecake_index which gauges the project as a whole including the installation and what documentation and unit tests are provided along with the package.

The next release of Editra is slated for next weekend and will be available as an OS X Universal binary, Windows Installer, Source package, and also as of this upcoming release as a Python Egg that will be available via the CheeseShop.