-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Bugfix in RandomRain #2334
Bugfix in RandomRain #2334
Conversation
Reviewer's Guide by SourceryThis pull request addresses a bug in the RandomRain augmentation by changing the mechanism for generating the rain slant and adding extensive tests for validation. The tests ensure that the generated slant values are within specified bounds, vary appropriately, and that the visual effect aligns with the expected slant direction. Updated class diagram for RandomRain augmentationclassDiagram
class RandomRain {
+get_params_dependent_on_data()
-py_random
-slant_range
-random_generator
}
note for RandomRain "Changed slant calculation to use py_random.randint(*slant_range)\ninstead of random_generator.integers(-width // 50, width // 50)."
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @ternaus - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider extracting the repeated transform and seed setup in the tests into a helper function to reduce duplication.
- Review the slope calculation in test_random_rain_visual_effect, as using only leftmost and rightmost points might be sensitive to outliers.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Summary by Sourcery
Add tests for the
RandomRain
augmentation to ensure theslant
parameter behaves as expected.Tests:
RandomRain
.slant
parameter.