Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pydantic types on dummy actuals #18

Merged
merged 1 commit into from
Feb 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/india_api/internal/inputs/dummydb/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,37 +67,37 @@ def get_predicted_wind_yields_for_location(

return values

def get_actual_solar_yields_for_location(self, location: str) -> list[internal.PredictedPower]:
def get_actual_solar_yields_for_location(self, location: str) -> list[internal.ActualPower]:
"""Gets the actual solar yields for a location."""
# Get the window
start, end = get_window()
numSteps = int((end - start) / step)
values: list[internal.PredictedPower] = []
values: list[internal.ActualPower] = []

for i in range(numSteps):
time = start + i * step
_yield = _basicSolarYieldFunc(int(time.timestamp()))
values.append(
internal.PredictedPower(
internal.ActualPower(
Time=time,
PowerKW=int(_yield.YieldKW),
),
)

return values

def get_actual_wind_yields_for_location(self, location: str) -> list[internal.PredictedPower]:
def get_actual_wind_yields_for_location(self, location: str) -> list[internal.ActualPower]:
"""Gets the actual wind yields for a location."""
# Get the window
start, end = get_window()
numSteps = int((end - start) / step)
values: list[internal.PredictedPower] = []
values: list[internal.ActualPower] = []

for i in range(numSteps):
time = start + i * step
_yield = _basicWindYieldFunc(int(time.timestamp()))
values.append(
internal.PredictedPower(
internal.ActualPower(
Time=time,
PowerKW=int(_yield.YieldKW),
),
Expand Down
Loading