Skip to content

add Estonian id number generator - #1197

Merged
snuyanzin merged 1 commit into
datafaker-net:mainfrom
asolntsev:feature/estonia
May 18, 2024
Merged

snuyanzin merged 1 commit into
datafaker-net:mainfrom
asolntsev:feature/estonia

Conversation

@asolntsev

Copy link
Copy Markdown
Collaborator

No description provided.

@what-the-diff

what-the-diff Bot commented May 18, 2024

Copy link
Copy Markdown

PR Summary

  • Addition of 'EstonianIdNumber.java'
    This introduces logic to generate valid or invalid Estonian personal identification numbers, improving flexibility for clients needing Estonian ID numbers.

  • New methods in 'IdNumber.java'
    validEstonianPersonalCode() and invalidEstonianPersonalCode() methods have been introduced, utilizing the new EstonianIdNumber class to create valid and invalid Estonian IDs as per requirement.

  • Adding 'et.yml' localization file
    Localizing addresses, companies, names etc. for the Estonian language, to improve user experience for Estonian-speaking users.

  • Addition of 'EstonianIdNumberTest.java'
    To ensure the correctness of the checksum calculation in the EstonianIdNumber class, this test file has been added - emphasizing our commitment to high quality, error-free code.

  • Addition of 'AddressTest.java', 'IdNumberTest.java', and 'PhoneNumberTest.java'
    It's important that the new methods for generating Estonian addresses, personal identification numbers, and phone numbers work correctly. These added test files are ensuring that these newly added features perform as expected.

@codecov-commenter

codecov-commenter commented May 18, 2024 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.13%. Comparing base (b37c566) to head (4a986a5).
Report is 98 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    #1197      +/-   ##
============================================
- Coverage     92.35%   92.13%   -0.22%     
- Complexity     2821     2903      +82     
============================================
  Files           292      301       +9     
  Lines          5609     5750     +141     
  Branches        599      620      +21     
============================================
+ Hits           5180     5298     +118     
- Misses          275      293      +18     
- Partials        154      159       +5     

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

@snuyanzin

snuyanzin commented May 18, 2024 •

Copy link
Copy Markdown
Collaborator

for the history: the failure from the prev run https://github.com/datafaker-net/datafaker/actions/runs/9141367115/job/25135690288#step:4:1584
is a known floating issue #1190 and not related to changes within this PR

@snuyanzin

snuyanzin commented May 18, 2024 •

Copy link
Copy Markdown
Collaborator

Great to see the number of locales increasing
thanks for your contribution @asolntsev
it looks good to me

Could you please also add the locale to README's supported locales section at

Supported Locales

?

@asolntsev

Copy link
Copy Markdown
Collaborator Author

@snuyanzin Sure, I've added "et" to README.

@snuyanzin
snuyanzin merged commit 1e76292 into datafaker-net:main May 18, 2024
@asolntsev
asolntsev deleted the feature/estonia branch May 18, 2024 18:34
@asolntsev

Copy link
Copy Markdown
Collaborator Author

@snuyanzin Oops, now I realized that the project already had Estonian support.
But it was in file ee.yml. While I added another file et.yml.

So what is the file name: country code or language code?
For Estonia, "ee" is country code, and "et" is language code.

@snuyanzin

Copy link
Copy Markdown
Collaborator

yep, sorry I should have checked that before...

there are 2 ways

  1. just language code, in that case it should be et
  2. language code - country code e.g en-CA.yml, en-GB.yml, en-IND.yml, en-MS.yml

@asolntsev

Copy link
Copy Markdown
Collaborator Author

@snuyanzin Ok, then I will create a PR for merging "et.yml" and "ee.yml" into one file?

@snuyanzin

snuyanzin commented May 23, 2024 •

Copy link
Copy Markdown
Collaborator

yep, I think that would make sense
+ may be update README.md if it is required after the merge

@asolntsev

Copy link
Copy Markdown
Collaborator Author

Cool :)

Here it is: #1206

@asolntsev asolntsev self-assigned this May 26, 2024
@asolntsev asolntsev added the enhancement New feature or request label May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants