Coverage for backend/django/flowsheetInternals/unitops/config/objects/link_config.py: 100%

4 statements  

« prev     ^ index     » next       coverage.py v7.10.7, created at 2026-05-13 02:47 +0000

1from common.config_types import * 

2from common.config_utils import * 

3from ..spec_helpers import * 

4 

5link_config: ObjectType = ObjectType( 

6 displayType="Bus Coupler", 

7 ports={ 

8 "inlet": PortType( 

9 displayName="Inlet", 

10 type=ConType.Inlet, 

11 streamType="energy_stream" 

12 ), 

13 "outlet": PortType( 

14 displayName="Outlet", 

15 type=ConType.Outlet, 

16 streamType="energy_stream" 

17 ) 

18 }, 

19 propertyPackagePorts=default_property_package_ports(), 

20 graphicObject=unitop_graphic(), 

21 properties=PropertiesType({ 

22 "efficiency": PropertyType( 

23 displayName="Efficiency", 

24 type="numeric", 

25 unitType="ratio" 

26 ) 

27 }), 

28 propertySetGroups={ 

29 "default": { 

30 "type": "stateVars", 

31 "displayName": "Properties", 

32 "stateVars": ("efficiency",), 

33 } 

34 }, 

35 keyProperties=[ 

36 "efficiency" 

37 ], 

38 idaes_adapter=UnitModelAdapter( 

39 args=ArgAdapter({ 

40 "property_package": ConstantSchemaAdapter(PowerPPArgSchema()), 

41 }), 

42 properties=SerialisePropertiesAdapter(), 

43 ports=SerialisePortAdapter() 

44 ), 

45)