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(random): retry on invalid word generation #1307

Merged
merged 3 commits into from Aug 29, 2022

Conversation

xDivisionByZerox
Copy link
Member

This PR adds more source methods to the random.word method. It also sorts the sources alphabetically for better maintainability.

Fixes #129.

@xDivisionByZerox xDivisionByZerox added p: 1-normal Nothing urgent c: refactor PR that affects the runtime behavior, but doesn't add new features or fixes bugs m: random Something is referring to the random module labels Aug 27, 2022
@xDivisionByZerox xDivisionByZerox added this to the v7 - Current Major milestone Aug 27, 2022
@xDivisionByZerox xDivisionByZerox requested a review from a team August 27, 2022 22:55
@xDivisionByZerox xDivisionByZerox self-assigned this Aug 27, 2022
@xDivisionByZerox xDivisionByZerox requested a review from a team as a code owner August 27, 2022 22:55
@codecov
Copy link

codecov bot commented Aug 27, 2022

Codecov Report

Merging #1307 (2d1dbb3) into main (df789f5) will decrease coverage by 0.00%.
The diff coverage is 94.11%.

@@            Coverage Diff             @@
##             main    #1307      +/-   ##
==========================================
- Coverage   99.63%   99.62%   -0.01%     
==========================================
  Files        2160     2160              
  Lines      240455   240491      +36     
  Branches     1009     1010       +1     
==========================================
+ Hits       239568   239587      +19     
- Misses        866      883      +17     
  Partials       21       21              
Impacted Files Coverage Δ
src/modules/random/index.ts 97.63% <94.11%> (-0.51%) ⬇️
src/modules/internet/user-agent.ts 82.53% <0.00%> (-3.97%) ⬇️
src/modules/finance/index.ts 100.00% <0.00%> (+0.23%) ⬆️

Copy link
Member

@ST-DDT ST-DDT left a comment

Choose a reason for hiding this comment

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

I'm currently unable to test this, but it looks good to me from the sources point of view.

@ST-DDT
Copy link
Member

ST-DDT commented Aug 28, 2022

There is however this issue, that I feel would be a better solution.
#339

@Shinigami92 Shinigami92 changed the title refactor(random): word extend method pool fix(random): retry on invalid word generation Aug 28, 2022
@ST-DDT ST-DDT enabled auto-merge (squash) August 29, 2022 10:55
@ST-DDT
Copy link
Member

ST-DDT commented Aug 29, 2022

I will merge this because @xDivisionByZerox requested it, before moving it to faker.word.random().

@ST-DDT ST-DDT merged commit c2108fa into main Aug 29, 2022
@ST-DDT ST-DDT deleted the refactor/random-word/udate-word-methods branch August 29, 2022 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: refactor PR that affects the runtime behavior, but doesn't add new features or fixes bugs m: random Something is referring to the random module p: 1-normal Nothing urgent
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Use word methods in random.word()
5 participants