Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion codegreen_core/data/offline.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def _sync_offline_file(country):
print("Files do not exist. Gathering new data.")
try:
data = _gather_energy_data(country, start_time, end_time)
if data :
if not data.empty :
data.to_csv(csv_file_path, index=False)
first_start_time1 = data.iloc[0]["startTime"]
last_start_time1 = data.iloc[-1]["startTime"]
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "codegreen_core"
version = "0.0.7"
version = "0.0.8"
description = "This package helps you become aware of the carbon footprint of your computation"
authors = ["Anne Hartebrodt <anne.hartebrodt@fau.de>","Shubh Vardhan Jain <shubh.v.jain@fau.de>"]
readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion tests/test_entsoe.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def test_actual_invalid_date_range3(self):


def test_forecast_time_interval_60(self):
data = get_forecast_percent_renewable("DE",datetime.now()-timedelta(hours=2),datetime.now()+timedelta(hours=5))
data = get_forecast_percent_renewable("FR",datetime.now()-timedelta(hours=2),datetime.now()+timedelta(hours=5))
assert data["time_interval"] == 60 and data["data_available"] == True


Expand Down