Two things can improve pants project: 1-No import ...
# general
Two things can improve pants project: 1-No import for individual function or classes directly from the modules. Instead, import the modules then access the function or class from the module. It will make namespacing better. I saw lot of code that say
from import OrderedDict
, then another part of the project say
from import OrderedDict
. I feel it make it really hard to distinguish. 2-The second thing. Test are located outside of the source code directory. If I want to know a module has a unittest, I will need to open a separate directory outside of the project source code, and look for the unittests. Unittests are used as a document to understand how the module works. At Google, all of the unittests are located next to the module. If you open any directory. You will see something like this:
. Here at the company I work at we create a directory called
and we store all the tests related to the modules in it. So, if I have
in a directory, the test will be located in
in the same directory of