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

Introduce international and national phone number formats #425

Merged
merged 21 commits into from
Oct 22, 2022

Conversation

panilya
Copy link
Collaborator

@panilya panilya commented Oct 6, 2022

Issue: #168

Locales with international and national formats:

  • en-US
  • en-GB
  • bg
  • by
  • ca
  • ca-CAT
  • cs
  • cs-CZ
  • da-DK
  • de
  • de-AT
  • de-CH
  • ee
  • en-AU
  • en-au-ocker
  • en-CA
  • en-IND
  • en-MS
  • en-NEP
  • en-NG
  • en-NZ
  • en-PAK
  • en-PH
  • en-SG
  • en-UG
  • en-ZA
  • es
  • es-AR
  • es-MX
  • es-PY
  • fi-FI
  • fr
  • fr-CA
  • fr-CH
  • he
  • hr
  • hu
  • hy
  • id
  • in-ID
  • it
  • ja
  • ko
  • lv
  • nb-NO
  • nl
  • no-NO
  • pl
  • pt
  • pt-BR
  • ru
  • sk
  • sv
  • th
  • tr
  • uk
  • vi
  • zh-CN
  • zh-TW

@panilya
Copy link
Collaborator Author

panilya commented Oct 6, 2022

Build is falling because it cannot find formats_international and formats_national in .yml files yet.

src/main/resources/en-GB.yml Outdated Show resolved Hide resolved
@panilya panilya force-pushed the phone-number-improvement branch from e38aa73 to 45325d1 Compare October 7, 2022 16:53
@panilya
Copy link
Collaborator Author

panilya commented Oct 11, 2022

@bodiam What if I add formats_international to all formats that have not been created yet, just to pass tests, and create an issue with the marked list of locales to be able to track the state of locales? Because, as for me, it will be better to let anybody implement an international format for locales

@bodiam
Copy link
Contributor

bodiam commented Oct 11, 2022

Shouldn't it fall back to a default format when it can't find it for the current locale?

I understand the format will be wrong then, which is fine, we can improve it as we go.

@panilya
Copy link
Collaborator Author

panilya commented Oct 12, 2022

@bodiam It's a good idea, but tests fall anyway, net.datafaker.integration.FakerIntegrationTest.testAllFakerMethodsThatReturnStrings(Locale, Random) throws phone_number.formats_international resulted in null expression exception. So, I don't know how to run tests successfully without adding duplicate international_formats.

@panilya panilya force-pushed the phone-number-improvement branch 2 times, most recently from 0f4e942 to 34400c5 Compare October 13, 2022 17:40
@panilya panilya force-pushed the phone-number-improvement branch from 34400c5 to 0353945 Compare October 13, 2022 18:12
@panilya panilya force-pushed the phone-number-improvement branch from 0353945 to ded33ff Compare October 13, 2022 18:18
@panilya panilya marked this pull request as ready for review October 20, 2022 16:39
@codecov-commenter
Copy link

codecov-commenter commented Oct 21, 2022

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.01%. Comparing base (73f6a1b) to head (a8db23e).
Report is 1132 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #425      +/-   ##
============================================
+ Coverage     92.98%   93.01%   +0.02%     
- Complexity     2096     2099       +3     
============================================
  Files           233      233              
  Lines          4376     4378       +2     
  Branches        450      450              
============================================
+ Hits           4069     4072       +3     
- Misses          187      190       +3     
+ Partials        120      116       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@panilya panilya merged commit 16fb4cf into datafaker-net:main Oct 22, 2022
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.

4 participants