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

feat(food): new module #2484

Merged
merged 20 commits into from
Feb 11, 2024
Merged

feat(food): new module #2484

merged 20 commits into from
Feb 11, 2024

Conversation

xDivisionByZerox
Copy link
Member

Description

MVP implementation for a new FoodModule. The locale data is based on the dataset of the ruby Faker library.

Feel free to discuss certain implementation details or locale data as you wish.

More Context

Resolves #1593.

@xDivisionByZerox xDivisionByZerox added c: feature Request for new feature p: 1-normal Nothing urgent s: accepted Accepted feature / Confirmed bug labels Oct 17, 2023
@xDivisionByZerox xDivisionByZerox added this to the vAnytime milestone Oct 17, 2023
@xDivisionByZerox xDivisionByZerox self-assigned this Oct 17, 2023
@xDivisionByZerox xDivisionByZerox requested a review from a team October 17, 2023 20:18
@xDivisionByZerox xDivisionByZerox requested a review from a team as a code owner October 17, 2023 20:18
@xDivisionByZerox xDivisionByZerox added the m: food Something is referring to the food module label Oct 17, 2023
@codecov
Copy link

codecov bot commented Oct 17, 2023

Codecov Report

Attention: 56 lines in your changes are missing coverage. Please review.

Comparison is base (0e4b93f) 99.57% compared to head (2118804) 99.55%.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #2484      +/-   ##
==========================================
- Coverage   99.57%   99.55%   -0.02%     
==========================================
  Files        2807     2820      +13     
  Lines      250526   251739    +1213     
  Branches     1149     1167      +18     
==========================================
+ Hits       249450   250613    +1163     
- Misses       1076     1097      +21     
- Partials        0       29      +29     
Files Coverage Δ
src/faker.ts 89.93% <100.00%> (+0.04%) ⬆️
src/index.ts 100.00% <100.00%> (ø)
src/locales/en/food/adjective.ts 100.00% <100.00%> (ø)
src/locales/en/food/description_pattern.ts 100.00% <100.00%> (ø)
src/locales/en/food/dish.ts 100.00% <100.00%> (ø)
src/locales/en/food/dish_pattern.ts 100.00% <100.00%> (ø)
src/locales/en/food/ethnic_category.ts 100.00% <100.00%> (ø)
src/locales/en/food/fruit.ts 100.00% <100.00%> (ø)
src/locales/en/food/index.ts 100.00% <100.00%> (ø)
src/locales/en/food/ingredient.ts 100.00% <100.00%> (ø)
... and 8 more

... and 28 files with indirect coverage changes

test.ts Outdated Show resolved Hide resolved
test/modules/__snapshots__/food.spec.ts.snap Outdated Show resolved Hide resolved
test/modules/food.spec.ts Outdated Show resolved Hide resolved
src/locales/en/food/dish.ts Outdated Show resolved Hide resolved
src/locales/en/food/fruit.ts Outdated Show resolved Hide resolved
@ST-DDT ST-DDT added s: needs decision Needs team/maintainer decision and removed s: needs decision Needs team/maintainer decision labels Oct 20, 2023
src/locales/en/food/description_pattern.ts Outdated Show resolved Hide resolved
@ST-DDT
Copy link
Member

ST-DDT commented Oct 30, 2023

Please fix the "merge conflicts" (although I don't think there are any for local executions).

@ST-DDT ST-DDT added the needs rebase There is a merge conflict label Oct 30, 2023
@matthewmayer
Copy link
Contributor

@xDivisionByZerox would you be OK with me continuing work on this to address some of the feedback and get to an MVP?

@xDivisionByZerox
Copy link
Member Author

@xDivisionByZerox would you be OK with me continuing work on this to address some of the feedback and get to an MVP?

@matthewmayer I would be happy if you would continue working on this.

- add new definitions for adjective, dish_pattern and meat
- add more description patterns
- make most definitions lower case and singular
- alphabeticize definitions
@matthewmayer
Copy link
Contributor

You can see a sample menu from the Faker Bistro here ;)

https://gist.github.com/matthewmayer/794406e8281e2c796e70495a1598ec50

Generated with:

console.log(faker.helpers.multiple(a=>faker.helpers.fake("**{{food.dish}}** - {{commerce.price({\"max\":30})}}\n\n{{food.description}}\n\n"),{count:50}).join(""))

src/modules/food/index.ts Outdated Show resolved Hide resolved
src/modules/food/index.ts Outdated Show resolved Hide resolved
@matthewmayer matthewmayer removed the needs rebase There is a merge conflict label Jan 23, 2024
@ST-DDT
Copy link
Member

ST-DDT commented Feb 10, 2024

FFR: This feature would benefit from #2584

ST-DDT
ST-DDT previously approved these changes Feb 10, 2024
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.

A little typo but otherwise good to go.

src/modules/food/index.ts Outdated Show resolved Hide resolved
Co-authored-by: ST-DDT <ST-DDT@gmx.de>
@ST-DDT ST-DDT requested review from a team February 10, 2024 11:49
@ST-DDT ST-DDT enabled auto-merge (squash) February 11, 2024 10:25
@ST-DDT ST-DDT merged commit 9aab7c2 into next Feb 11, 2024
16 checks passed
@ST-DDT ST-DDT deleted the feat/food-module branch February 11, 2024 10:29
@IgnusG
Copy link

IgnusG commented Feb 24, 2024

Just checking out of curiosity, I see a new version with this module has not been published yet. Is that intentional?

@matthewmayer
Copy link
Contributor

Yes it's intentional it will appear in v9 but there are a few more things to merge before the first alpha/beta version of v9 will be released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: feature Request for new feature m: food Something is referring to the food module p: 1-normal Nothing urgent s: accepted Accepted feature / Confirmed bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add food module on faker 🍽
6 participants