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

Extend Person Provider to support nonbinary suffixes and prefixes #1206

Merged
merged 5 commits into from
Jun 21, 2020

Conversation

crd
Copy link
Contributor

@crd crd commented Jun 19, 2020

What does this change

  • Extends Person Provider to support nonbinary suffixes and prefixes
  • Provides a nonbinary name formatter
  • Implements tests

Strategy for a reasonable implementation for nobinary genders for en-US provider

  • First Names are chosen from the currently-implemented male and female first name lists
  • Name Format is consistent with existing male and female Name Formats
  • Prefixes selected from the list provided at https://en.wikipedia.org/wiki/Gender-neutral_title
  • Suffixes are consistent with the currently-implemented male Suffix list

Closes #1205

@crd crd force-pushed the add_nonbinary_person branch from 7d3aa97 to 266d32c Compare June 20, 2020 00:35
@fcurella
Copy link
Collaborator

Thank you! Very much appreciated it! ✨

@fcurella fcurella merged commit 03a1a66 into joke2k:master Jun 21, 2020
@crd crd deleted the add_nonbinary_person branch June 22, 2020 00:25
fcurella pushed a commit that referenced this pull request Aug 4, 2020
)

* Implement nonbinary Person Provider

* Address flake8 and isort findings

* Fix import ordering in tests

* Add tests for en Provider to test preexisting suffix scenario

* Refine tests for en Provider
fcurella added a commit that referenced this pull request Aug 17, 2020
* Extend Person Provider to support nonbinary suffixes and prefixes (#1206)

* Implement nonbinary Person Provider

* Address flake8 and isort findings

* Fix import ordering in tests

* Add tests for en Provider to test preexisting suffix scenario

* Refine tests for en Provider

* Close #1208. Update setup.py `python_requires`

* Add safe domain names (#1209)

* Add safe_domain_name() to Internet Provider

* Apply DRY to safe domain generation

* Add a test for safe email generation

* Update __init__.py (#1217)

some grammar fix

* 💂 Fix max_value/positive pyfloat interaction (#1218)

* 💂 Fix max_value/positive pyfloat interaction

When pyfloat(max_value=100, positive=True) is called, it sometimes
returns negative numbers, which is unexpected.

To fix it, we just need to "cap" our internal minimum value to zero.

This does leave `pyfloat(max_value=100, min_value=-100, positive=True)`
as a call that secretly moves the min_value up to 0 though.

Fixes #1212.

* 💥 Forbid pyfloat call with incompatible arguments

`pyfloat(positive=True, min_value=-1)` will now throw a ValueError,
since the combination of a request for a positive number, yet a negative
minimum value is probably not what the caller intended.

* Update bban_format for country FI (#1220)

Fixes #1219.

* Fix person.ja_JP kana and roman characters (#1221)

* Add ja_JP kana_names

* Reformat and Add links

* fix PEP8

* JSON and Fixed_Width Structures (#1223)

* Builder module

* Move to Misc as Methods

* Allow JSON to produce single entry

* json and fixed_width tests

* Improved structure creation and tests

* correcting E231

* Value only lists

* fix E303

* Improved docstrings

* Parser Arguments

* Strip not require

* Better description of error

* Format Parser with Caching

* Correct import position

* Better handing of white space

* Refinement and Tests

* Replace parser with format argument token

* Use format name only if found

* Fix Flake8 E231

* Remove JSON

* Add Argument Group Methods

* Change Add to Set, Correct Tests

* Fix Flake8 C812

Co-authored-by: Cory Donnelly <[email protected]>
Co-authored-by: Flavio Curella <[email protected]>
Co-authored-by: Pavel E. Petrov <[email protected]>
Co-authored-by: coiax <[email protected]>
Co-authored-by: ALMP-SallaH <[email protected]>
Co-authored-by: Yohei Ema <[email protected]>
fcurella added a commit that referenced this pull request Aug 19, 2020
* Extend Person Provider to support nonbinary suffixes and prefixes (#1206)

* Implement nonbinary Person Provider

* Address flake8 and isort findings

* Fix import ordering in tests

* Add tests for en Provider to test preexisting suffix scenario

* Refine tests for en Provider

* Close #1208. Update setup.py `python_requires`

* Add safe domain names (#1209)

* Add safe_domain_name() to Internet Provider

* Apply DRY to safe domain generation

* Add a test for safe email generation

* Update __init__.py (#1217)

some grammar fix

* 💂 Fix max_value/positive pyfloat interaction (#1218)

* 💂 Fix max_value/positive pyfloat interaction

When pyfloat(max_value=100, positive=True) is called, it sometimes
returns negative numbers, which is unexpected.

To fix it, we just need to "cap" our internal minimum value to zero.

This does leave `pyfloat(max_value=100, min_value=-100, positive=True)`
as a call that secretly moves the min_value up to 0 though.

Fixes #1212.

* 💥 Forbid pyfloat call with incompatible arguments

`pyfloat(positive=True, min_value=-1)` will now throw a ValueError,
since the combination of a request for a positive number, yet a negative
minimum value is probably not what the caller intended.

* Update bban_format for country FI (#1220)

Fixes #1219.

* Fix person.ja_JP kana and roman characters (#1221)

* Add ja_JP kana_names

* Reformat and Add links

* fix PEP8

* JSON and Fixed_Width Structures (#1223)

* Builder module

* Move to Misc as Methods

* Allow JSON to produce single entry

* json and fixed_width tests

* Improved structure creation and tests

* correcting E231

* Value only lists

* fix E303

* Improved docstrings

* Add Argument Group references

* Add Argument Group and Parser Support

* Fixed handing of integers and floats

* Addressed Flake8 findings

* Better Examples and Samples

Co-authored-by: Cory Donnelly <[email protected]>
Co-authored-by: Flavio Curella <[email protected]>
Co-authored-by: Pavel E. Petrov <[email protected]>
Co-authored-by: coiax <[email protected]>
Co-authored-by: ALMP-SallaH <[email protected]>
Co-authored-by: Yohei Ema <[email protected]>
IlfirinPL pushed a commit to IlfirinPL/faker that referenced this pull request Apr 9, 2021
…ke2k#1206)

* Implement nonbinary Person Provider

* Address flake8 and isort findings

* Fix import ordering in tests

* Add tests for en Provider to test preexisting suffix scenario

* Refine tests for en Provider
IlfirinPL pushed a commit to IlfirinPL/faker that referenced this pull request Apr 9, 2021
* Extend Person Provider to support nonbinary suffixes and prefixes (joke2k#1206)

* Implement nonbinary Person Provider

* Address flake8 and isort findings

* Fix import ordering in tests

* Add tests for en Provider to test preexisting suffix scenario

* Refine tests for en Provider

* Close joke2k#1208. Update setup.py `python_requires`

* Add safe domain names (joke2k#1209)

* Add safe_domain_name() to Internet Provider

* Apply DRY to safe domain generation

* Add a test for safe email generation

* Update __init__.py (joke2k#1217)

some grammar fix

* 💂 Fix max_value/positive pyfloat interaction (joke2k#1218)

* 💂 Fix max_value/positive pyfloat interaction

When pyfloat(max_value=100, positive=True) is called, it sometimes
returns negative numbers, which is unexpected.

To fix it, we just need to "cap" our internal minimum value to zero.

This does leave `pyfloat(max_value=100, min_value=-100, positive=True)`
as a call that secretly moves the min_value up to 0 though.

Fixes joke2k#1212.

* 💥 Forbid pyfloat call with incompatible arguments

`pyfloat(positive=True, min_value=-1)` will now throw a ValueError,
since the combination of a request for a positive number, yet a negative
minimum value is probably not what the caller intended.

* Update bban_format for country FI (joke2k#1220)

Fixes joke2k#1219.

* Fix person.ja_JP kana and roman characters (joke2k#1221)

* Add ja_JP kana_names

* Reformat and Add links

* fix PEP8

* JSON and Fixed_Width Structures (joke2k#1223)

* Builder module

* Move to Misc as Methods

* Allow JSON to produce single entry

* json and fixed_width tests

* Improved structure creation and tests

* correcting E231

* Value only lists

* fix E303

* Improved docstrings

* Parser Arguments

* Strip not require

* Better description of error

* Format Parser with Caching

* Correct import position

* Better handing of white space

* Refinement and Tests

* Replace parser with format argument token

* Use format name only if found

* Fix Flake8 E231

* Remove JSON

* Add Argument Group Methods

* Change Add to Set, Correct Tests

* Fix Flake8 C812

Co-authored-by: Cory Donnelly <[email protected]>
Co-authored-by: Flavio Curella <[email protected]>
Co-authored-by: Pavel E. Petrov <[email protected]>
Co-authored-by: coiax <[email protected]>
Co-authored-by: ALMP-SallaH <[email protected]>
Co-authored-by: Yohei Ema <[email protected]>
IlfirinPL pushed a commit to IlfirinPL/faker that referenced this pull request Apr 9, 2021
* Extend Person Provider to support nonbinary suffixes and prefixes (joke2k#1206)

* Implement nonbinary Person Provider

* Address flake8 and isort findings

* Fix import ordering in tests

* Add tests for en Provider to test preexisting suffix scenario

* Refine tests for en Provider

* Close joke2k#1208. Update setup.py `python_requires`

* Add safe domain names (joke2k#1209)

* Add safe_domain_name() to Internet Provider

* Apply DRY to safe domain generation

* Add a test for safe email generation

* Update __init__.py (joke2k#1217)

some grammar fix

* 💂 Fix max_value/positive pyfloat interaction (joke2k#1218)

* 💂 Fix max_value/positive pyfloat interaction

When pyfloat(max_value=100, positive=True) is called, it sometimes
returns negative numbers, which is unexpected.

To fix it, we just need to "cap" our internal minimum value to zero.

This does leave `pyfloat(max_value=100, min_value=-100, positive=True)`
as a call that secretly moves the min_value up to 0 though.

Fixes joke2k#1212.

* 💥 Forbid pyfloat call with incompatible arguments

`pyfloat(positive=True, min_value=-1)` will now throw a ValueError,
since the combination of a request for a positive number, yet a negative
minimum value is probably not what the caller intended.

* Update bban_format for country FI (joke2k#1220)

Fixes joke2k#1219.

* Fix person.ja_JP kana and roman characters (joke2k#1221)

* Add ja_JP kana_names

* Reformat and Add links

* fix PEP8

* JSON and Fixed_Width Structures (joke2k#1223)

* Builder module

* Move to Misc as Methods

* Allow JSON to produce single entry

* json and fixed_width tests

* Improved structure creation and tests

* correcting E231

* Value only lists

* fix E303

* Improved docstrings

* Add Argument Group references

* Add Argument Group and Parser Support

* Fixed handing of integers and floats

* Addressed Flake8 findings

* Better Examples and Samples

Co-authored-by: Cory Donnelly <[email protected]>
Co-authored-by: Flavio Curella <[email protected]>
Co-authored-by: Pavel E. Petrov <[email protected]>
Co-authored-by: coiax <[email protected]>
Co-authored-by: ALMP-SallaH <[email protected]>
Co-authored-by: Yohei Ema <[email protected]>
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.

Feature Request: Support nonbinary gender options in Person Provider
2 participants