Skip to content

Add argentina zipcodes#1453

Merged
bodiam merged 2 commits into
datafaker-net:mainfrom
Jonathan-Zollinger:add-argentina-zipcodes
Nov 24, 2024
Merged

Add argentina zipcodes#1453
bodiam merged 2 commits into
datafaker-net:mainfrom
Jonathan-Zollinger:add-argentina-zipcodes

Conversation

@Jonathan-Zollinger

@Jonathan-Zollinger Jonathan-Zollinger commented Nov 24, 2024

Copy link
Copy Markdown
Contributor

Overview

replaces the current 4-digit generator with an exhaustive list of argentine zip codes. I also noted that es-AR wasn't included in the list of locales in the README, so I added it there.

Points to consider

Argentine zip codes preface 4 digits with an iso code as a single letter (ie A####). This PR includes the appropriate iso code with the zip code such that each zip code provided is an actual zip code used in argentina. These can be found at https://postalcodes.azinfoportal.com/argentina/

Test coverage

I added a new test which iterates through all 4025 new zip codes and validates that they're all formatted with an expected letter followed by 4 digits. I'm not sure how much more to test than that.

calling ./mvnw clean install from root runs w/ no errors.

@what-the-diff

what-the-diff Bot commented Nov 24, 2024

Copy link
Copy Markdown

PR Summary

  • Updated Documentation
    • The README.md file has been modified to include support for Argentine language settings. This means that the project can now run seamlessly for users interacting with the system in that language.
  • Improvements in test coverage
    • The changes in 'AddressTest.java' involve a new method that helps test Argentine zip codes more effectively, ensuring correct format for these codes. This implies more comprehensive test coverage, enhancing the reliability of the system for Argentine users.

@@ -8,7 +8,30 @@ es-AR:
street_suffix: [Avenida, Avda., Camino, Pasaje, Paseo]
secondary_address: ['Esc. #', 'Puerta blanca', 'Porton verde', 'Reja negra', 'Pasillo al fondo', 'frente', 'piso #, depto. A']
# Though these are US-specific, they are here (in the default locale) for backwards compatibility

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not related to this PR perhaps, but is this comment still relevant? If so, I don't get it :)

@bodiam

bodiam commented Nov 24, 2024

Copy link
Copy Markdown
Contributor

Thanks @Jonathan-Zollinger , PR looks great, happy to merge it once the build is done.

@codecov-commenter

codecov-commenter commented Nov 24, 2024

Copy link
Copy Markdown

⚠️ 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 92.30%. Comparing base (2bea30f) to head (9092bcc).
⚠️ Report is 438 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    #1453      +/-   ##
============================================
- Coverage     92.31%   92.30%   -0.02%     
  Complexity     3199     3199              
============================================
  Files           323      323              
  Lines          6274     6274              
  Branches        595      595              
============================================
- Hits           5792     5791       -1     
- Misses          339      340       +1     
  Partials        143      143              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bodiam
bodiam merged commit d947d8b into datafaker-net:main Nov 24, 2024

@asolntsev asolntsev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@Jonathan-Zollinger @bodiam Things like postcode: should be located in file _AR.yml, not es_AR.yml. Postcodes are country-specific and don't depend on language.

In other words, postcodes would be the same for new Locale("es", "AR") and new Locale("en", "AR").

@Jonathan-Zollinger

Copy link
Copy Markdown
Contributor Author

that makes sense. I can move those changes and update the tests

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