Giter Site home page Giter Site logo

Comments (9)

zbrox avatar zbrox commented on July 27, 2024 1

Looking at it there's some data duplication so I'll try to refactor it to read csv data (which is easily downloaded from Wikipedia) and do some codegen on the necessary structures and enums. I will probably not have time to finish today since it's quite a full day. Looking at it this is probably also a better approach for iso_currency as well cause it will make updating the data or correcting it much easier.

from iso_currency.

zbrox avatar zbrox commented on July 27, 2024

Sounds good. I will look into it.

from iso_currency.

zbrox avatar zbrox commented on July 27, 2024

I created a feature branch with the initial replacement of strings with the Country enum from iso_countries. There are only a couple of issues so I'm a bit unsure how to continue.

  1. Some of the entities that were represented by strings are super national ones like say the International Monetary Fund. I guess those can be skipped, cause maybe for practical purposes they are not needed if they're not real places one can visit.

  2. The information in the iso_countries crate has not been updated in quite a while so some entities are either missing (e.g. Eswathini) or not updated to new names (e.g. North Macedonia).

from iso_currency.

IcanDivideBy0 avatar IcanDivideBy0 commented on July 27, 2024

After digging a bit on crates.io, I'm not sure if this is a good idea anymore

crates.io feels like a wasteland some times :/

from iso_currency.

IcanDivideBy0 avatar IcanDivideBy0 commented on July 27, 2024

Ok, I've sent a 1.0 release request to iso_country pzol/iso_country#7

from the feature/iso_countries branch:

  • I think countries that are not part of the ISO-3166 can be removed without major downsides for the quality of the curent crate, this includes:
    • International Monetary Fund
    • Unified System for Regional Compensation (SUCRE)
    • African Development Bank
  • even tho Swaziland was renamed Eswatini, the ISO code didn't changed and is still SZ SWZ, so this one can be used
  • from wikipedia Caribbean Netherlands should use the BQ BES code (Bonaire, Sint Eustatius and Saba)

With all that done, all problematic cases should be resolved. Any more thought on that?

from iso_currency.

zbrox avatar zbrox commented on July 27, 2024

Yeah, the author of iso_country has already merged my pull request for updating the data. But I did only the part which last night I could automate by scraping the wikipedia article. The data in lib.rs where the actual enum is still needs an update. If I have time today I can play a bit to try to automate that from the data.rs with a build script.

But yeah, if this is updated I can finish the remaining cases that are now breaking on the feature branch and release a 0.3.0.

from iso_currency.

zbrox avatar zbrox commented on July 27, 2024

This is the pull request: pzol/iso_country#8

from iso_currency.

zbrox avatar zbrox commented on July 27, 2024

The merging of the pull request doesn't change much about this crate. I've pushed the feature addressing this. Gonna release 0.3.0 in a second.

from iso_currency.

zbrox avatar zbrox commented on July 27, 2024

Forgot to update the documentation about using iso_country so I released another version - 0.3.1.

from iso_currency.

Related Issues (14)

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.