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(mapper): expressions now have access to the Faker libary, rather than just faker instance #2577

Closed
wants to merge 1 commit into from

Conversation

Mac-lp3
Copy link
Contributor

@Mac-lp3 Mac-lp3 commented Jul 30, 2024

I made a post in the discussions about my motivation for this.

Note the Faker lib provides two ways to accomplish this:

  1. How it is done in this PR
from faker import Faker
Faker.seed('something')
faker = Faker()
  1. Create your faker instance using the Faker.factory() method.
from faker.factory import Factory
Faker = Factory.create
fake = Faker()
fake.seed(0)

Option 2 is actually what the faker docs recommend.

Unfortunately, option 2 does not allow for multiple locales. Given that, I thought it best to go with option 1, rather than breaking other people's code.


📚 Documentation preview 📚: https://meltano-sdk--2577.org.readthedocs.build/en/2577/

…pper expressions (provided a faker config is found).
@Mac-lp3 Mac-lp3 requested a review from edgarrmondragon as a code owner July 30, 2024 03:52
Copy link

codspeed-hq bot commented Jul 30, 2024

CodSpeed Performance Report

Merging #2577 will not alter performance

Comparing Mac-lp3:main (8d14c72) with main (5eb1235)

Summary

✅ 6 untouched benchmarks

@Mac-lp3 Mac-lp3 changed the title Mapper expressions now have access to the Faker libary, rather than just faker instance feat: mapper expressions now have access to the Faker libary, rather than just faker instance Jul 30, 2024
@Mac-lp3 Mac-lp3 changed the title feat: mapper expressions now have access to the Faker libary, rather than just faker instance feat(mapper): expressions now have access to the Faker libary, rather than just faker instance Jul 30, 2024
Copy link

codecov bot commented Jul 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.47%. Comparing base (5eb1235) to head (8d14c72).
Report is 123 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2577   +/-   ##
=======================================
  Coverage   89.47%   89.47%           
=======================================
  Files          58       58           
  Lines        4799     4799           
  Branches      937      937           
=======================================
  Hits         4294     4294           
  Misses        352      352           
  Partials      153      153           

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

@Mac-lp3 Mac-lp3 closed this Jul 30, 2024
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