Releases: zepben/ewb-sdk-python
Releases · zepben/ewb-sdk-python
v1.1.0
Breaking Changes
- Updated
EwbDataFilePathsto be an abstract class that supports variants. AddedLocalEwbDataFilePathswhich is a local file system implementation of
EwbDataFilePaths, and should be used in place of the oldEwbDataFilePaths. CopyableUUIDhas been removed, and replaced with a newgenerate_idfunction.- All
IdentifiedObjectclasses now require anmridto be passed to the constructor, it will no longer be generated by default. This brings the Python SDK
into alignment with the JVM SDK. You can use the newgenerate_idfunction if you can't provide a more meaningful mRID.
New Features
- None.
Enhancements
- Bumped
hypothesisversion for tests to latest (6.138.2), fixed examples generating large numbers of results causing tests to run extremely slow. - Bumped every other dependency to the latest version aside from dataclassy.
- You can now opt out of the post read processing in the database readers using the optional
preform_after_read_processingparameter.
Fixes
- Moved ZepbenTokenAuth to use python dataclasses instead of
zepben.ewb.dataclassy, existing code should work as is. TypeErrors occurring inStepActions will no longer silently pass- Drop python 3.9 from list of test envs in tox
- Fix an ImportError being raised when calling
Conductor.is_underground()
Notes
- None.
v1.0.4
Breaking Changes
- None.
New Features
- None.
Enhancements
- None.
Fixes
- Fix an ImportError being raised when calling
Conductor.is_underground() TypeErrors occurring inStepActions will no longer silently pass
Notes
- None.
v1.0.3
Fixes
- Moved ZepbenTokenAuth to use python dataclasses instead of
zepben.ewb.dataclassy, existing code should work as is.
v1.0.0
Breaking Changes
- Removed support for Python 3.9. Upgrade your Python environment to at least 3.10.
- Renamed the package to
zepben.ewb. You will need to update all your importszepben.evolve.*->zepben.ewb.*. This also updates the pypi artifact to
zepben.ewb. - Renamed
length_from_t1_or_0tolength_from_t1_or_0. - Relocated the following classes into the Zepben extensions area, marking them as [ZBEX]:
DistanceRelay:cim.iec61970.base.protection->cim.extensions.iec61970.base.protection.EvChargingUnit:cim.iec61970.infiec61970.wires.generation.production->cim.extensions.iec61970.base.generation.production.Loop:cim.iec61970.infiec61970.feeder->cim.extensions.iec61970.base.feeder.LvFeeder:cim.iec61970.infiec61970.feeder->cim.extensions.iec61970.base.feeder.PowerDirectionKind:cim.iec61970.infiec61970.protection->cim.extensions.iec61970.base.protection.ProtectionKind:cim.iec61970.infiec61970.protection->cim.extensions.iec61970.base.protection.ProtectionRelayFunction:cim.iec61970.base.protection->cim.extensions.iec61970.base.protection.ProtectionRelayScheme:cim.iec61970.base.protection->cim.extensions.iec61970.base.protection.ProtectionRelaySystem:cim.iec61970.base.protection->cim.extensions.iec61970.base.protection.RelayInfo:cim.iec61968.infiec61968.infassetinfo->cim.extensions.iec61968.assetinfo.RelaySetting:cim.iec61970.base.protection->cim.extensions.iec61970.base.protection.Site:cim.iec61970.base.core->cim.extensions.iec61970.base.core.TransformerCoolingType:cim.iec61970.base.wires->cim.extensions.iec61970.base.wires.TransformerEndRatedS:cim.iec61970.base.wires->cim.extensions.iec61970.base.wires.VectorGroup:cim.iec61970.base.wires->cim.extensions.iec61970.base.wires.VoltageRelay:cim.iec61970.base.protection->cim.extensions.iec61970.base.protection.WindingConnection:cim.iec61970.base.wires.winding->cim.iec61970.base.wires.
- Relocated the following classes that were in the wrong packages:
Pole:cim.iec61968.assets->cim.iec61968.infiec61968.infassets.StreetlightLampKind:cim.iec61968.assets->cim.iec61968.infiec61968.infassets.- All classes in the incorrectly located
cim.iec61970.base.wires.generation.production->cim.iec61970.base.generation.production.
- The protobuf implementation has the following changes, which will only have an impact if you are using protobuf directly:
- Updated the values of the following enums to conform to Protobuf standard naming:
BatteryControlModeBatteryStateKindCustomerKindDiagramStyleEndDeviceFunctionKindFeederDirectionIncludedEnergizedContainersIncludedEnergizingContainersLogLevelLogSourceNetworkStateOrientationKindPhaseCodePhaseShuntConnectionKindPotentialTransformerKindPowerDirectionKindProtectionKindRegulatingControlModeKindSinglePhaseKindStreetlightLampKindSVCControlModeSwitchActionSynchronousMachineKindTransformerConstructionKindTransformerCoolingTypeTransformerFunctionKindUnitSymbolVectorGroupWindingConnectionWireMaterialKind
- Renumbered the protobuf fields for:
AcLineSegmentControlDiagramTransformerEnd
- Updated the values of the following enums to conform to Protobuf standard naming:
- Renamed the following enum values:
PowerDirectionKind.UNKNOWN_DIRECTION->PowerDirectionKind.UNKNOWNRegulatingControlModeKind.UNKNOWN_CONTROL_MODE->RegulatingControlModeKind.UNKNOWNTransformerCoolingType.UNKNOWN_COOLING_TYPE->TransformerCoolingType.UNKNOWNWindingConnection.UNKNOWN_WINDING->WindingConnection.UNKNOWN
- Added
TransformerFunctionKind.UNKNOWNto allow distinction between an unknown function, and a function that is not covered by the enum (i.e.other). This
addition has changed the order of the enum values, withothernow being the last entry, instead of the first. NetworkConsumerClientandSyncNetworkConsumerClientno longer use the protobufIncludedEnergizedContainers,IncludedEnergizingContainersand
NetworkStateenums directly, it now uses SDK versions of these enums. To use these enums you will need to update your imports, and use the simplified
versions of the enum values:IncludedEnergizedContainersfrom packagezepben.ewb.streaming.get.EXCLUDE_ENERGIZED_CONTAINERS->NONE.INCLUDE_ENERGIZED_FEEDERS->FEEDERS.INCLUDE_ENERGIZED_LV_FEEDERS->LV_FEEDERS.
IncludedEnergizingContainersfrom packagezepben.ewb.streaming.get.EXCLUDE_ENERGIZING_CONTAINERS->NONE.INCLUDE_ENERGIZING_FEEDERS->FEEDERS.INCLUDE_ENERGIZING_SUBSTATIONS->SUBSTATIONS.
NetworkStatefrom packagezepben.ewb.services.network.ALL_NETWORK_STATE->ALL.NORMAL_NETWORK_STATE->NORMAL.CURRENT_NETWORK_STATE->CURRENT.
- The
zepben.authdependency has been incorporated into the SDK with the following package change:zepben.auth->zepben.ewb.auth. You can also import these directly fromzepben.ewb.
SqliteTablenow subclassesSqlTable.- The following CIM fields have been made nullable. Note if previously accessing these fields you will now have to handle them potentially being null.
Analog.positiveFlowInDocument.*EnergyConsumer.groundedEnergySource.isExternalGridIdentifiedObject.nameIdentifiedObject.descriptionIdentifiedObject.numDiagramObjectsMeter.companyMeterIdNameType.descriptionPole.classificationPowerSystemResource.numControlsRegulatingCondEq.controlEnabledShuntCompensator.groundedStreetAddress.postalCodeStreetAddress.poBoxStreetDetail.*SynchronousMachine.earthingTapChanger.controlEnabledTransformerEnd.groundedUsagePoint.isVirtual
New Features
- Created a new
SqlTablethat doesn't support creating schema creation statements by default.
Enhancements
EquipmentTreeBuilderwill now calculateleaveswhen specified to do so.
Fixes
- Marked some extensions properties and classes with [ZBEX] that were missing them (might still be more). In addition to the ones moved into the extensions
package:PhaseCode.YPhaseCode.YNPowerElectronicsConnection.inverterStandardPowerElectronicsConnection.sustainOpOvervoltLimitPowerElectronicsConnection.stopAtOverFreqPowerElectronicsConnection.stopAtUnderFreqPowerElectronicsConnection.invVoltWattRespModePowerElectronicsConnection.invWattRespV1PowerElectronicsConnection.invWattRespV2PowerElectronicsConnection.invWattRespV3PowerElectronicsConnection.invWattRespV4PowerElectronicsConnection.invWattRespPAtV1PowerElectronicsConnection.invWattRespPAtV2PowerElectronicsConnection.invWattRespPAtV3PowerElectronicsConnection.invWattRespPAtV4PowerElectronicsConnection.invVoltVarRespModePowerElectronicsConnection.invVarRespV1PowerElectronicsConnection.invVarRespV2PowerElectronicsConnection.invVarRespV3PowerElectronicsConnection.invVarRespV4PowerElectronicsConnection.invVarRespQAtV1PowerElectronicsConnection.invVarRespQAtV2PowerElectronicsConnection.invVarRespQAtV3PowerElectronicsConnection.invVarRespQAtV4PowerElectronicsConnection.invReactivePowerModePowerElectronicsConnection.invFixReactivePowerPowerTransformerEnd.ratingsRegulatingControl.ratedCurrentSensor.relayFunctionsUsagePoint.approvedInverterCapacity
- using
EquipmentTreeBuildermore then once per interpreter will no longer cause therootsto contain more objects then it should due to_rootsbeing a
class var - Errors when initiating gRPC connections will now properly be propagated to users.
Notes
- None.
v0.48.0
Breaking Changes
- Updated to new Tracing API. All old traces will need to be re-written with the new API.
AcLineSegmentsupports adding a maximum of 2 terminals. Mid-span terminals are no longer supported and models should migrate to usingClamp.Clampsupports only adding a single terminal.FeederDirectionStateOperationshave been reworked to takeNetworkStateOperatorsas a parameter.RemoveDirectionhas been removed. It did not work reliably with dual fed networks with loops. You now need to clear direction using the newClearDirection
and reapply directions where appropriate usingSetDirection.Cutsupports adding a maximum of 2 terminals.NetworkTraceTrackernow uses asetto track visited objects, if you were using unhashable objects this will need to be addressed.- Added a new
debug_loggingandnameparameters to the constructor of the following traces. The helper functions inTracingalso have these parameters,
which defaults toNoneandnetwork_trace, meaning anyone using these wrappers will be unaffected by the change:AssignToFeedersAssignToLvFeedersClearDirectionFindSwerEquipmentPhaseInferrerRemovePhasesSetDirectionSetPhases
NetworkStateOperatorshas a new abstractdescription. If you are creating custom operators you will need to add it.StepActionwill now raise an exception ifapplyis overridden. override_applyinstead, or pass the function to__init__
New Features
- Added
ClearDirectionthat clears feeder directions. - You can now pass a logger to all
Tracingmethods andTestNetworkBuilder.buildto enable debug logging for the traces it runs. The debug logging will
include the results of all queue and stop condition checks, and each item that is stepped on.
Enhancements
- Tracing models with
CutandClampare now supported via the new tracing API. - Added support to
TestNetworkBuilderfor:with_clamp- Adds a clamp to the previously addedAcLineSegmentwith_cut- Adds a cut to the previously addedAcLineSegmentconnect_to- Connects the previously added item, rather than having to specify it again inconnect.- You can now add sites to the
TestNetworkBuilderviaaddSite. - You can now add busbar sections natively with
from_busbar_sectionandto_busbar_section - The prefix for generated mRIDs for "other" equipment can be specified with the
default_mrid_prefixargument infrom_otherandto_other.
- When processing feeder assignments, all LV feeders belonging to a dist substation site will now be considered energized when the site is energized by a
feeder. NetworkTracenow supports starting from a knownNetworkTraceStep.Path. This allows you to force a trace to start in a particular direction, or to continue
a follow-up trace from a detected stop point.Traversal.is_stopping/Traversal.is_not_stoppingnow acceptStepActionand any child classes, including those subclassingStepActionWithContextValue
Fixes
- When finding
LvFeedersin theSitewe will now excludeLvFeedersthat start with an openSwitch AssignToFeederandAssignToLvFeederwill no longer trace from start terminals that belong to open switches- The follow fixes were added to Traversal and NetworkTrace:
can_stop_on_start_itemnow works for branching traversals.- Traversal start items are added to the queue before traversal starts, so that the start items honour the queue type order.
- Stop conditions on the
NetworkTracenow are checked based on a step type, likeQueueConditiondoes, rather than by checkingcan_action_item. CutandClampare now correctly supported inSetDirectionandDirectionCondition.NetworkTracenow handles starting onCut,Clamp, andAcLineSegmentand their terminals in a explicit / sensible way.NetworkTracePathProvidernow correctly handles next paths when starting on aClampterminal.
NetworkTrace/Traversalnow correctly respectscan_stop_on_start_itemwhen providing multiple start items.AssignToFeeders/AssignToLvFeedersnow finds back-fed equipment correctlyAssignToFeedersandAssignToLvFeederswill now associatePowerElectronicUnitswith theirpowerElectronicsConnectionFeeder/LvFeeder.- Phases are now correctly assigned to the LV side of an LV2 transformer that is in parallel with a previously energised LV1 transformer.
- Added missing default network state operators (NORMAL) if you are calling
SetDirection.rundirectly.
Notes
- None.
v0.47.1
Fixes
- Only resolve PowerSystemResource -> Asset relationship in one direction when calling
get_equipment_containerto stop deadlock. - MultiObjectResult now exposes result types inheriting from IdentifiedObject to allow better type completion
v0.47.0
Fixes
- Downgrade protobuf and gRPC deps to fix SyncNetworkConsumerClient
v0.46.0
Breaking Changes
- None.
New Features
- Added relationships between
AssetandPowerSystemResourcewhich enables linkingEquipmenttoPole:Asset.powerSystemResourcesPowerSystemResource.assets
Enhancements
- None.
Fixes
- None.
Notes
- None.
v0.45.0
Committing doc changes to docusaurus. [skip ci]
v0.44.1
Breaking Changes
- None.
New Features
- None.
Enhancements
- None.
Fixes
- Specify typing_extensions as a dependency to fix support for Python 3.9 and 3.10
Notes
- None.