Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 11, 2023
1 parent 17cb1c7 commit 0ddbdc8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def get_forecasts_from_database(
include_national=False,
model_name="blend",
end_target_time=end_datetime_utc,
gsp_ids=gsp_ids
gsp_ids=gsp_ids,
)

logger.debug(f"Found {len(forecasts)} forecasts from database")
Expand Down Expand Up @@ -318,7 +318,7 @@ def get_truth_values_for_all_gsps_from_database(
start_datetime = get_start_datetime(start_datetime=start_datetime_utc)

if gsp_ids is None:
gsp_ids = list(range(1, N_GSP+1))
gsp_ids = list(range(1, N_GSP + 1))

locations = get_gsp_yield_by_location(
session=session,
Expand Down
6 changes: 3 additions & 3 deletions src/tests/test_gsp.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,7 @@ def test_read_truths_for_gsp_id_less_than_total(db_session, api_client):
_ = [GSPYield(**gsp_yield) for gsp_yield in r_json]



def setup_gsp_yield_data(db_session):

gsp_yield_1 = GSPYield(datetime_utc=datetime(2022, 1, 2), solar_generation_kw=1)
gsp_yield_1_sql = gsp_yield_1.to_orm()

Expand All @@ -301,7 +299,9 @@ def setup_gsp_yield_data(db_session):
gsp_yield_4_sql.location = gsp_sql_1

# add to database
db_session.add_all([gsp_yield_1_sql, gsp_yield_2_sql, gsp_yield_3_sql, gsp_yield_4_sql, gsp_sql_1, gsp_sql_2])
db_session.add_all(
[gsp_yield_1_sql, gsp_yield_2_sql, gsp_yield_3_sql, gsp_yield_4_sql, gsp_sql_1, gsp_sql_2]
)


@freeze_time("2022-01-01")
Expand Down

0 comments on commit 0ddbdc8

Please sign in to comment.