<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br></div><div>from somebody who's done that and been there several years ago…<br><div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: 'Lucida Sans'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">def set_u_iso(self, value = None, values = None, selection = None):<br>&nbsp;"""Set isotropic mean thermic displacements of scatterers<br><br>&nbsp;Input:<br>&nbsp;value -- (optional) a single double value to set all u_iso of selected<span class="Apple-converted-space">&nbsp;</span><br>[...]<br><br>&nbsp;Returns: cctbx.xray.structure<br>&nbsp;"""<br></span></blockquote><div><br></div><div>I would argue that the "(optional)" mention is completely redundant with the method declaration. In other commits, I saw you did</div><div><br></div><div><blockquote type="cite">&nbsp;&nbsp;def __init__(self,<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;[...]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;correct_rhombohedral_setting_if_necessary=False,<br></blockquote><blockquote type="cite">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;[...]<br></blockquote><blockquote type="cite">&nbsp;&nbsp; &nbsp; &nbsp;"""<br></blockquote><blockquote type="cite">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;[...]<br></blockquote><blockquote type="cite">&nbsp;&nbsp; &nbsp; correct_rhombohedral_setting_if_necessary -- (optional, default=False) If set to 'True' an automatic conversion between rhombohedral and hexagonal basis will be done<br></blockquote></div><div><br></div><div>Again the default=False is redundant.</div><div><br></div><div>It is already time-consuming enough to write and then maintain documentation: no need to increase the burden in such a manner.</div><div><br></div><div>Very valuable is the "Returns:" specification indeed and the mention of the actual type of objects. I admire your motivation and I would encourage you to continue if that does not distract you from whatever job you are paid for though. Indeed, eventually, you may have to choose between writing comments and writing productive code and we all know where the seesaw will swing!</div><div><br></div><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: 'Lucida Sans'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">&nbsp;[...]<br><br>During my first pass I noticed some already existing docstrings which are also<span class="Apple-converted-space">&nbsp;</span><br>shown in the online docs at e.g.<br><a href="http://cctbx.sourceforge.net/current/python/cctbx.xray.structure.html">http://cctbx.sourceforge.net/current/python/cctbx.xray.structure.html</a>.<br>Are those pages automatically generated via a cronjob or does it take a manual<span class="Apple-converted-space">&nbsp;</span><br>update to get this information up2date?<br></span></blockquote><br></div><div>They are automatically generated using the documentation tools in Python standard library. When I set up for myself the task of commenting the cctbx many years ago, I tried to use a 3rd party tools producing better looking HTML but the experiment eventually died because of a lack of time. These days, I would advise you to try Sphinx.&nbsp;</div><div><br></div><div>The idea is that the methods headers are automatically harvested by those documentation tools, along with the comment following each of them, and then that those tools interpret some markers in the comments to produce better output. Thus the comments should ideally use a marker language called reStructuredText, which has become universal in the Python world. I point you to Sphinx web page:</div><div><span class="Apple-tab-span" style="white-space:pre">        </span><a href="http://sphinx.pocoo.org/">http://sphinx.pocoo.org/</a></div><div>Note that sphinx is used for the official Python documentation itself.</div><div><br></div><div>Luc Bourhis</div><div><br></div><br></div></body></html>