From e10643b1098437cf50fdb2a2144cf473d258ffc4 Mon Sep 17 00:00:00 2001 From: EdFage <87755165+EdFage@users.noreply.github.com> Date: Thu, 7 Dec 2023 14:27:28 +0000 Subject: [PATCH] format with black --- examples/example.py | 2 +- quartz_solar_forecast/pydantic_models.py | 17 ++++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/examples/example.py b/examples/example.py index 9a2a23ff..d52fe0fb 100644 --- a/examples/example.py +++ b/examples/example.py @@ -8,7 +8,7 @@ def main(): site = PVSite(latitude=51.75, longitude=-1.25, capacity_kwp=1.25) # run model - predictions_df = run_forecast(site=site, ts='2023-10-30') + predictions_df = run_forecast(site=site, ts="2023-10-30") print(predictions_df) print(f"Max: {predictions_df['power_wh'].max()}") diff --git a/quartz_solar_forecast/pydantic_models.py b/quartz_solar_forecast/pydantic_models.py index 919f90eb..4e626bfb 100644 --- a/quartz_solar_forecast/pydantic_models.py +++ b/quartz_solar_forecast/pydantic_models.py @@ -2,11 +2,18 @@ class PVSite(BaseModel): - latitude: float = Field(..., description="the latitude of the site", ge=-90, le=90) longitude: float = Field(..., description="the longitude of the site", ge=-180, le=180) capacity_kwp: float = Field(..., description="the capacity [kwp] of the site", ge=0) - tilt: float = Field(default=35, description="the tilt of the site [degrees], the panels' angle relative to horizontal ground", ge=0, le=90) - orientation: float = Field(default=180, description="the orientation of the site [degrees], the angle between north and the direction the panels face, measured on the horizontal plane." - , ge=0, le=360) - + tilt: float = Field( + default=35, + description="the tilt of the site [degrees], the panels' angle relative to horizontal ground", + ge=0, + le=90, + ) + orientation: float = Field( + default=180, + description="the orientation of the site [degrees], the angle between north and the direction the panels face, measured on the horizontal plane.", + ge=0, + le=360, + )