Skip to content

hotfix in df #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 17, 2025
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