lk-geimfari / mimesis

Mimesis is a robust data generator for Python that can produce a wide range of fake data in multiple languages.
https://mimesis.name
MIT License
4.44k stars 336 forks source link

Implementing custom provider for factory_boy. #244

Closed lk-geimfari closed 6 years ago

lk-geimfari commented 7 years ago

This issue is based on suggestion of @sobolevn from issue #199.

Quote:

I came with even better idea: why now implementing custom provider for factory_boy?
It already has all the stuff we need!

If you want to take solve this issue, please read #199.

SteadBytes commented 7 years ago

Would this be something similar to the faker module - factory.faker for factory_boy? I've read #199 but am still a bit unsure.

sobolevn commented 7 years ago

That was my original idea. 👍

SteadBytes commented 7 years ago

Aha ok thank you 👍 , factory.faker is part of factory_boy, so this would be PR to factory_boy? Otherwise we'd need to pull in factory_boy as a dependency and add the functionality here - which would go against the claim in mimesis README that no other modules are required. Or am I missing something? I'd love to have a go at this but I don't want to get it wrong! 😕

lk-geimfari commented 7 years ago

@sobolevn What do you suggest? Something like this?

try:
    from module import something
except ImportError:
    raise ImportError("You should install factory_boy for using this feature")

or maybe just PR to factory_boy?

lk-geimfari commented 7 years ago

Also i have created this issue in the repository of factory_boy.