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

Fetch currency codes from datahub #607

Merged
merged 10 commits into from
Nov 2, 2017
Merged

Fetch currency codes from datahub #607

merged 10 commits into from
Nov 2, 2017

Conversation

Bjwebb
Copy link
Contributor

@Bjwebb Bjwebb commented Oct 24, 2017

closes #554

Remaining TODOs:

  • Update the enum in the release schema

@Bjwebb
Copy link
Contributor Author

Bjwebb commented Oct 24, 2017

This pull request adds withdrawn codes to the codelist.

Some active codes are renamed slightly.

The following codes have been withdrawn:

BYR,Belarussian Ruble,
EEK,Kroon,
LTL,Lithuanian Litas,
LVL,Latvian Lats,
USS,US Dollar (Same day),
ZMK,Zambian Kwacha,

The following new active codes have been added:

BYN,Belarusian Ruble,
CHE,WIR Euro,
CHW,WIR Franc,
XAG,Silver,
XAU,Gold,
XBA,Bond Markets Unit European Composite Unit (EURCO),
XBB,Bond Markets Unit European Monetary Unit (E.M.U.-6),
XBC,Bond Markets Unit European Unit of Account 9 (E.U.A.-9),
XBD,Bond Markets Unit European Unit of Account 17 (E.U.A.-17),
XPD,Palladium,
XPT,Platinum,
XSU,Sucre,
XTS,Codes specifically reserved for testing purposes,
XUA,ADB Unit of Account,
XXX,The codes assigned for transactions where no currency is involved,
ZMW,Zambian Kwacha,

There is currently one removal - XBT (Bitcoin) - as this is not in the upstream codelist.

@timgdavies
Copy link
Contributor

We discussed earlier that this needs a patch version update to be merged.

We will look for any other issues in need of patch updates, and try and roll those things together over the next week - and alert the community list in case anyone happens to be relying on XBT etc.

@Bjwebb
Copy link
Contributor Author

Bjwebb commented Oct 24, 2017

Some context on XBT: We think we should be able to remove this as a bugfix, as it's not in ISO4217, so therefore erroneously on our list. Our codelist docs say:

The currency for each amount should always be specified using the uppercase 3-letter currency code from ISO4217.

@jpmckinney
Copy link
Member

I made a few edits directly.

  1. Primarily, I pull directly from ISO. OK's project has no assurance of being maintained, and pulling from ISO is simple. (OK's project was already out-of-date.)
  2. Use ISO8601 for validity dates.
  3. Use CRLF line endings like our other CSV files.
  4. Use 'Valid Until' instead of 'Withdrawal Date'. I'm not picky about this one, but I figure 'Valid Until' may be a reusable column header in future CSVs as it is more generic, whereas 'Withdrawal Date' implies an actor actively withdrawing a code, which may be less generic.

@jpmckinney
Copy link
Member

jpmckinney commented Oct 24, 2017

Note that we lost another code: CNX,Peoples Bank Dollar,1989-12 (Actually, it's only lost between the commits in this PR. CNX wasn't in the old codelist.)

The explanation is in amendment 163 (docx): "The People’s Bank of China confirmed that the currency “Peoples Bank Dollar” (CNX) never existed in China (amendment no. 27)."

@jpmckinney
Copy link
Member

jpmckinney commented Oct 24, 2017

ISO4217 is updated at least once a year. Here are amendment dates in the last decade:

  • 2017-06-09
  • 2016-02-24
  • 2015-12-18
  • 2015-06-19
  • 2014-08-15
  • 2014-03-28
  • 2013-11-05
  • 2013-07-23
  • 2013-04-11
  • 2012-08-31
  • 2012-01-12
  • 2011-08-31
  • 2011-04-07
  • 2010-12-30
  • 2010-09-10
  • 2010-08-17
  • 2010-04-08
  • 2009-05-01
  • 2009-03-20
  • 2009-02-06
  • 2009-01-08
  • 2008-10-27
  • 2008-07-31

There may be implications for the version upgrade schedule (TBD) of the standard.

Copy link
Member

@jpmckinney jpmckinney left a comment

Choose a reason for hiding this comment

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

Should we run this script in build_docs.sh?

@Bjwebb
Copy link
Contributor Author

Bjwebb commented Oct 25, 2017

No, because that makes the build less reproducible.
We don't include other scripts that make changes that need to be committed, e.g. make_validation_schema.py

@jpmckinney
Copy link
Member

👍 In that case, I'll create an issue to add this step to the handbook.

Copy link
Member

@jpmckinney jpmckinney left a comment

Choose a reason for hiding this comment

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

Approving, but I forget the implications of merging a change to the schema in terms of governance, so I'll let @timgdavies merge.

@jpmckinney
Copy link
Member

Also, I don't know at what point we update the changelog, but we could have something like:

#554 Update currency codelist for ISO4217 amendment 163 (2017-06-09). Note: XBT (Bitcoin) is removed from the codelist as it is not part of ISO4217.

Now that I think of it – is it more appropriate to deprecate XBT from a governance perspective? I don't think anyone was using it, though.

@timgdavies
Copy link
Contributor

I've added the changelog to this branch, based on this change as giving us 1.1.2 and ready to merge into 1.1-dev.

@timgdavies timgdavies merged commit 0ecfce8 into 1.1-dev Nov 2, 2017
@timgdavies timgdavies deleted the 554-currency-script branch November 2, 2017 19:31
@jpmckinney jpmckinney added this to the Minor: Build changes milestone Aug 26, 2021
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.

currency: Incorrect code for Zambian currency
3 participants