<div dir="ltr"><div><div><div><div>Hey all,<br><br></div>Just finished integrating the pyflakes and pep8 validation. We now have that in place for cobbler and cobbler-web, koan will be addressed a bit later. Just wanted to let you know that ALL files have changed so if you have any work pending a pull request, please rebase first against current master.<br>
<br></div>Also, if you want to contribute to Cobbler please make sure your patches pass pyflakes and pep8 by using &#39;make qa&#39;.<br></div>Next up will be updating the Developer Guide so that all of this is properly documented.<br>
<br></div>Cheers!<br><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 16, 2014 at 7:44 PM, Jörgen Maas <span dir="ltr">&lt;<a href="mailto:jorgen.maas@gmail.com" target="_blank">jorgen.maas@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hi Alan, others,<br><br></div>With 2.6.0 out of the way, i found some time to play with pyflakes and pep8.I just finished fixing a gazillion issues throughout the codebase like unused imports, unreferenced variables, and stuff like that. That also resulted in the removal of some legacy code (&lt; python 2.5 hacks) and i also fixed a bug or two. Pyflakes is now integrated into the Makefile (make qa) and is run when building tarballs and rpms so that any future issues are caught early on.<br>

<br></div><div>The next step is integrating pep8 validation, which from the looks of it will be a hell of a job :-)<br><br></div><div>Looking forward to your patches (please make sure you rebase from current master) and feedback.<br>

</div><br></div><div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">On Wed, Apr 9, 2014 at 3:23 PM, Jörgen Maas <span dir="ltr">&lt;<a href="mailto:jorgen.maas@gmail.com" target="_blank">jorgen.maas@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hi Alan,<br><br></div>Well, again. I could&#39;t agree more with you. I have marked this conversation as something that should be done during the Cobbler 2.7 development cycle.<br>

</div>I will follow up on this after the 2.6 release, which i finally got around to right now.<br>
<br></div>Feel free to send any patches targeting master!<br><br></div>Once again, thanks!<br></div><div class="gmail_extra"><div><div><br><br><div class="gmail_quote">On Mon, Mar 24, 2014 at 4:37 PM, Alan Evangelista <span dir="ltr">&lt;<a href="mailto:alanoe@linux.vnet.ibm.com" target="_blank">alanoe@linux.vnet.ibm.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I noticed Cobbler does not apply some conventions used in other Python projects. I have some suggestions:<br>
<br>
* Validate code using Pylint<br>
 * Comment: I think this is fundamental to find subtle errors (eg referencing inexistent variables). I have already fixed all Pylint errors I could in my Cobbler clone and I just ignored those few I cannot fix (eg in templating classes). I could submit relevant patches upstream. I&#39;ll soon automate Pylint checks in any patch submitted by my team, possibly Cobbler upstream could do the same.<br>



<br>
* Introduce documentation convention<br>
 * Motivation: makes documentation easier to read and write<br>
 * Suggestions:<br>
  * Sphinx restructuredText extensions (<a href="http://sphinx-doc.org/domains.html#signatures" target="_blank">http://sphinx-doc.org/<u></u>domains.html#signatures</a>) .<br>
  * simple Javadoc-style documentation convention. eg document methods are documented with method description, @param &lt;type&gt; &lt;var_name&gt; &lt;var_description&gt; for each parameter and @return &lt;type&gt; &lt;return_var_description&gt; for return value. My team uses that and it works well.<br>



 * Comment: I consider param/return type specially useful, as Python does not declare variable types in method definition.<br>
<br>
* Validate code using PEP8 (Python style guide)<br>
<br>
* Order imports alphabetically. Possibly, split imports in standard Python imports, third-party imports and Cobbler imports.<br>
 * Motivation: readability<br>
<br>
* Remove trailing whitespaces<br>
 * Motivation: remove commit noise. I see other reasons at <a href="http://programmers.stackexchange.com/questions/121555/why-is-trailing-whitespace-a-big-deal" target="_blank">http://programmers.<u></u>stackexchange.com/questions/<u></u>121555/why-is-trailing-<u></u>whitespace-a-big-deal</a> , but imho they are minor.<br>



<br>
<br>
Maybe some of these suggestions have already been considered in the past and rejected. If you could share with me these reasons, it&#39;d be much appreciated.<br>
<br>
<br>
Regards,<br>
Alan Evangelista<br>
<br>
______________________________<u></u>_________________<br>
cobbler-devel mailing list<br>
<a href="mailto:cobbler-devel@lists.fedorahosted.org" target="_blank">cobbler-devel@lists.<u></u>fedorahosted.org</a><br>
<a href="https://lists.fedorahosted.org/mailman/listinfo/cobbler-devel" target="_blank">https://lists.fedorahosted.<u></u>org/mailman/listinfo/cobbler-<u></u>devel</a><br>
</blockquote></div><br><br clear="all"><br></div></div><span><font color="#888888">-- <br>Grtz,<br>Jörgen Maas
</font></span></div>
</blockquote></div><br><br clear="all"><br></div></div><span class="HOEnZb"><font color="#888888">-- <br>Grtz,<br>Jörgen Maas
</font></span></div>
</blockquote></div><br><br clear="all"><br>-- <br>Grtz,<br>Jörgen Maas
</div></div>