Skip to content

Commit 5282a55

Browse files
committed
delete unused code
1 parent ecdeed8 commit 5282a55

File tree

1 file changed

+2
-19
lines changed

1 file changed

+2
-19
lines changed

ust.py

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
import pandas as pd
88
import requests
99

10+
__all__ = ["save_xml", "read_rates", "available_years"]
11+
1012
BC_KEYS = [
1113
"BC_1MONTH",
1214
"BC_3MONTH",
@@ -72,30 +74,16 @@ def filepath(year: int, folder=None):
7274
return os.path.join(folder, filename)
7375

7476

75-
def read_local_xml(year):
76-
return read(path=filepath(year))
77-
78-
7977
def read(path):
8078
with open(path, "r") as f:
8179
return f.read()
8280

8381

84-
def save_local_xml(year: int, content: str):
85-
path = filepath(year)
86-
save(path, content)
87-
88-
8982
def save(path: str, content: str):
9083
with open(path, "w") as f:
9184
f.write(content)
9285

9386

94-
def save_year(year: int):
95-
content = get_xml_content_from_web(year)
96-
save_local_xml(year, content)
97-
98-
9987
def rates(year):
10088
"""Return Rates(year) for default location."""
10189
return Rates(year, default_folder())
@@ -161,11 +149,6 @@ def elem(datum, key):
161149
return 0
162150

163151

164-
def save_datapoints_from_web(year):
165-
xml_content = get_xml_content_from_web(year)
166-
save_local_xml(year, xml_content)
167-
168-
169152
def to_dataframe(gen):
170153
df = pd.DataFrame(gen)[DF_COLUMNS]
171154
df["date"] = pd.to_datetime(df["date"])

0 commit comments

Comments
 (0)