-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
119 lines (80 loc) · 6.01 KB
/
makefile
File metadata and controls
119 lines (80 loc) · 6.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
url_eti_14_0 = https://www.eurex.com/resource/blob/4629436/aa33fd54021ac40840ea7c7646a870f2/data/T7_R.14.0_Enhanced_Trading_Interface_-_XSD_XML_representation_and_layouts_Version_2.zip
url_eti_13_1 = https://www.eurex.com/resource/blob/4332324/7c358b1edeef76eeb3b758c437d9c955/data/T7_R.13.1_Enhanced_Trading_Interface_-_XSD_XML_representation_and_layouts_Version_2.zip
url_eti_13_0 = https://www.eurex.com/resource/blob/4118928/c8f379034ccd346c69b8725d8834dd47/data/T7_R.13.0_Enhanced_Trading_Interface_-_XSD_XML_representation_and_layouts_Version_3.zip
url_eti_12_1 = https://www.eurex.com/resource/blob/3881084/3d853bcf0f155d740763b99e9b95088e/data/T7_R.12.1_Enhanced_Trading_Interface_-_XSD_XML_representation_and_layouts_Version_2.zip
url_eti_12_0 = https://www.eurex.com/resource/blob/3729666/8a182dd5e082a578c970684919b110b2/data/T7_R.12.0_Enhanced_Trading_Interface_-_XSD_XML_representation_and_layouts_Version_3.zip
url_eti_11_1 = https://www.eurex.com/resource/blob/3470960/8f0c20e941ce88ff0bd17e8b0f0f05dc/data/T7_R.11.1_Enhanced_Trading_Interface_-_XSD_XML_representation_and_layouts_v.1.1.zip
url_eti_11_0 = https://www.eurex.com/resource/blob/3312766/b0432bd1900c4e9926dffe261fd11e61/data/T7_R.11.0_Enhanced_Trading_Interface_-_XSD_XML_representation_and_layouts_v.1.2.zip
url_eti_10_1 = https://www.eurex.com/resource/blob/3116352/44bc86eee29639a491664d3b71cd34fc/data/T7_R.10.1_Enhanced_Trading_Interface_-_XSD_XML_representation_and_layouts_v.1.2.zip
url_eti_10_0 = https://www.eurex.com/resource/blob/2827374/da41cfed961c5635fd438d848af30a43/data/T7_R.10.0_Enhanced_Trading_Interface_-_XSD_XML_representation_and_layouts_v.1.2.zip
url_eti_9_1 = https://www.eurex.com/resource/blob/2609690/62b03a26ce2075635b329e6c688d69b9/data/T7_R.9.1_Enhanced_Trading_Interface_-_XSD_XML_representation_and_layouts_v.1.1.zip
url_eti_9_0 = https://www.xetra.com/resource/blob/2339516/fb5884fb098c442a4bf7cc8c57912ca7/data/T7_R.9.0_Enhanced_Trading_Interface_-_XSD_XML_representation_and_layouts_v.1.2.zip
url_eti_8_1 = https://www.eurex.com/resource/blob/1896940/e00bfe40dc3ceed5e99e3bfd9a47af54/data/T7_R.8.1_Enhanced_Trading_Interface_-_XSD_XML_representation_and_layouts_v.1.2.zip
url_eti_8_0 = https://www.eurex.com/resource/blob/1614576/6734877da8532f0e3859c8681c42f5e9/data/T7_Enhanced_Trading_Interface_-_XSD_XML_representation_and_layouts.zip
url_eobi_14_0 = https://www.eurex.com/resource/blob/4629412/aedab4fce554559ee2a3d4b7a49614fc/data/T7_R.14.0_%20EOBI_XML_Representation_Version_2.zip
url_eobi_13_1 = https://www.eurex.com/resource/blob/4332346/4b66e684ab3cf9e2cee92ca534cd1a68/data/T7_R.13.1_%20EOBI_XML_Representation_Version_2.zip
url_eobi_13_0 = https://www.eurex.com/resource/blob/4095430/f6c09c60b2eff0b508aca1e5860b0731/data/T7_R.13.0_%20EOBI_XML_Representation_Version_2.zip
url_eobi_12_1 = https://www.eurex.com/resource/blob/3935338/8bc01e6f7fa63ab0de2a3b3225f483bd/data/T7_R.12.1_%20EOBI_XML_Representation_Version_2.zip
url_eobi_12_0 = https://www.eurex.com/resource/blob/3730038/f1ed789ebed767513962c11073290a53/data/T7_R.12.0_%20EOBI_XML_Representation_Version_3.zip
url_eobi_11_1 = https://www.eurex.com/resource/blob/3432972/4eab41740c005188a4de6a94c132df04/data/T7_EOBI_XML_Representation_v.11.1.0.zip
url_eobi_11_0 = https://www.eurex.com/resource/blob/3312796/8a105318a6a80f40b168a9c10bcba26a/data/T7_EOBI_XML_Representation_v.11.0.2.zip
url_eobi_10_1 = https://www.eurex.com/resource/blob/3093156/a85addae564114a5e0a7abaec9b17189/data/T7_EOBI_XML_Representation_v.10.1.1.zip
url_eobi_10_0 = https://www.eurex.com/resource/blob/2827418/d9c79556c0aea9bfc9db8b7ef262fe4b/data/T7_EOBI_XML_Representation_v.10.0.1.zip
url_eobi_9_1 = https://www.eurex.com/resource/blob/2612882/6e784f79cac7928d39d7dbcf831cc14e/data/T7_EOBI_XML_Representation_v.9.1.1.zip
url_eobi_9_0 = https://www.xetra.com/resource/blob/2221290/00792edace1aaa799a42c67a7638efbf/data/T7_EOBI_XML_Representation_v.9.0.1.zip
url_eobi_8_1 = https://www.eurex.com/resource/blob/2128192/2209fe1a6f0a78a27baf6411698690b0/data/T7_EOBI_XML_Representation_v.8.1.1.zip
url_eobi_8_0 = https://www.eurex.com/resource/blob/1741872/baeb2d87c8cc518f2ff2738a74356548/data/T7_EOBI_XML_Representation_v.8.0.3.zip
eti_versions = 14_0 13_1 13_0 12_1 12_0 11_1 11_0 10_1 10_0 9_1 9_0 8_1 8_0
eobi_versions = 14_0 13_1 13_0 12_1 12_0 11_1 11_0 10_1 10_0 9_1 9_0 8_1 8_0
all: all-eti
define download_template =
work/T7_$(1)_$(3).zip:
mkdir -p work
curl -o $$@ $$(url_$(2)_$(3))
endef
$(foreach p,$(eti_versions),$(eval $(call download_template,ETI,eti,$(p))))
$(foreach p,$(eobi_versions),$(eval $(call download_template,EOBI,eobi,$(p))))
.PHONY: download
download: $(foreach p,$(eti_versions),work/T7_ETI_$(p).zip) $(foreach p,$(eti_versions),work/T7_EOBI_$(p).zip)
.PHONY: all-eti
all-eti: $(foreach p,$(eti_versions),eti/v$(p).py)
.PHONY: all-xti
all-xti: $(foreach p,$(eti_versions),xti/v$(p).py)
.PHONY: all-eobi
all-eobi: $(foreach p,$(eti_versions),eobi/v$(p).py)
define ETI_template =
temp/T7_ETI_$(1)/eti_Derivatives.xml temp/T7_ETI_$(1)/eti_Cash.xml: work/T7_ETI_$(1).zip
mkdir -p temp/$$(eti_$(1))
unzip -DD -o work/T7_ETI_$(1).zip -d temp/T7_ETI_$(1)
TEMP += temp/T7_ETI_$(1)
eti/v$(1).py: temp/T7_ETI_$(1)/eti_Derivatives.xml eti2py.py
mkdir -p eti
./eti2py.py $$^ > $$@
TEMP += eti/v$(1).py
xti/v$(1).py: temp/T7_ETI_$(1)/eti_Cash.xml eti2py.py
mkdir -p xti
./eti2py.py $$^ > $$@
TEMP += xti/v$(1).py
endef
$(foreach p,$(eti_versions),$(eval $(call ETI_template,$(p))))
define EOBI_template =
temp/T7_EOBI_$(1)/eobi.xml: work/T7_EOBI_$(1).zip
mkdir -p temp/T7_EOBI_$(1)
unzip -DD -o work/T7_EOBI_$(1).zip -d temp/T7_EOBI_$(1)
if [ -f temp/T7_EOBI_$(1)/eobi/eobi.xml ]; then mv temp/T7_EOBI_$(1)/eobi/eobi.xml temp/T7_EOBI_$(1)/eobi.xml; fi
TEMP += temp/T7_EOBI_$(1)
eobi/v$(1).py: temp/T7_EOBI_$(1)/eobi.xml eti2py.py
mkdir -p eobi
./eti2py.py $$^ > $$@
TEMP += eobi/v$(1).py
endef
$(foreach p,$(eobi_versions),$(eval $(call EOBI_template,$(p))))
.PHONY: check
check: eti/v9_0.py
python3 -m pytest test_eti.py -v
.PHONY: bench
bench: eti/v9_0.py
python3 -m pytest bench_eti.py
.PHONY: clean
clean:
rm -rf $(TEMP)