Skip to content

Commit

Permalink
Temporary dump
Browse files Browse the repository at this point in the history
  • Loading branch information
consideRatio committed Jan 6, 2025
1 parent fa88dd5 commit 1513212
Show file tree
Hide file tree
Showing 13 changed files with 1,407 additions and 6 deletions.
29 changes: 23 additions & 6 deletions parsers/CO.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ def fetch_production(
acquired_datetime = datetime.combine(date, datetime.min.time()).replace(
tzinfo=ZONE_INFO
)
with open("prod1_live.json", "w") as f:
f.write(df_recursos.to_json())
with open("prod2_live.json", "w") as f:
f.write(df_generation.to_json())
break
if not acquired_datetime:
raise ParserException(
Expand Down Expand Up @@ -255,11 +259,24 @@ def fetch_price(


if __name__ == "__main__":
print("fetch_consumption() ->")
print(fetch_consumption())
dt = datetime.fromisoformat("2025-01-01T00:00:00-05:00")

print("fetch_production() ->")
print(fetch_production())
# print("fetch_production(date..) ->")
# print(fetch_production(target_datetime=dt))

print("fetch_price() ->")
print(fetch_price())
# FIXME: get consumption and price for a given date to work, because now we
# get too many dates and fail to parse it
print("fetch_price(date..) ->")
print(fetch_price(target_datetime=dt))

print("fetch_consumption(date..) ->")
print(fetch_consumption(target_datetime=dt))

# print("fetch_consumption() ->")
# print(fetch_consumption())

# print("fetch_production() ->")
# print(fetch_production())

# print("fetch_price() ->")
# print(fetch_price())
Loading

0 comments on commit 1513212

Please sign in to comment.