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
FIX: PEP8 for test files #947
Conversation
disp1, assign1 = vfu.create_random_displacement_2d( | ||
np.array( | ||
input_shape, dtype=np.int32), input_grid2world, np.array( | ||
tgt_sh, dtype=np.int32), target_grid2world) |
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 think it was easier to read before...
Did it go over 80 characters?
Just a couple of small comments. Otherwise, this looks good to me. But it's a lot of changes, so I would be happy if someone else could also take a look here. |
I think those parts were going over 80 characters since I checked the script using pep8 and flake8. |
I think there were some other issues there (indentation level didn't match across lines). Would you mind putting these cases back as they were? I think they were easier to read in their previous form. Thanks! |
Updated the script based on the comments on the PR
@arokem I have made the updates to the file. |
codomain_grid2world) | ||
np.array(domain_shape, dtype=np.int32), | ||
domain_grid2world, np.array(codomain_shape, | ||
dtype=np.int32), |
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.
It's not necessary to break this line, this is just 68 characters long:
domain_grid2world, np.array(codomain_shape, dtype=np.int32),
Hi @souravsingh!,
Appart from this and my two comments above, this is ready to merge for me. Again thanks a lot for the hard work @souravsingh ! |
Fix test_parzenhist to take care of a few PEP8 errors.
Fix the format of a function in the script
The commit is able to fix a few PEP8 coming from |
Hi @souravsingh!, What about:
and
and
? |
dtype=np.int32), | ||
codomain_grid2world) | ||
np.array(domain_shape, dtype=np.int32), | ||
domain_grid2world, np.array(codomain_shape,dtype=np.int32), |
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.
This is much more readable! it just needs a space after the comma:
domain_grid2world, np.array(codomain_shape, dtype=np.int32),
and remove unused line 3:
import numpy.testing as npt
This is what flake8
reports on test_imwarp.py
:
test_imwarp.py:3:1: F401 'npt' imported but unused
test_imwarp.py:72:51: E231 missing whitespace after ','
We are really close @souravsingh! just some evil trailing spaces went unnoticed! |
I don't know why, But |
@souravsingh Use the latest version of PEP8. For downloading use 'pip' as it will get you the latest version. |
@manu-tej |
I have the exact same version of pep8 and flake8, that's really weird!, by any chance do you have any local changes that you have not commited/pushed to the remote branch? If you look at the code as shown in github you can see the trailing spaces there. Can you see the trailing spaces in your local |
@omarocegueda I have fixed the files.Hopefully the scripts should show no errors in |
Great! this looks good to me, I just verified that |
A question- I noticed a few |
Thanks! And thanks @omarocegueda for the review. |
Thanks for merging the patch @arokem |
This PR fixes the files mentioned in Issues #865 #866 #867 #870 and #871.