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

Expose rust as python extension #5

Merged
merged 13 commits into from
Mar 19, 2024
Merged

Expose rust as python extension #5

merged 13 commits into from
Mar 19, 2024

Conversation

MusicalNinjaDad
Copy link
Owner

Rename to fizzbuzzpy & fizzbuzzo3 and expose fizzbuzzo3.fizzbuzz to python

Copy link

codecov bot commented Mar 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (3ae8071) to head (2c82c33).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main        #5   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines           12        12           
  Branches         1         1           
=========================================
  Hits            12        12           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@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 @MusicalNinjaDad - I've reviewed your changes and they look great!

General suggestions:

  • Consider adding explicit handling for edge cases in the fizzbuzz function to ensure robustness across all possible inputs.
  • Review the naming convention for the PyO3 module to ensure clarity and alignment with Python package naming conventions.
Here's what I looked at during the review
  • 🟡 General issues: 2 issues found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Docstrings: all looks good

Thanks for using Sourcery. We offer it for free for open source projects and would be very grateful if you could help us grow. If you like it, would you consider sharing Sourcery on your favourite social media? ✨

Share Sourcery

Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

src/lib.rs Outdated
Comment on lines 65 to 67
fn fizzbuzz(num: i32) -> String {
num.fizzbuzz()
}
Copy link

Choose a reason for hiding this comment

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

suggestion (edge_case_not_handled): Consider handling edge cases for the fizzbuzz function.

The current implementation directly calls num.fizzbuzz() without checking for negative numbers or zero. It might be beneficial to define behavior for these cases to avoid unexpected results.

src/lib.rs Outdated Show resolved Hide resolved
@MusicalNinjaDad MusicalNinjaDad merged commit fca1ae8 into main Mar 19, 2024
10 checks passed
@MusicalNinjaDad MusicalNinjaDad deleted the PyO3 branch March 19, 2024 10:47
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