diff --git a/changelog.md b/changelog.md index f41729c..270a22c 100644 --- a/changelog.md +++ b/changelog.md @@ -1,7 +1,8 @@ # EAS Python client ## [0.25.0] - UNRELEASED ### Breaking Changes -* None. +* The `beforeCutOffProfile` and `afterCutOffProfile` fields in `PVVoltVARVoltWattConfig` have been renamed to snake case +and are now `before_cut_off_profile` and `after_cut_off_profile` respectively. ### New Features * None. diff --git a/src/zepben/eas/client/eas_client.py b/src/zepben/eas/client/eas_client.py index 1808b66..97f05a3 100644 --- a/src/zepben/eas/client/eas_client.py +++ b/src/zepben/eas/client/eas_client.py @@ -247,8 +247,8 @@ def generator_config_to_json(self, generator_config: Optional[GeneratorConfig]) "emergAmpScaling": generator_config.model.emerg_amp_scaling, "inverterControlConfig": generator_config.model.inverter_control_config and { "cutOffDate": generator_config.model.inverter_control_config.cut_off_date and generator_config.model.inverter_control_config.cut_off_date.isoformat(), - "beforeCutOffProfile": generator_config.model.inverter_control_config.beforeCutOffProfile, - "afterCutOffProfile": generator_config.model.inverter_control_config.afterCutOffProfile + "beforeCutOffProfile": generator_config.model.inverter_control_config.before_cut_off_profile, + "afterCutOffProfile": generator_config.model.inverter_control_config.after_cut_off_profile } }, "solve": generator_config.solve and { diff --git a/src/zepben/eas/client/work_package.py b/src/zepben/eas/client/work_package.py index 48051e4..7311326 100644 --- a/src/zepben/eas/client/work_package.py +++ b/src/zepben/eas/client/work_package.py @@ -214,14 +214,14 @@ class PVVoltVARVoltWattConfig: cut_off_date: Optional[datetime] = None """Optional cut-off date to determine which profile to apply to equipment during translation to the OpenDss model. If supplied, the "commissionedDate" of the equipment is compared against this date, equipment that do not have a - "commissionedDate" will receive the [beforeCutOffProfile]. If null, the [afterCutOffProfile] profile is applied to all equipment.""" + "commissionedDate" will receive the [before_cut_off_profile]. If null, the [after_cut_off_profile] profile is applied to all equipment.""" - beforeCutOffProfile: Optional[str] = None - """Optional name of the profile to apply to equipment with a "commissionDate" before [cutOffDate]. + before_cut_off_profile: Optional[str] = None + """Optional name of the profile to apply to equipment with a "commissionedDate" before [cut_off_date]. If null the equipment will be translated into a regular Generator the rather a PVSystem.""" - afterCutOffProfile: Optional[str] = None - """Optional name of the profile to apply to equipment with a "commissionDate" after [cutOffDate]. + after_cut_off_profile: Optional[str] = None + """Optional name of the profile to apply to equipment with a "commissionedDate" after [cut_off_date]. If null the equipment will be translated into a regular Generator the rather a PVSystem.""" diff --git a/test/test_eas_client.py b/test/test_eas_client.py index 641fab3..03a2510 100644 --- a/test/test_eas_client.py +++ b/test/test_eas_client.py @@ -1293,8 +1293,8 @@ def run_opendss_export_request_handler(request): emerg_amp_scaling=1.8, inverter_control_config=PVVoltVARVoltWattConfig( cut_off_date=datetime(2024, 4, 12, 11, 42), - beforeCutOffProfile="beforeProfile", - afterCutOffProfile="afterProfile" + before_cut_off_profile="beforeProfile", + after_cut_off_profile="afterProfile" ) ), SolveConfig(