Hacker News new | ask | show | jobs
by kwk236 3348 days ago
Author here. This repo got popular before I had a chance to write README and organize code. I am going to make the code more consistent, add tests, and write brief tutorials by the following month. Please let me know if you have suggestions.
1 comments

Suggestion: a short main() and if __name__ = ... for each file, serving as a demo/smoke test. It doesn't stop you from importing it as a module, and it's nice to see using code.
Along the same lines - use doctests maybe?

    if __name__ == "__main__":
        import doctest
        doctest.testmod()
https://docs.python.org/3.5/library/doctest.html
A great idea. But I'd also like to see an all-in-one-place dog and pony show, constructing it and using it right next to each other.
Agreed. Such code without decent doctests is close to useless. Also - try to get decent code coverage if you can.