Week 6 - 7 - coala-utils

Recap

In the last post I described a bit the need for bear creation and packaging utilities. Disregarding all that, I worked in the creation of coala-utils a collection of coala libraries and here is why: while extending an already existing bear creation script made by another fellow coalanian, I was alerted by my mentor (co-mentor actually) that there is possible code duplication between the script that I was working on and another Gsoc project. Basically both projects were implementing a so called ask_question method, that would prompt the user for input, both using different libs. That is how the idea for coala-utils sprouted.

coala-utils

coala's main library, the coalib contains a mix of core coala components and libs that don't necessary require coala. For example a packaging utility could very much benefit "from some coalib" but all of coala is too much, hence the need for coala-utils. There was a package that contained some decorators for coala called coala-decorators. Basically coala-utils is a python package that contains the old coala-decorators package, some libraries extracted from coala's coalib and another library containing the ask_question method needed by both projects. That way we can have a unified prompting method that can be used in tools without listing coala as a dependency (listing coala-utils instead). The idea here is to slowly move some coalib files (that are not necessarily coala related and can be used in other tools) into coala-utils so that we don't need coala as a dependency. As an added bonus the coala-utils package can be used in other projects, completely unrelated to coala since it is open source and its contents are not tied with coala in any way.

Wrap up

coala is now updated to work with coala-utils (as you may have guessed a lot of seding has been done). Now with the coala-utils finished I can finally merge my extension (basically remake because I have to replace all of the old prompts too) of the coala-bears-create. Also for those who are wondering, the cover photo is from my 5 day vacation in Greece.