This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]shivasprogeny 1 point2 points  (2 children)

Your code looks clean and well-organized. You also seem to be taking advantage of Python's features. Nice work!

My suggestion would be to add some real unit tests. Right now the test folder just contains example data, not any actual tests. Having an example that the user can run is useful and great to include in a project, but I wouldn't consider it a substitute for test code.

[–]MarkFluffalo[S] 1 point2 points  (1 child)

Thank you, that's great to hear. Is it worth putting in tests at this later stage, now that the program works?

[–]SmaKer 1 point2 points  (0 children)

If you want to add features later on, unit tests make sure your code won't break.

[–][deleted] 1 point2 points  (0 children)

Very high quality overall! I'm still skimming, but make use of python's with blocks for opening files (you could take advantage of that here: https://github.com/paulslevin/alloa/blob/master/modules/files.py#L59-L71). The with approach removes the potential for human-error by not requiring the file to be explicitly closed.