SFDO-Community-Sprints / Snowfakery-Edu

Fake data to support educational institutions
BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

Names for HS Institutions reference faker.name & faker.address #18

Open allisonletts opened 2 years ago

allisonletts commented 2 years ago

Feature Description

I don't like the default Faker city name generator. My testing yielded names like "South Melissamouth High School" which is a problem with the city, not with the work you did here.

I also don't love that professional suffixes (MD, PhD, DVM, DDS) are included in the names sent back. I would have expected only professional prefixes.

Proposed Solution

City: pull an actual list of cities... Names: define a separate namer that doesn't include professional suffixes, and sometimes has only initials for the first/middle name.

acrosman commented 2 years ago

For cities, unlike states, Faker actually generates the names. I didn't look into the pattern it uses in any detail so I don't know what elements get fed in. That means we'd have to create our own list instead of using a generated list. That would significantly reduce the size of the generated pool. Not a deal breaker, but worth considering.

For names, it absolutely should be broken into pieces to avoid the issues when full names are used.

allisonletts commented 2 years ago

Here it is. They use first names as part of the city generation. I'd prefer to have a smaller list that wasn't quite so strange looking. https://github.com/joke2k/faker/blob/001ddee39c33b6b82196fe6a5ecc131bca3b964c/faker/providers/address/en_US/__init__.py#L445-L450

    city_formats = (
        "{{city_prefix}} {{first_name}}{{city_suffix}}",
        "{{city_prefix}} {{first_name}}",
        "{{first_name}}{{city_suffix}}",
        "{{last_name}}{{city_suffix}}",
    )