Open hnykda opened 5 years ago
Hi @hnykda, thank you for caring about the code quality of memory-profiler. Some of the issues you highlighted are easy to fix, so I encourage you to submit pull requests for those. I think it's a much better use of your energy and maintainers time.
Yeah, I already tried to do so with #220 where I am introducing unittest
for example. That's the maximum my current time allows (for now). Nevertheless, I wanted to report it here hoping that others could get inspired and maybe incorporate the above into their future code.
The whole package is written in a quite disturbing way. Various problems:
argparse
is not usingsubparsers
(withset_default(func...
) and rather some "ad-hoc" home-made subparsersunittest
with clidiscover
option)mprof.py
without overridingsys.argv
. There is almost no separation of concerns, everything living in one big module in huge functions which are hard to test and reuse.pep8
(long lines, indentation, triple quotes for regular strings...)All of these make contribution harder and less interesting on otherwise very handy package.