From 7ebfb3273ea8f58e297e88c5e2117bfe679cb4f9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 22 Dec 2023 15:10:29 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pvconsumer/app.py | 9 +++++---- pvconsumer/pv_systems.py | 9 ++++----- pvconsumer/save.py | 3 --- pvconsumer/utils.py | 3 +-- 4 files changed, 10 insertions(+), 14 deletions(-) diff --git a/pvconsumer/app.py b/pvconsumer/app.py index f8f058c..423932c 100644 --- a/pvconsumer/app.py +++ b/pvconsumer/app.py @@ -13,15 +13,16 @@ import click import pandas as pd +from pvoutput import PVOutput +from pvsite_datamodel.connection import DatabaseConnection +from pvsite_datamodel.sqlmodels import SiteSQL +from sqlalchemy.orm import Session + import pvconsumer from pvconsumer.pv_systems import filter_pv_systems_which_have_new_data, get_pv_systems from pvconsumer.save import save_to_pv_site_database from pvconsumer.solar_sheffield_passiv import get_all_latest_pv_yield_from_solar_sheffield from pvconsumer.utils import format_pv_data -from pvoutput import PVOutput -from pvsite_datamodel.connection import DatabaseConnection -from pvsite_datamodel.sqlmodels import SiteSQL -from sqlalchemy.orm import Session logging.basicConfig( level=getattr(logging, os.getenv("LOGLEVEL", "INFO")), diff --git a/pvconsumer/pv_systems.py b/pvconsumer/pv_systems.py index 66b7e68..35b8372 100644 --- a/pvconsumer/pv_systems.py +++ b/pvconsumer/pv_systems.py @@ -5,16 +5,15 @@ from typing import List, Optional import pandas as pd -from pvconsumer.utils import pv_output, solar_sheffield_passiv from pvoutput import PVOutput -from sqlalchemy.orm import Session -from sqlalchemy import func - -from pvsite_datamodel.sqlmodels import SiteSQL, GenerationSQL from pvsite_datamodel.read import get_all_sites +from pvsite_datamodel.sqlmodels import GenerationSQL, SiteSQL +from sqlalchemy import func +from sqlalchemy.orm import Session import pvconsumer from pvconsumer.solar_sheffield_passiv import get_all_systems_from_solar_sheffield +from pvconsumer.utils import pv_output, solar_sheffield_passiv # from pvconsumer.utils import df_to_list_pv_system, list_pv_system_to_df diff --git a/pvconsumer/save.py b/pvconsumer/save.py index 0ba567d..8137c57 100644 --- a/pvconsumer/save.py +++ b/pvconsumer/save.py @@ -1,12 +1,9 @@ """ Save to database functions""" import logging -from typing import List import pandas as pd # from nowcasting_datamodel.models import PVSystem, PVYield -from pvsite_datamodel.read.site import get_site_by_client_site_id -from pvsite_datamodel.sqlmodels import SiteSQL from pvsite_datamodel.write.generation import insert_generation_values from sqlalchemy.orm import Session diff --git a/pvconsumer/utils.py b/pvconsumer/utils.py index 8cd0da5..9ac6e43 100644 --- a/pvconsumer/utils.py +++ b/pvconsumer/utils.py @@ -3,10 +3,9 @@ from datetime import timezone import pandas as pd +from pvsite_datamodel.sqlmodels import GenerationSQL, SiteSQL from sqlalchemy.orm import Session -from pvsite_datamodel.sqlmodels import SiteSQL, GenerationSQL - # logger = logging.getLogger(__name__)