<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="im"><br></div>
One important aspect that you might want to think about twice is to take<br>
advantage of configuration "layers" that are available in Python already. The<br>
examples that I gave earlier were:<br>
<br>
    * population of command line defaults from environment variables<br>
      in argparse<br>
    * ConfigParser.read(DEFAULT_CONFIG, # e.g. /usr/share/...<br>
                        SYSTEM_CONFIG,  # e.g. /etc/foo.conf<br>
                        LOCAL_CONFIG,   # e.g. ~/.foo.conf<br>
                        ...)<br>
      to model the hierarchy between these configuration files.<br><br></blockquote><div> </div><div style>Yes, I understand this is important. Regarding ConfigParser we shouldn't have any problems, it's already being done on OptionParser, I'll just have to move it to the new script I made yesterday. Populating command line defaults with env variables is what bothers me. I know how to do it, in fact I kind of like it but if we do this then it would make sense to completely ignore env variables on <span style="font-size:13px;font-family:arial,sans-serif">generate_template_variables since they are already being merged by argsparse, but then again I think you thought of this already since your 'do_stuff' function doesn't have an env dictionary or anything... Problem will come if there's anything on the env that cannot be specified by a command line argument, but I cannot think of anything right now.</span></div>
<div style><span style="font-size:13px;font-family:arial,sans-serif"><br></span></div><div style><span style="font-size:13px;font-family:arial,sans-serif">In any case, the only difference from what I originally had is that the merging being done before calling generate_template_variables involves only cmdline arguments and env variables (instead of also merging ConfParser data). I'll create a branch or something to see how this looks on lein_makepkg.<br>
<br>I would like to Hangout for a bit this weekend since the mid-term evaluation is next week. I just want to sit down and talk about what we have so far and most importantly what's left to be done. I'm not adding any more features this week, just improving what we already have (finish exception handling, divide the tests, this parsing/merging issue...) If you think we can discuss all that by email then it's fine for me too =)</span></div>
<div style><br></div><div style>Cheers,</div><div style><span style="font-size:13px;font-family:arial,sans-serif">Eugenio</span></div></div></div></div>