In code, like the implementation of ASE, we must not use the import * syntax. Import everything explicitly from exactly the place where it’s defined:
from ase.io import read, write
We distinguish between scripts and code. In your own scripts, it’s OK to use:
from ase.all import *
which will give you the most used symbols.
The rules for the Python part are almost identical to those used by the Docutils project:
Contributed code will not be refused merely because it does not strictly adhere to these conditions; as long as it’s internally consistent, clean, and correct, it probably will be accepted. But don’t be surprised if the “offending” code gets fiddled over time to conform to these conventions.
Thus spake the Lord: Thou shalt indent with four spaces. No more, no less. Four shall be the number of spaces thou shalt indent, and the number of thy indenting shall be four. Eight shalt thou not indent, nor either indent thou two, excepting that thou then proceed to four. Tabs are right out.
- Get rid of as many break and continue statements as possible.
Here is an example of how to write good docstrings:
$ pep8.py --help
Run pylint on a single file like this:
[~]$ pylint mypythonfile.py
Run pylint on a module like this:
[~]$ pylint path/to/module/root/dir
$ epydoc --docformat restructuredtext --parse-only --show-imports -v dir