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

Add support for Argentina Zip Codes #783

Open
Jonathan-Zollinger opened this issue Nov 16, 2024 · 2 comments
Open

Add support for Argentina Zip Codes #783

Jonathan-Zollinger opened this issue Nov 16, 2024 · 2 comments

Comments

@Jonathan-Zollinger
Copy link

Is your feature request related to a problem? Please describe.
A program I'm wanting to test has been running into issues when using argentina zip codes

Describe the solution you'd like
fake data emulating argentine zip codes

Describe alternatives you've considered
generic letter followed by 4 random digits

Additional context
an overview of argentine zip codes is found here.

  • I've written up a stab at the es-ar.yml file in resources, but I've not added anything outside of states, abbreviations and zip codes.
  • addresses often include a final 3 characters in the postal code noting the position on the city block. I've not added that and dont fully comprehend it, nor am I wanting to implement it. I'll consider putting in the time if I'm unable to submit a PR without that data. I dont think it's critical though.
  • is the naming of the properties in the yaml file pretty strict? I've added zipcodes per their province, but I note that other yaml files only use the "postcode_by_state". I've used that to conform with other propery files, but I believe argentina refers to them as provinces.
  • What language / implementation is used with the yaml string interpolation? I'm trying to figure out how to write up the postal code format.

this is a snippet of the file as it stands. please let me know if you'd suggest I structure the data differently. I'm mostly concerned about figuring how to format the postal code to reference the proper state abbreviation as its source of zip code to use.

es-AR:
    faker:
        address:
            state: ["Buenos Aires", "Catamarca", ...]
            state_abbr: ["B", "K", "H", "U", "X", ...]
            postcode_by_state:
                # source: https://postalcodes.azinfoportal.com/argentina/
                A: ["4123", "4126", "3636", ... ]
                B: ["1704", "1706", "1708", ... ]
                D: ["5770", "5771", "5773", ... ]
                E: ["1647", "1649", "2000", ... ]
@Jonathan-Zollinger
Copy link
Author

you can see my current iteration here

@bodiam
Copy link

bodiam commented Nov 17, 2024

Hi @Jonathan-Zollinger , thanks for your contribution, but this project is dead. If you want, please send a PR to Datafaker, which is an active fork of this project, we welcome any PR!

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

No branches or pull requests

2 participants