<div dir="ltr"><div><div>Hi all,<br><br></div>I did a major refactoring of lib/init/grass.py file [1]. I believe that the file is now much easier to understand and maintain. The changes were necessary to implement #2579 without hacks and workarounds but it goes beyond that. Now we can actually review the code, fix some bugs and remove some dead code.<br><br>I actually removed a lot of dead code already such as repetitive cleanups. Function calls are now clearer (better names + parameters + return values) and it seems that some of the calls are not in the right order. And this is where I want you to ask for help, there is several places I don't completely understand or I'm unsure what it the desired behavior.<br><br></div><div>There is still few issues which prevents an implementation of things such as alternative command line interfaces and reuse of the code in general. However, in general it is much easier to introduce new features or change existing ones (I just don't have a time to continue in it).<br></div><div><br></div>I put TODO comments in the source code, so this places can be found. If you contributed to this file or you understand what is there, it would be great if you can go through the TODO comments and see which you can resolve or comment on. There is also some low hanging fruit for people who would like to get familiar with the code.<br><div><br></div><div>I have also discovered some bugs when looking at the code or testing. I will send separate emails about those.<br></div><div><br></div><div>Thanks Martin for the improvements already contributed and for catching the bug with tmp dir I made.<br></div><div><br></div><div>Best,<br></div><div>Vaclav<br></div><div><br>[1] <a href="https://trac.osgeo.org/grass/browser/grass/trunk/lib/init/grass.py">https://trac.osgeo.org/grass/browser/grass/trunk/lib/init/grass.py</a><br>[2] <a href="https://trac.osgeo.org/grass/ticket/2579">https://trac.osgeo.org/grass/ticket/2579</a><br></div></div>