-
Notifications
You must be signed in to change notification settings - Fork 7
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
Added pre-commit config and ran entire code base through it #78
Conversation
…h a few other hooks
Moved to draft status because of a couple of testing issues. |
… fixtures. Fixed that
Fixed the testing issues, but I realized a couple of my unit tests fail because of fife_launch and POMS things. Will discuss with @marcmengel before moving this to Ready for Review. |
Marc agreed that /grid/fermiapp-dependent code might come out in the future anyhow (we're discussing offline). For now, I mounted /grid/fermapp to my dev node, and the package unit tests work. So I'm going to move this to "ready". |
Reviewers: Please note that most of the changes are whitespace/EOF changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Only thing I would have done differently is just made all the units conversion tables in utils.py be Dict[str,float] with a few strategic .0's added.
Thanks Marc - I'll do what you said and change the units conversion tables before merging this then (and I'll rerun tests of course). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reviewed the "tests" directory. Changes all look good.
In lib/fake_ifdh, we were masking a bug where if you say "return '' and int('')>0", for example, we'd expect to get a ValueError from the second conditional, but instead an empty string is returned. I fixed the function so that we explicitly only do the second check, and reraise the ValueError. Also fixed a bug where we don't try to read the tokenfile if it doesn't exist, since os.popen(anything_with_nonexistent_file) will simply return an empty string if we save its results into a file-like object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks to all three of you for reviewing this monumental PR. Please go ahead and set up pre-commit (https://pre-commit.com/), and if you need help with it, let me know. |
Added pre-commit config with black, pylint, and mypy tests, along with a few other hooks.
Lots and LOTS of changes, so reviewers, please take your time as needed.