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

Add optional padding argument to logo tool #12409

Merged
merged 2 commits into from
Sep 17, 2024

Conversation

rtibbles
Copy link
Member

@rtibbles rtibbles commented Jul 3, 2024

Summary

@github-actions github-actions bot added the DEV: backend Python, databases, networking, filesystem... label Jul 3, 2024
@AllanOXDi AllanOXDi self-assigned this Aug 27, 2024
@AllanOXDi AllanOXDi self-requested a review September 17, 2024 20:08
@@ -34,6 +34,11 @@ def convert_svg_to_image(

# Determine the dimensions for a square based on the cropped image
max_dim = max(img_cropped.size)

if padding:
padding = int(padding) / 100
Copy link
Member

@AllanOXDi AllanOXDi Sep 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None blocking, but I wonder if we could add some additional error handling to ensure that the padding value is a valid percentage (i.e. between 0 and 100). i.e. ensure that the padding value is within this range, and raising an error if it is not?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We definitely could - as this was developer only code, I was not as thorough.

@rtibbles rtibbles merged commit 9eacece into learningequality:develop Sep 17, 2024
30 checks passed
@rtibbles rtibbles deleted the optional_padding branch September 17, 2024 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DEV: backend Python, databases, networking, filesystem...
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants