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

Add utility functions to AnonymizedFaker #561

Closed
pvk-developer opened this issue Oct 5, 2022 · 0 comments · Fixed by #565
Closed

Add utility functions to AnonymizedFaker #561

pvk-developer opened this issue Oct 5, 2022 · 0 comments · Fixed by #565
Assignees
Labels
feature request Request for a new feature
Milestone

Comments

@pvk-developer
Copy link
Member

pvk-developer commented Oct 5, 2022

Problem Description

In order to work directly with an sdtype (eg: 'job' as sdtype), it would be usefull to have the following two utility functions in AnonymizedFaker:

  • is_faker_function: A function that returns True or False whether or not the provided sdtype is considered a faker function.
  • get_provider_name: A function that returns the provider_name for the given sdtype.

With the following functions we would be able to support wider range of sdtypes.

Expected behavior

from rdt.transformers.pii.utilis import get_provider_name, is_faker_function

is_faker_function('job')
True

get_provider_name('job')
job

get_provider_name('lexify'):
BaseProvider

Additional context

By adding this two features we will be able to remove faker dependency from https://github.com/sdv-dev/SDV

@pvk-developer pvk-developer added the feature request Request for a new feature label Oct 5, 2022
@amontanez24 amontanez24 added this to the 1.3.0 milestone Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request for a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants