From 11f64d6cb94ec013e73daa22b1decb47df11e77e Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Wed, 17 May 2023 04:01:26 +0000 Subject: automatic import of python-mimesis-factory --- .gitignore | 1 + python-mimesis-factory.spec | 293 ++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 295 insertions(+) create mode 100644 python-mimesis-factory.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..a44a020 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/mimesis_factory-1.2.0.tar.gz diff --git a/python-mimesis-factory.spec b/python-mimesis-factory.spec new file mode 100644 index 0000000..96710c3 --- /dev/null +++ b/python-mimesis-factory.spec @@ -0,0 +1,293 @@ +%global _empty_manifest_terminate_build 0 +Name: python-mimesis-factory +Version: 1.2.0 +Release: 1 +Summary: Mimesis integration with factory_boy +License: MIT +URL: https://github.com/mimesis-lab/mimesis-factory +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/34/2e/392b366d45ee16523f6e751a40f7e4050f19ab2c6a6572827d3baecb60f7/mimesis_factory-1.2.0.tar.gz +BuildArch: noarch + +Requires: python3-factory-boy +Requires: python3-mimesis + +%description +## mimesis_factory + +[![Build Status](https://travis-ci.com/mimesis-lab/mimesis-factory.svg?branch=master)](https://travis-ci.com/mimesis-lab/mimesis-factory) +[![Coverage](https://coveralls.io/repos/github/mimesis-lab/mimesis-factory/badge.svg?branch=master)](https://coveralls.io/github/mimesis-lab/mimesis-factory?branch=master) +[![PyPI version](https://badge.fury.io/py/mimesis-factory.svg)](https://badge.fury.io/py/mimesis-factory) [![wemake-python-styleguide](https://img.shields.io/badge/style-wemake-000000.svg)](https://github.com/wemake-services/wemake-python-styleguide) + + + +

+ +

+
+ + +## Description + +[Mimesis](https://github.com/lk-geimfari/mimesis) integration for [`factory_boy`](https://github.com/FactoryBoy/factory_boy). + +## Installation + +```python +➜ pip install mimesis_factory +``` + + +## Usage + +Look at the example below and you’ll understand how it works: + +```python +class Account(object): + def __init__(self, username, email, name, surname, age): + self.username = username + self.email = email + self.name = name + self.surname = surname + self.age = age +``` + +Now, use the `MimesisField` class from `mimesis_factory` +to define how fake data is generated: + +```python +import factory +from mimesis_factory import MimesisField + +from account import Account + + +class AccountFactory(factory.Factory): + class Meta(object): + model = Account + + username = MimesisField('username', template='l_d') + name = MimesisField('name', gender='female') + surname = MimesisField('surname', gender='female') + age = MimesisField('age', minimum=18, maximum=90) + email = factory.LazyAttribute( + lambda instance: '{0}@example.org'.format(instance.username) + ) + access_token = MimesisField('token', entropy=32) +``` + + +## pytest + +We also recommend to use [`pytest-factoryboy`](https://github.com/pytest-dev/pytest-factoryboy). +This way it will be possible to integrate your factories into `pytest` fixtures. + + +## License + +`mimesis_factory` is released under the MIT License. + + +%package -n python3-mimesis-factory +Summary: Mimesis integration with factory_boy +Provides: python-mimesis-factory +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-mimesis-factory +## mimesis_factory + +[![Build Status](https://travis-ci.com/mimesis-lab/mimesis-factory.svg?branch=master)](https://travis-ci.com/mimesis-lab/mimesis-factory) +[![Coverage](https://coveralls.io/repos/github/mimesis-lab/mimesis-factory/badge.svg?branch=master)](https://coveralls.io/github/mimesis-lab/mimesis-factory?branch=master) +[![PyPI version](https://badge.fury.io/py/mimesis-factory.svg)](https://badge.fury.io/py/mimesis-factory) [![wemake-python-styleguide](https://img.shields.io/badge/style-wemake-000000.svg)](https://github.com/wemake-services/wemake-python-styleguide) + + + +

+ +

+
+ + +## Description + +[Mimesis](https://github.com/lk-geimfari/mimesis) integration for [`factory_boy`](https://github.com/FactoryBoy/factory_boy). + +## Installation + +```python +➜ pip install mimesis_factory +``` + + +## Usage + +Look at the example below and you’ll understand how it works: + +```python +class Account(object): + def __init__(self, username, email, name, surname, age): + self.username = username + self.email = email + self.name = name + self.surname = surname + self.age = age +``` + +Now, use the `MimesisField` class from `mimesis_factory` +to define how fake data is generated: + +```python +import factory +from mimesis_factory import MimesisField + +from account import Account + + +class AccountFactory(factory.Factory): + class Meta(object): + model = Account + + username = MimesisField('username', template='l_d') + name = MimesisField('name', gender='female') + surname = MimesisField('surname', gender='female') + age = MimesisField('age', minimum=18, maximum=90) + email = factory.LazyAttribute( + lambda instance: '{0}@example.org'.format(instance.username) + ) + access_token = MimesisField('token', entropy=32) +``` + + +## pytest + +We also recommend to use [`pytest-factoryboy`](https://github.com/pytest-dev/pytest-factoryboy). +This way it will be possible to integrate your factories into `pytest` fixtures. + + +## License + +`mimesis_factory` is released under the MIT License. + + +%package help +Summary: Development documents and examples for mimesis-factory +Provides: python3-mimesis-factory-doc +%description help +## mimesis_factory + +[![Build Status](https://travis-ci.com/mimesis-lab/mimesis-factory.svg?branch=master)](https://travis-ci.com/mimesis-lab/mimesis-factory) +[![Coverage](https://coveralls.io/repos/github/mimesis-lab/mimesis-factory/badge.svg?branch=master)](https://coveralls.io/github/mimesis-lab/mimesis-factory?branch=master) +[![PyPI version](https://badge.fury.io/py/mimesis-factory.svg)](https://badge.fury.io/py/mimesis-factory) [![wemake-python-styleguide](https://img.shields.io/badge/style-wemake-000000.svg)](https://github.com/wemake-services/wemake-python-styleguide) + + + +

+ +

+
+ + +## Description + +[Mimesis](https://github.com/lk-geimfari/mimesis) integration for [`factory_boy`](https://github.com/FactoryBoy/factory_boy). + +## Installation + +```python +➜ pip install mimesis_factory +``` + + +## Usage + +Look at the example below and you’ll understand how it works: + +```python +class Account(object): + def __init__(self, username, email, name, surname, age): + self.username = username + self.email = email + self.name = name + self.surname = surname + self.age = age +``` + +Now, use the `MimesisField` class from `mimesis_factory` +to define how fake data is generated: + +```python +import factory +from mimesis_factory import MimesisField + +from account import Account + + +class AccountFactory(factory.Factory): + class Meta(object): + model = Account + + username = MimesisField('username', template='l_d') + name = MimesisField('name', gender='female') + surname = MimesisField('surname', gender='female') + age = MimesisField('age', minimum=18, maximum=90) + email = factory.LazyAttribute( + lambda instance: '{0}@example.org'.format(instance.username) + ) + access_token = MimesisField('token', entropy=32) +``` + + +## pytest + +We also recommend to use [`pytest-factoryboy`](https://github.com/pytest-dev/pytest-factoryboy). +This way it will be possible to integrate your factories into `pytest` fixtures. + + +## License + +`mimesis_factory` is released under the MIT License. + + +%prep +%autosetup -n mimesis-factory-1.2.0 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-mimesis-factory -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Wed May 17 2023 Python_Bot - 1.2.0-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..aeea493 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +6236e2b5f6c9e9aef7fd0b01d8d2ed0e mimesis_factory-1.2.0.tar.gz -- cgit v1.2.3