-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
General code cleanup #15
Comments
Disregard the section about unit tests. I had somehow missed all the tests you'd already written. Based on those, I would assume you'd like to stick with unittest as a framework? |
And one additional thing I was just thinking of (based on one of the errors in a PR from last night): Have you considered setting up something like Travis and Coveralls to hook into PRs to check for build failures and decreases in test coverage prior to accepting a PR? Obviously not critical (and especially with few contributors right now), but both are free for open source projects, and it does give a little more confidence on accepting a PR. Just some more to think about :) |
Thank you very much for your suggestions. I have looked into it all, and I like all of it very much! I tried following PEP 8 and PEP 257 as much as possible, so totally agree in using "black" to handle it automatically. With "mypy", will static type hinting be handled/added automatically, or do we need to add hinting to the code ourselves? In any case, I prefer the way it is added which is python2-compatible (I am not very used to the py3.6+ type hinting code yet, and find the hinting by comments less intrusive). Also, the code is still python2-compatible and I would rather like to keep it like that (though that's not a very strong opinion of mine, so I am open to discussions if you have any reason to drop py2-compatibility, but I haven't seen any reasons to drop it so far). Yes, I have included a very few tests using unittest, but you are completely right, we need to try to cover all the code with unit tests so have to add a lot more. I like using stuff that's already included in Python, keeping the dependencies as little as possible, that's why I decided to use unittest. But if you have any strong reason/opinion to use something else, I am open to suggestions... :) Also, Travis CI and Coveralls (which Python-lib do you prefer?) are great and I would definitely like to add it to this project. |
Thanks for the response!
I'll start using black, pylint, and mypy as basis for future commits. If you want any help setting up Travis or Coveralls, let me know. Thanks again, |
Just a question/discussion, not an issue:
Do you have any strong opinions about overall code style/format? Specifically, most other projects I work own or contribute to use linters, code formatters, static type checkers, etc. in order to help maintain consistency between contributors and also to pick up on code smell early.
If you really prefer to keep it the way it is, no problem and I'll stick with the style you already have going on.
But if you're not averse to it, I'd be happy to do the work to standardize the project. My preferences would be:
I think in the longer term (and I intend to keep using this library for quite a while) this would lead to better code quality, easier contributions from others, and enhance readability.
Relatedly, I would like to start writing unit tests. That's less project-wide impact, but just the same, do you have any preference on testing framework? Again, I'd be happy to get things going in the right direction if you agree, but don't want to step on toes here 😄
Let me know what you think, and thanks again for a great project!
Regards,
Anson
The text was updated successfully, but these errors were encountered: