Rename ISO 4217 data files to match SIX Group's new naming.
This commit is contained in:
parent
a54da85a6f
commit
765e2ec77d
4 changed files with 10 additions and 10 deletions
8
Makefile
8
Makefile
|
@ -42,7 +42,7 @@ tox: ## Run tests via tox
|
|||
|
||||
.PHONY: fetch-iso-data
|
||||
fetch-iso-data: ## Fetch the latest copy of the ISO 4217 currency data
|
||||
wget -O src/pricehist/resources/list_one.xml \
|
||||
https://www.six-group.com/dam/download/financial-information/data-center/iso-currrency/lists/list_one.xml
|
||||
wget -O src/pricehist/resources/list_three.xml \
|
||||
https://www.six-group.com/dam/download/financial-information/data-center/iso-currrency/lists/list_three.xml
|
||||
wget -O src/pricehist/resources/list-one.xml \
|
||||
https://www.six-group.com/dam/download/financial-information/data-center/iso-currrency/lists/list-one.xml
|
||||
wget -O src/pricehist/resources/list-three.xml \
|
||||
https://www.six-group.com/dam/download/financial-information/data-center/iso-currrency/lists/list-three.xml
|
||||
|
|
|
@ -8,8 +8,8 @@ currencies are included and countries with no universal currency are ignored.
|
|||
The data is read from vendored copies of the XML files published by the
|
||||
maintainers of the standard:
|
||||
|
||||
* :file:`list_one.xml` (current currencies & funds)
|
||||
* :file:`list_three.xml` (historical currencies & funds)
|
||||
* :file:`list-one.xml` (current currencies & funds)
|
||||
* :file:`list-three.xml` (historical currencies & funds)
|
||||
|
||||
Classes:
|
||||
|
||||
|
@ -43,20 +43,20 @@ class ISOCurrency:
|
|||
|
||||
|
||||
def current_data_date():
|
||||
one = etree.fromstring(read_binary("pricehist.resources", "list_one.xml"))
|
||||
one = etree.fromstring(read_binary("pricehist.resources", "list-one.xml"))
|
||||
return one.cssselect("ISO_4217")[0].attrib["Pblshd"]
|
||||
|
||||
|
||||
def historical_data_date():
|
||||
three = etree.fromstring(read_binary("pricehist.resources", "list_three.xml"))
|
||||
three = etree.fromstring(read_binary("pricehist.resources", "list-three.xml"))
|
||||
return three.cssselect("ISO_4217")[0].attrib["Pblshd"]
|
||||
|
||||
|
||||
def by_code():
|
||||
result = {}
|
||||
|
||||
one = etree.fromstring(read_binary("pricehist.resources", "list_one.xml"))
|
||||
three = etree.fromstring(read_binary("pricehist.resources", "list_three.xml"))
|
||||
one = etree.fromstring(read_binary("pricehist.resources", "list-one.xml"))
|
||||
three = etree.fromstring(read_binary("pricehist.resources", "list-three.xml"))
|
||||
|
||||
for entry in three.cssselect("HstrcCcyNtry") + one.cssselect("CcyNtry"):
|
||||
if currency := _parse(entry):
|
||||
|
|
Loading…
Add table
Reference in a new issue