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

Merge faker.location.street() and faker.location.streetName() #2020

Closed
ST-DDT opened this issue Apr 4, 2023 · 3 comments · Fixed by #2051
Closed

Merge faker.location.street() and faker.location.streetName() #2020

ST-DDT opened this issue Apr 4, 2023 · 3 comments · Fixed by #2051
Assignees
Labels
c: refactor PR that affects the runtime behavior, but doesn't add new features or fixes bugs deprecation A deprecation was made in the PR m: location Something is referring to the location module p: 1-normal Nothing urgent s: accepted Accepted feature / Confirmed bug

Comments

@ST-DDT
Copy link
Member

ST-DDT commented Apr 4, 2023

Clear and concise description of the problem

From just the method names, it is confusing what each method does.

It also causes issues when a locale does not have a street_name_pattern or street_name locale file.

Suggested solution

Merge both methods into one. (Not sure about the name yet)

faker.location.streetName({ allowGenerated: boolean = true });

Alternative

  • Rename the methods to account for them generating real and generated street names respectively.

Additional context

Part of #1346

@ST-DDT ST-DDT added p: 1-normal Nothing urgent s: needs decision Needs team/maintainer decision c: refactor PR that affects the runtime behavior, but doesn't add new features or fixes bugs m: location Something is referring to the location module deprecation A deprecation was made in the PR labels Apr 4, 2023
@ST-DDT ST-DDT added this to the v8.0 - Module Re-Shuffling milestone Apr 4, 2023
@ST-DDT ST-DDT moved this to Todo in Faker Roadmap Apr 4, 2023
@matthewmayer
Copy link
Contributor

matthewmayer commented Apr 4, 2023

This one i'd consider not having a boolean parameter, as "real" and "generated" street names seem blurrier than cities. People cannot usually tell at a glance if a street name is real or generated, unlike with a city, and there are common real street names that repeat in a country.

@ST-DDT
Copy link
Member Author

ST-DDT commented Apr 6, 2023

Team Suggestion

  • We will merge both methods into one. Most likely street()
  • We will start without a generated/fictional parameter and will add that back when users request them. (This avoids breaking the API when removing the parameter if unneeded)
  • We will adjust the locale data name to explicitly refer to street_pattern instead of just street.

@ST-DDT
Copy link
Member Author

ST-DDT commented Apr 13, 2023

Team Decision

We want this for v8.0.

@ST-DDT ST-DDT added s: accepted Accepted feature / Confirmed bug and removed s: needs decision Needs team/maintainer decision labels Apr 13, 2023
@Shinigami92 Shinigami92 self-assigned this Apr 15, 2023
@xDivisionByZerox xDivisionByZerox moved this from Todo to In Progress in Faker Roadmap Apr 19, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in Faker Roadmap Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: refactor PR that affects the runtime behavior, but doesn't add new features or fixes bugs deprecation A deprecation was made in the PR m: location Something is referring to the location module p: 1-normal Nothing urgent s: accepted Accepted feature / Confirmed bug
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants