|
4 | 4 | import logging |
5 | 5 | import warnings |
6 | 6 | from datetime import datetime, timedelta |
7 | | -from typing import ClassVar, Literal |
| 7 | +from typing import ClassVar, Literal |
8 | 8 |
|
9 | 9 | import numpy as np |
10 | 10 | import pandas as pd |
@@ -70,24 +70,30 @@ class DispatchModel(IOMixin): |
70 | 70 | "pl_re_plant_specs", |
71 | 71 | "pl_storage_specs", |
72 | 72 | ) |
73 | | - id_schema = { |
| 73 | + id_schema: ClassVar[dict] = { |
74 | 74 | "plant_id_eia": pl.Int32, |
75 | 75 | "generator_id": pl.Utf8, |
76 | 76 | "datetime": pl.Datetime("us"), |
77 | 77 | } |
78 | | - es_schema = { |
| 78 | + es_schema: ClassVar[dict] = { |
79 | 79 | "charge": pl.Float32, |
80 | 80 | "discharge": pl.Float32, |
81 | 81 | "soc": pl.Float32, |
82 | 82 | "gridcharge": pl.Float32, |
83 | 83 | } |
84 | | - sys_schema = { |
| 84 | + sys_schema: ClassVar[dict] = { |
85 | 85 | "deficit": pl.Float32, |
86 | 86 | "dirty_charge": pl.Float32, |
87 | 87 | "curtailment": pl.Float32, |
88 | 88 | "load_adjustment": pl.Float32, |
89 | 89 | } |
90 | | - pl_freq = {"YS": "1y", "AS": "1y", "MS": "1mo", "D": "1d", "H": "1h"} |
| 90 | + pl_freq: ClassVar[dict] = { |
| 91 | + "YS": "1y", |
| 92 | + "AS": "1y", |
| 93 | + "MS": "1mo", |
| 94 | + "D": "1d", |
| 95 | + "H": "1h", |
| 96 | + } |
91 | 97 | default_config: ClassVar[dict[str, str]] = {"dynamic_reserve_coeff": "auto"} |
92 | 98 |
|
93 | 99 | def __init__( |
@@ -408,7 +414,9 @@ def __init__( |
408 | 414 |
|
409 | 415 | Generate a full, combined output of all resources at specified frequency. |
410 | 416 |
|
411 | | - >>> dm.full_output(freq="YS").collect().to_pandas() # doctest: +NORMALIZE_WHITESPACE |
| 417 | + >>> dm.full_output( |
| 418 | + ... freq="YS" |
| 419 | + ... ).collect().to_pandas() # doctest: +NORMALIZE_WHITESPACE |
412 | 420 | plant_id_eia generator_id capacity_mw ... duration_hrs roundtrip_eff reserve |
413 | 421 | 0 0 curtailment NaN ... NaN NaN NaN |
414 | 422 | 1 0 deficit NaN ... NaN NaN NaN |
|
0 commit comments