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
Fixing backward propagation for vector vortex #193
Conversation
Codecov Report
@@ Coverage Diff @@
## master #193 +/- ##
==========================================
+ Coverage 81.47% 81.81% +0.33%
==========================================
Files 97 97
Lines 7300 7304 +4
==========================================
+ Hits 5948 5976 +28
+ Misses 1352 1328 -24
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
Thanks for tackling this; much appreciated. The code is working as far as I can see. Thanks for adding the tests too. So only style changes remaining. A few general comments:
- Never directly compare floating point values. Due to numerical noise, the exact value of a float can vary. You should always use
np.allclose(img.intensity, img.V)
. That compares the two values to within an absolute and relative tolerance. Also, I feel it's better to compare each value in the Field, rather than the sum of the values. I've marked these lines with "Never directly compare floating point values.". These are the direct cause for your failed tests. - HCIPy uses tabs for indentation, sadly. That was an early choice that I should have made differently, but now we have to live with it until we can find a way to fix it without losing all git history. You're using spaces for indentation in the test files. These are the direct cause for most of the flake8 linting errors.
- There are a few more flake8 errors, all whitespace related. You can see them by going towards "Files changed" in this PR. The first 20 errors/warnings should be annotated inside the code, but there are more, most of which are similar to the ones that are annotated.
- I prefer a "rebase" instead of a "merge" when making this branch up-to-date with master. See https://github.blog/changelog/2022-02-03-more-ways-to-keep-your-pull-request-branch-up-to-date/#:~:text=Rebasing%20applies%20the%20changes%20from,and%20then%20click%20Rebase%20branch. It's a little cleaner than a merge.
Thanks for the review, comments and guidelines. I was indeed a big confused by the tabs vs whitespace usage. |
No need to try to undo. It's mostly for future PRs / future rebases. |
@GillesOrban Thanks for the latest flake8 fixes. I'll re-review this later today. FYI: you should also add your ulg.ac.be email to Github so that your commits are linked to it. |
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.
Last comment; something that I missed during my first review.
I fully checked all the tests this time as well, and all seems good with those.
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.
All changes were addressed. LGTM.
Fixes #186.