Skip to content
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 docstrings for Sharpen, RandomToneCurve and RingingOvershot #1933

Merged
merged 4 commits into from
Sep 16, 2024

Conversation

ternaus
Copy link
Collaborator

@ternaus ternaus commented Sep 15, 2024

Summary by Sourcery

Enhance the documentation for the RandomToneCurve, Sharpen, and RingingOvershoot transforms by providing more detailed descriptions, mathematical formulations, and usage examples.

Enhancements:

  • Improve the docstring for the RandomToneCurve transform by adding detailed explanations of its functionality, including the mathematical formulation and examples.
  • Enhance the docstring for the Sharpen transform with additional details on its operation, including mathematical formulation and examples.
  • Update the docstring for the RingingOvershoot transform to include a more comprehensive explanation of its effects, mathematical formulation, and usage examples.

Copy link
Contributor

sourcery-ai bot commented Sep 15, 2024

Reviewer's Guide by Sourcery

This pull request improves the docstrings for three image transformation classes in the albumentations library: RandomToneCurve, Sharpen, and RingingOvershoot. The changes focus on providing more detailed explanations, mathematical formulations, examples, and references for each transform.

File-Level Changes

Change Details Files
Expanded and improved docstring for RandomToneCurve class
  • Added a more detailed description of the transform's effect
  • Improved explanation of the 'scale' and 'per_channel' parameters
  • Added information about the number of channels supported
  • Included a note section with additional details about the transform
  • Added a mathematical formulation section
  • Expanded the examples section
  • Added references
albumentations/augmentations/transforms.py
Enhanced docstring for Sharpen class
  • Provided more detailed descriptions for 'alpha' and 'lightness' parameters
  • Added information about supported image types and number of channels
  • Included a note section explaining the sharpening effect and its uses
  • Added a mathematical formulation section
  • Expanded the examples section
  • Added references
albumentations/augmentations/transforms.py
Improved docstring for RingingOvershoot class
  • Expanded the class description to explain ringing artifacts
  • Provided more detailed explanations for 'blur_limit' and 'cutoff' parameters
  • Added information about supported image types and number of channels
  • Included a note section explaining ringing artifacts and their applications
  • Added a mathematical formulation section
  • Expanded the examples section
  • Updated and added references
albumentations/augmentations/transforms.py
Minor updates to other classes
  • Removed default values and descriptions from InitSchema fields in Superpixels class
  • Simplified InitSchema fields in UnsharpMask class
albumentations/augmentations/transforms.py

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a 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 and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟡 Complexity: 1 issue found
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

albumentations/augmentations/transforms.py Show resolved Hide resolved
@ternaus ternaus merged commit e50ae0f into main Sep 16, 2024
17 checks passed
@ternaus ternaus deleted the fix_docstrings branch September 16, 2024 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant