Code Monkey home page Code Monkey logo

Comments (6)

pimjansen avatar pimjansen commented on August 18, 2024 1

Alright, then I'll implement a change where

  1. postcode() returns a random existing postcode
  2. address() returns a valid postcode-city combination while keeping the format "{{streetAddress}}\n{{postcode}} {{city}}", so streetAdress will remain fake.

Cool?

Sounds good though its hard for me to decide where i have no clue how postalcodes in austria work.

But if you generate a valid postalcode city combination, the postalcode can also be valid from the same list right?

But we generate fake data. I do not really care much if a city name matches the postalcode where it is fake data. Meaning as long as the format is good im fine actually

from faker.

pimjansen avatar pimjansen commented on August 18, 2024

Imo a faker method should return valid data. If it is invalid it is useless to start with.

So if that means a lot of logic, then this is the case we have to deal with

from faker.

krsriq avatar krsriq commented on August 18, 2024

So this would then mean that you'd prefer a solution where

  1. postcode() returns a valid postcode
  2. address() returns a valid postcode-city combination?

To be 100% valid address() would of course also have to be a valid street-postcode-city combination, meaning a pretty extensive list of valid streets per city..

from faker.

pimjansen avatar pimjansen commented on August 18, 2024

So this would then mean that you'd prefer a solution where

  1. postcode() returns a valid postcode
  2. address() returns a valid postcode-city combination?

To be 100% valid address() would of course also have to be a valid street-postcode-city combination, meaning a pretty extensive list of valid streets per city..

Well we create fake data. This means that dummy names can be used there. However if we can build something that is more realistic it would always be good.

The most important thing imo is the format though

from faker.

krsriq avatar krsriq commented on August 18, 2024

Alright, then I'll implement a change where

  1. postcode() returns a random existing postcode
  2. address() returns a valid postcode-city combination while keeping the format "{{streetAddress}}\n{{postcode}} {{city}}", so streetAdress will remain fake.

Cool?

from faker.

krsriq avatar krsriq commented on August 18, 2024

Okay, than I'll just take the easier path and replace the existing randomly generated postcode with valid ones.

from faker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.