Skip to content

Commit

Permalink
re-remove code pieces
Browse files Browse the repository at this point in the history
  • Loading branch information
Mausy5043 committed Nov 19, 2024
1 parent 416dfe6 commit cc548bf
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions bin/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,8 @@ def fetch_data_mains(hours_to_fetch=48, aggregation="H") -> pd.DataFrame:
if DEBUG:
print("\n*** fetching MAINS data ***")

mod_start: str = ""
# aggregations = "HDMA"
# mods = ["hour", "day", "month", "year"]
# mod_start = f", 'start of {mods[aggregations.index(aggregation)]}'"

where_condition: str = (
f" (sample_time >= datetime({EDATETIME}, '-{hours_to_fetch + 1} hours'{mod_start}))"
f" (sample_time >= datetime({EDATETIME}, '-{hours_to_fetch + 1} hours'))"
)
group_condition: str = ""
if aggregation == "H":
Expand Down Expand Up @@ -192,8 +187,8 @@ def fetch_data_production(hours_to_fetch=48, aggregation="H") -> pd.DataFrame:
print("\n*** fetching PRODUCTION data ***")

where_condition: str = (
f" (sample_time >= datetime({EDATETIME}, '-{hours_to_fetch + 1} hours'{mod_start}))"
f" AND sample_time <= datetime({EDATETIME}, '+2 hours') )"
f" (sample_time >= datetime({EDATETIME}, '-{hours_to_fetch + 1} hours'))"
f" AND (sample_time <= datetime({EDATETIME}, '+2 hours') )"
)
s3_query: str = (
f"SELECT * " # nosec B608
Expand Down

0 comments on commit cc548bf

Please sign in to comment.