-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Reduce code duplication #182
Conversation
Reviewer's Guide by SourceryThis pull request refactors the code to reduce duplication by introducing a helper function Class diagram showing the new helper function and its usageclassDiagram
class ResTesterConfig {
+default_min_freq
+default_max_freq
+default_accel_per_hz
+test_points
}
class compat {
+res_tester_config(config) ResTesterConfig
}
class axes_shaper_calibration {
+axes_shaper_calibration(gcmd, config, st_process)
}
class compare_belts_responses {
+compare_belts_responses(gcmd, config, st_process)
}
class excitate_axis_at_freq {
+excitate_axis_at_freq(gcmd, config, st_process)
}
axes_shaper_calibration ..> compat : uses
compare_belts_responses ..> compat : uses
excitate_axis_at_freq ..> compat : uses
compat ..> ResTesterConfig : creates
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 @rschaeuble - I've reviewed your changes - here's some feedback:
Overall Comments:
- The file header comment in compat.py appears to be copied from compare_belts_responses.py - please update it to describe the actual purpose of this compatibility helper module.
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟡 Complexity: 1 issue found
- 🟢 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.
Thanks for the PR! I'll merge it :) |
Summary by Sourcery
Enhancements:
res_tester_config
to consolidate the logic for retrieving resonance tester configuration parameters, handling compatibility with both old and new Klipper versions.