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

func_seed added #201

Merged
merged 5 commits into from
Dec 5, 2023
Merged

func_seed added #201

merged 5 commits into from
Dec 5, 2023

Conversation

sadrasabouri
Copy link
Collaborator

Reference Issues/PRs

#192

What does this implement/fix? Explain your changes.

func_seed parameter added to GenerativeImage.__init__ method

@sadrasabouri sadrasabouri self-assigned this Dec 1, 2023
@sadrasabouri sadrasabouri added the enhancement New feature or request label Dec 1, 2023
@sadrasabouri sadrasabouri added this to the samila v1.2 milestone Dec 1, 2023
Copy link
Owner

@sepandhaghighi sepandhaghighi left a comment

Choose a reason for hiding this comment

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

@sadrasabouri Thanks for your efforts 💯
Could you please add a code example about this new feature to README.md?

"""
random.seed(func_seed)
Copy link
Owner

Choose a reason for hiding this comment

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

python random.seed(None) is equal to No seed mode.
But, I suggest that the function should be called only when it is not None.

if func_seed is not None:
    random.seed(func_seed)

@sadrasabouri sadrasabouri marked this pull request as ready for review December 5, 2023 06:03
Copy link

codecov bot commented Dec 5, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (044de68) 100.00% compared to head (0b77d3f) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##               dev      #201   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         4           
  Lines          635       637    +2     
  Branches        94        95    +1     
=========================================
+ Hits           635       637    +2     

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

Copy link
Owner

@sepandhaghighi sepandhaghighi left a comment

Choose a reason for hiding this comment

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

🚀

@sepandhaghighi sepandhaghighi merged commit 6a74448 into dev Dec 5, 2023
35 of 36 checks passed
@sepandhaghighi sepandhaghighi deleted the func-seed branch December 5, 2023 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants