Skip to content

Commit

Permalink
format with black
Browse files Browse the repository at this point in the history
  • Loading branch information
EdFage committed Dec 7, 2023
1 parent e89d2b9 commit e10643b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()}")
Expand Down
17 changes: 12 additions & 5 deletions quartz_solar_forecast/pydantic_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)

0 comments on commit e10643b

Please sign in to comment.