Skip to content

Commit 0e8b62a

Browse files
authored
[DEV-4267] Update Inverter control config names (#49)
* renamed Signed-off-by: vince <vince.white@zepben.com> * changelog Signed-off-by: vince <vince.white@zepben.com> --------- Signed-off-by: vince <vince.white@zepben.com>
1 parent 2297853 commit 0e8b62a

4 files changed

Lines changed: 11 additions & 10 deletions

File tree

changelog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# EAS Python client
22
## [0.25.0] - UNRELEASED
33
### Breaking Changes
4-
* None.
4+
* The `beforeCutOffProfile` and `afterCutOffProfile` fields in `PVVoltVARVoltWattConfig` have been renamed to snake case
5+
and are now `before_cut_off_profile` and `after_cut_off_profile` respectively.
56

67
### New Features
78
* None.

src/zepben/eas/client/eas_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,8 @@ def generator_config_to_json(self, generator_config: Optional[GeneratorConfig])
247247
"emergAmpScaling": generator_config.model.emerg_amp_scaling,
248248
"inverterControlConfig": generator_config.model.inverter_control_config and {
249249
"cutOffDate": generator_config.model.inverter_control_config.cut_off_date and generator_config.model.inverter_control_config.cut_off_date.isoformat(),
250-
"beforeCutOffProfile": generator_config.model.inverter_control_config.beforeCutOffProfile,
251-
"afterCutOffProfile": generator_config.model.inverter_control_config.afterCutOffProfile
250+
"beforeCutOffProfile": generator_config.model.inverter_control_config.before_cut_off_profile,
251+
"afterCutOffProfile": generator_config.model.inverter_control_config.after_cut_off_profile
252252
}
253253
},
254254
"solve": generator_config.solve and {

src/zepben/eas/client/work_package.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -214,14 +214,14 @@ class PVVoltVARVoltWattConfig:
214214
cut_off_date: Optional[datetime] = None
215215
"""Optional cut-off date to determine which profile to apply to equipment during translation to the OpenDss model.
216216
If supplied, the "commissionedDate" of the equipment is compared against this date, equipment that do not have a
217-
"commissionedDate" will receive the [beforeCutOffProfile]. If null, the [afterCutOffProfile] profile is applied to all equipment."""
217+
"commissionedDate" will receive the [before_cut_off_profile]. If null, the [after_cut_off_profile] profile is applied to all equipment."""
218218

219-
beforeCutOffProfile: Optional[str] = None
220-
"""Optional name of the profile to apply to equipment with a "commissionDate" before [cutOffDate].
219+
before_cut_off_profile: Optional[str] = None
220+
"""Optional name of the profile to apply to equipment with a "commissionedDate" before [cut_off_date].
221221
If null the equipment will be translated into a regular Generator the rather a PVSystem."""
222222

223-
afterCutOffProfile: Optional[str] = None
224-
"""Optional name of the profile to apply to equipment with a "commissionDate" after [cutOffDate].
223+
after_cut_off_profile: Optional[str] = None
224+
"""Optional name of the profile to apply to equipment with a "commissionedDate" after [cut_off_date].
225225
If null the equipment will be translated into a regular Generator the rather a PVSystem."""
226226

227227

test/test_eas_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1293,8 +1293,8 @@ def run_opendss_export_request_handler(request):
12931293
emerg_amp_scaling=1.8,
12941294
inverter_control_config=PVVoltVARVoltWattConfig(
12951295
cut_off_date=datetime(2024, 4, 12, 11, 42),
1296-
beforeCutOffProfile="beforeProfile",
1297-
afterCutOffProfile="afterProfile"
1296+
before_cut_off_profile="beforeProfile",
1297+
after_cut_off_profile="afterProfile"
12981298
)
12991299
),
13001300
SolveConfig(

0 commit comments

Comments
 (0)