PEP8
Something that might help beginners (i.e. me) to get started understanding pesummary is to use the pep8.
While occasionally it looks like general pedantry, here are a few places I can see in the code which would greatly help readability
-
The class
one_format
(under pep8) should beOneFormat
- browsing the code I was initially confused as to whereone_format
was the modulepesummary/one_format
and where it was instantiating a new class. -
Avoid using
from x import *
as it means it is difficult to follow where things are being imported from. If there are lots of things to import (e.g., the conversions) to do
import pesummary.one_format.conversions as conversions
...
conversions.CONVERT_THIS_THING
...
- There are quite a few variables which are defined and not used, these are adding unnecessary complexity
One can get a list of all pep8 issues by doing
$ flake8 .
(after pip installing). Admittedly, the default settings might be too restrictive (e.g. the 80 character limit), but you can adjust this with a setup.cfg file). You can also add this to the C.I. to ensure things don't creep in. I also understand that a lot of editors like pycharm have clever ways to do the replacement of module named etc.
Just some suggestions, feel free to ignore if you think it overkill.