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

feat: add italian id number generator #1450

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

cbxp
Copy link
Contributor

@cbxp cbxp commented Nov 21, 2024

No description provided.

Copy link

what-the-diff bot commented Nov 21, 2024

PR Summary

  • Removal of Jacoco Maven plugin configuration
    The Jacoco Maven plugin configuration was removed from the pom.xml file. This change simplifies the configuration by eliminating unnecessary tools from our system.

  • Addition of new ItalianIdNumber class
    We've added a new tool, a class named ItalianIdNumber, for creating Italian ID numbers. This will allow us to generate these IDs when needed.

  • Introduction of utility methods
    Some utility methods are added into Utils.java. These tools will help with managing strings and checking for consonants, enhancing our ability to handle textual data.

  • Registration of ItalianIdNumber provider
    The new ItalianIdNumber provider is registered in the service definition file src/main/resources/META-INF/services/net.datafaker.idnumbers.IdNumberGenerator. This helps with the identification and generation of Italian ID numbers.

  • Creation of ItalianIdNumberTest class
    We've established a new testing class, ItalianIdNumberTest, to ensure the successful and accurate generation and validation of Italian ID numbers. This will help guarantee our services are operating effectively for this aspect.

  • Updating existing IdNumberTest class
    Finally, the existing IdNumberTest class was updated to include tests for the new Italian ID number format. This ensures we're not just rolling out new features, but also checking that they function properly within our established system.

@cbxp cbxp force-pushed the feature/italianIdNumber branch 3 times, most recently from 2ad6412 to 22bc8fd Compare November 21, 2024 16:06
@asolntsev asolntsev added this to the 2.4.3 milestone Nov 21, 2024
@asolntsev asolntsev self-assigned this Nov 21, 2024
@asolntsev asolntsev added the enhancement New feature or request label Nov 21, 2024
@cbxp cbxp force-pushed the feature/italianIdNumber branch 2 times, most recently from 7317b8d to c6cb512 Compare November 21, 2024 16:25
Comment on lines 13 to 15
static boolean isConsonant(char c) {
return Arrays.binarySearch(VOWELS, c) < 0;
}
Copy link
Collaborator

@kingthorin kingthorin Nov 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this actually faster than using a List (List.of) and .contains()?

Or Set...since Set is unique elements.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kingthorin Thanks, fixed. Now using Set.

@codecov-commenter
Copy link

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

Codecov Report

Attention: Patch coverage is 98.68421% with 1 line in your changes missing coverage. Please review.

Project coverage is 92.30%. Comparing base (e7151cc) to head (46f0c04).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ain/java/net/datafaker/idnumbers/LatinLetters.java 80.00% 1 Missing ⚠️

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

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1450      +/-   ##
============================================
+ Coverage     92.22%   92.30%   +0.07%     
- Complexity     3175     3199      +24     
============================================
  Files           321      323       +2     
  Lines          6198     6274      +76     
  Branches        593      595       +2     
============================================
+ Hits           5716     5791      +75     
- Misses          339      340       +1     
  Partials        143      143              

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


🚨 Try these New Features:

@kingthorin kingthorin merged commit 2bea30f into datafaker-net:main Nov 22, 2024
10 checks passed
@cbxp cbxp deleted the feature/italianIdNumber branch November 22, 2024 12:54
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.

4 participants