Comments (9)
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.
Sounds good. I will look into it.
from iso_currency.
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.
-
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.
-
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.
After digging a bit on crates.io, I'm not sure if this is a good idea anymore
- https://crates.io/crates/isocountry does not seems up to date either
- https://crates.io/crates/jurisdiction seems up to date (contains Eswatini at least which is pretty recent) but I'm not sure how much I trust this one on the long run: repository is not public, home page leads to a company frontpage ...
- https://crates.io/crates/iso3166-3 last updated 4 years ago
crates.io feels like a wasteland some times :/
from iso_currency.
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.
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.
This is the pull request: pzol/iso_country#8
from iso_currency.
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.
Forgot to update the documentation about using iso_country
so I released another version - 0.3.1.
from iso_currency.
Related Issues (14)
- Add data about centesimal symbols for every currency
- a more authoritative data source HOT 1
- Subunits fraction are not always correct HOT 2
- Missing currency: VES HOT 1
- Missing currency: SEL HOT 1
- Proposal: get Currency from Country HOT 7
- Add data about English representations of some currency symbols
- Proposal: get Country from Currency HOT 2
- Proposal: add option to customize casing for de-/serialization when using "with-serde" HOT 2
- Add data about position of symbol (according to locale) when formatting HOT 1
- Maybe add data about alternative variants of the symbols
- Add serde support feature HOT 2
- Maybe numeric currency codes should be strings HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iso_currency.