Format schema
This commit is contained in:
@@ -7,10 +7,10 @@ def get_junction_schema(name: str) -> dict[str, dict[str, Any]]:
|
|||||||
return { 'id' : {'type': 'str' , 'optional': False , 'readonly': True },
|
return { 'id' : {'type': 'str' , 'optional': False , 'readonly': True },
|
||||||
'x' : {'type': 'float' , 'optional': False , 'readonly': False},
|
'x' : {'type': 'float' , 'optional': False , 'readonly': False},
|
||||||
'y' : {'type': 'float' , 'optional': False , 'readonly': False},
|
'y' : {'type': 'float' , 'optional': False , 'readonly': False},
|
||||||
'elevation' : {'type': "float" , 'optional': False , 'readonly': False},
|
'elevation' : {'type': 'float' , 'optional': False , 'readonly': False},
|
||||||
'demand' : {'type': "float" , 'optional': True , 'readonly': False},
|
'demand' : {'type': 'float' , 'optional': True , 'readonly': False},
|
||||||
'pattern' : {'type': "str" , 'optional': True , 'readonly': False},
|
'pattern' : {'type': 'str' , 'optional': True , 'readonly': False},
|
||||||
'links' : {'type': "str_list" , 'optional': False , 'readonly': True } }
|
'links' : {'type': 'str_list' , 'optional': False , 'readonly': True } }
|
||||||
|
|
||||||
|
|
||||||
def get_junction(name: str, id: str) -> dict[str, Any]:
|
def get_junction(name: str, id: str) -> dict[str, Any]:
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ def get_reservoir_schema(name: str) -> dict[str, dict[str, Any]]:
|
|||||||
return { 'id' : {'type': 'str' , 'optional': False , 'readonly': True },
|
return { 'id' : {'type': 'str' , 'optional': False , 'readonly': True },
|
||||||
'x' : {'type': 'float' , 'optional': False , 'readonly': False},
|
'x' : {'type': 'float' , 'optional': False , 'readonly': False},
|
||||||
'y' : {'type': 'float' , 'optional': False , 'readonly': False},
|
'y' : {'type': 'float' , 'optional': False , 'readonly': False},
|
||||||
'head' : {'type': "float" , 'optional': False , 'readonly': False},
|
'head' : {'type': 'float' , 'optional': False , 'readonly': False},
|
||||||
'pattern' : {'type': "str" , 'optional': True , 'readonly': False},
|
'pattern' : {'type': 'str' , 'optional': True , 'readonly': False},
|
||||||
'links' : {'type': "str_list" , 'optional': False , 'readonly': True } }
|
'links' : {'type': 'str_list' , 'optional': False , 'readonly': True } }
|
||||||
|
|
||||||
|
|
||||||
def get_reservoir(name: str, id: str) -> dict[str, Any]:
|
def get_reservoir(name: str, id: str) -> dict[str, Any]:
|
||||||
|
|||||||
@@ -11,15 +11,15 @@ def get_tank_schema(name: str) -> dict[str, dict[str, Any]]:
|
|||||||
return { 'id' : {'type': 'str' , 'optional': False , 'readonly': True },
|
return { 'id' : {'type': 'str' , 'optional': False , 'readonly': True },
|
||||||
'x' : {'type': 'float' , 'optional': False , 'readonly': False},
|
'x' : {'type': 'float' , 'optional': False , 'readonly': False},
|
||||||
'y' : {'type': 'float' , 'optional': False , 'readonly': False},
|
'y' : {'type': 'float' , 'optional': False , 'readonly': False},
|
||||||
'elevation' : {'type': "float" , 'optional': False , 'readonly': False},
|
'elevation' : {'type': 'float' , 'optional': False , 'readonly': False},
|
||||||
'init_level' : {'type': "float" , 'optional': False , 'readonly': False},
|
'init_level' : {'type': 'float' , 'optional': False , 'readonly': False},
|
||||||
'min_level' : {'type': "float" , 'optional': False , 'readonly': False},
|
'min_level' : {'type': 'float' , 'optional': False , 'readonly': False},
|
||||||
'max_level' : {'type': "float" , 'optional': False , 'readonly': False},
|
'max_level' : {'type': 'float' , 'optional': False , 'readonly': False},
|
||||||
'diameter' : {'type': "float" , 'optional': False , 'readonly': False},
|
'diameter' : {'type': 'float' , 'optional': False , 'readonly': False},
|
||||||
'min_vol' : {'type': "float" , 'optional': False , 'readonly': False},
|
'min_vol' : {'type': 'float' , 'optional': False , 'readonly': False},
|
||||||
'vol_curve' : {'type': "str" , 'optional': True , 'readonly': False},
|
'vol_curve' : {'type': 'str' , 'optional': True , 'readonly': False},
|
||||||
'overflow' : {'type': "str" , 'optional': True , 'readonly': False},
|
'overflow' : {'type': 'str' , 'optional': True , 'readonly': False},
|
||||||
'links' : {'type': "str_list" , 'optional': False , 'readonly': True } }
|
'links' : {'type': 'str_list' , 'optional': False , 'readonly': True } }
|
||||||
|
|
||||||
|
|
||||||
def get_tank(name: str, id: str) -> dict[str, Any]:
|
def get_tank(name: str, id: str) -> dict[str, Any]:
|
||||||
|
|||||||
@@ -9,13 +9,13 @@ PIPE_STATUS_CV = 'cv'
|
|||||||
|
|
||||||
def get_pipe_schema(name: str) -> dict[str, dict[str, Any]]:
|
def get_pipe_schema(name: str) -> dict[str, dict[str, Any]]:
|
||||||
return { 'id' : {'type': 'str' , 'optional': False , 'readonly': True },
|
return { 'id' : {'type': 'str' , 'optional': False , 'readonly': True },
|
||||||
'node1' : {'type': "str" , 'optional': False , 'readonly': False},
|
'node1' : {'type': 'str' , 'optional': False , 'readonly': False},
|
||||||
'node2' : {'type': "str" , 'optional': False , 'readonly': False},
|
'node2' : {'type': 'str' , 'optional': False , 'readonly': False},
|
||||||
'length' : {'type': "float" , 'optional': False , 'readonly': False},
|
'length' : {'type': 'float' , 'optional': False , 'readonly': False},
|
||||||
'diameter' : {'type': "float" , 'optional': False , 'readonly': False},
|
'diameter' : {'type': 'float' , 'optional': False , 'readonly': False},
|
||||||
'roughness' : {'type': "float" , 'optional': False , 'readonly': False},
|
'roughness' : {'type': 'float' , 'optional': False , 'readonly': False},
|
||||||
'minor_loss' : {'type': "float" , 'optional': False , 'readonly': False},
|
'minor_loss' : {'type': 'float' , 'optional': False , 'readonly': False},
|
||||||
'status' : {'type': "str" , 'optional': False , 'readonly': False} }
|
'status' : {'type': 'str' , 'optional': False , 'readonly': False} }
|
||||||
|
|
||||||
|
|
||||||
def get_pipe(name: str, id: str) -> dict[str, Any]:
|
def get_pipe(name: str, id: str) -> dict[str, Any]:
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ from .s0_base import *
|
|||||||
|
|
||||||
def get_pump_schema(name: str) -> dict[str, dict[str, Any]]:
|
def get_pump_schema(name: str) -> dict[str, dict[str, Any]]:
|
||||||
return { 'id' : {'type': 'str' , 'optional': False , 'readonly': True },
|
return { 'id' : {'type': 'str' , 'optional': False , 'readonly': True },
|
||||||
'node1' : {'type': "str" , 'optional': False , 'readonly': False},
|
'node1' : {'type': 'str' , 'optional': False , 'readonly': False},
|
||||||
'node2' : {'type': "str" , 'optional': False , 'readonly': False} }
|
'node2' : {'type': 'str' , 'optional': False , 'readonly': False} }
|
||||||
|
|
||||||
|
|
||||||
def get_pump(name: str, id: str) -> dict[str, Any]:
|
def get_pump(name: str, id: str) -> dict[str, Any]:
|
||||||
|
|||||||
@@ -12,12 +12,12 @@ VALVES_TYPE_GPV = 'gpv'
|
|||||||
|
|
||||||
def get_valve_schema(name: str) -> dict[str, dict[str, Any]]:
|
def get_valve_schema(name: str) -> dict[str, dict[str, Any]]:
|
||||||
return { 'id' : {'type': 'str' , 'optional': False , 'readonly': True },
|
return { 'id' : {'type': 'str' , 'optional': False , 'readonly': True },
|
||||||
'node1' : {'type': "str" , 'optional': False , 'readonly': False},
|
'node1' : {'type': 'str' , 'optional': False , 'readonly': False},
|
||||||
'node2' : {'type': "str" , 'optional': False , 'readonly': False},
|
'node2' : {'type': 'str' , 'optional': False , 'readonly': False},
|
||||||
'diameter' : {'type': "float" , 'optional': False , 'readonly': False},
|
'diameter' : {'type': 'float' , 'optional': False , 'readonly': False},
|
||||||
'v_type' : {'type': "str" , 'optional': False , 'readonly': False},
|
'v_type' : {'type': 'str' , 'optional': False , 'readonly': False},
|
||||||
'setting' : {'type': "float" , 'optional': False , 'readonly': False},
|
'setting' : {'type': 'float' , 'optional': False , 'readonly': False},
|
||||||
'minor_loss' : {'type': "float" , 'optional': False , 'readonly': False} }
|
'minor_loss' : {'type': 'float' , 'optional': False , 'readonly': False} }
|
||||||
|
|
||||||
|
|
||||||
def get_valve(name: str, id: str) -> dict[str, Any]:
|
def get_valve(name: str, id: str) -> dict[str, Any]:
|
||||||
|
|||||||
Reference in New Issue
Block a user