Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# EAS Python client
## [0.23.0] - UNRELEASED
### Breaking Changes
* None.
* Renamed the parameter `calibration_id` to `calibration_name` for the following methods `get_transformer_tap_settings` and `async_get_transformer_tap_settings`. This better reflects that
this parameter is the user supplied calibration name rather than EAS's internal calibration run ID.

### New Features
* Added optional fields to `ModelConfig` to control network simplification: `simplify_network`, `collapse_negligible_impedances`, and `combine_common_impedances`.
Expand Down
25 changes: 15 additions & 10 deletions src/zepben/eas/client/eas_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -871,8 +871,7 @@ def run_hosting_capacity_calibration(self, calibration_name: str, local_calibrat
transformer_tap_settings: Optional[str] = None,
generator_config: Optional[GeneratorConfig] = None):
"""
Send request to run hosting capacity calibration
:param calibration_name: A string representation of the calibration name
Send request to run hosting capacity calibrationbration name
:param local_calibration_time: A datetime representation of the calibration time, in the timezone of your pqv data ("model time").
:param feeders: A list of feeder ID's to run the calibration over. If not supplied then the calibration is run over all feeders in the network.
:param transformer_tap_settings: A set of transformer tap settings to apply before running the calibration work package.
Expand Down Expand Up @@ -953,15 +952,15 @@ async def async_run_hosting_capacity_calibration(self, calibration_name: str,
def get_hosting_capacity_calibration_run(self, id: str):
"""
Retrieve information of a hosting capacity calibration run
:param id: The calibration ID
:param id: The calibration run ID
:return: The HTTP response received from the Evolve App Server after requesting calibration run info
"""
return get_event_loop().run_until_complete(self.async_get_hosting_capacity_calibration_run(id))

async def async_get_hosting_capacity_calibration_run(self, id: str):
"""
Retrieve information of a hosting capacity calibration run
:param id: The calibration ID
:param id: The calibration run ID
:return: The HTTP response received from the Evolve App Server after requesting calibration run info
"""
with warnings.catch_warnings():
Expand Down Expand Up @@ -1038,19 +1037,25 @@ async def async_get_hosting_capacity_calibration_sets(self):
else:
response.raise_for_status()

def get_transformer_tap_settings(self, calibration_id: str, feeder: Optional[str] = None,
def get_transformer_tap_settings(self, calibration_name: str, feeder: Optional[str] = None,
transformer_mrid: Optional[str] = None):
"""
Retrieve distribution transformer tap settings from a calibration set in the hosting capacity input database.
Retrieve distribution transformer tap settings from a calibration set in the hosting capacity input database
:param calibration_name: The (user supplied)name of the calibration run to retrieve transformer tap settings from
:param feeder: An optional filter to apply to the returned list of transformer tap settings
:param transformer_mrid: An optional filter to return only the transformer tap settings for a particular transfomer mrid
:return: The HTTP response received from the Evolve App Server after requesting transformer tap settings for the calibration id
"""
return get_event_loop().run_until_complete(
self.async_get_transformer_tap_settings(calibration_id, feeder, transformer_mrid))
self.async_get_transformer_tap_settings(calibration_name, feeder, transformer_mrid))

async def async_get_transformer_tap_settings(self, calibration_id: str, feeder: Optional[str] = None,
async def async_get_transformer_tap_settings(self, calibration_name: str, feeder: Optional[str] = None,
transformer_mrid: Optional[str] = None):
"""
Retrieve distribution transformer tap settings from a calibration set in the hosting capacity input database.
Retrieve distribution transformer tap settings from a calibration set in the hosting capacity input database
:param calibration_name: The (user supplied)name of the calibration run to retrieve transformer tap settings from
:param feeder: An optional filter to apply to the returned list of transformer tap settings
:param transformer_mrid: An optional filter to return only the transformer tap settings for a particular transfomer mrid
:return: The HTTP response received from the Evolve App Server after requesting transformer tap settings for the calibration id
"""
with warnings.catch_warnings():
Expand All @@ -1071,7 +1076,7 @@ async def async_get_transformer_tap_settings(self, calibration_id: str, feeder:
}
""",
"variables": {
"calibrationName": calibration_id,
"calibrationName": calibration_name,
"feeder": feeder,
"transformerMrid": transformer_mrid
}
Expand Down