cloudpss 4.5.18__py3-none-any.whl → 4.6.0a1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cloudpss/ieslab/DataManageModel.py +11 -1
- cloudpss/ieslab/PlanModel.py +6 -2
- cloudpss/job/job.py +15 -20
- cloudpss/job/messageStreamReceiver.py +22 -26
- cloudpss/job/messageStreamSender.py +2 -4
- cloudpss/job/result/EMTResult.py +2 -13
- cloudpss/model/implements/diagram.py +2 -4
- cloudpss/model/model.py +7 -8
- cloudpss/model/revision.py +4 -4
- cloudpss/runner/runner.py +3 -7
- cloudpss/utils/graphqlUtil.py +2 -2
- cloudpss/utils/httprequests.py +1 -2
- cloudpss/version.py +1 -1
- {cloudpss-4.5.18.dist-info → cloudpss-4.6.0a1.dist-info}/METADATA +1 -1
- {cloudpss-4.5.18.dist-info → cloudpss-4.6.0a1.dist-info}/RECORD +17 -17
- {cloudpss-4.5.18.dist-info → cloudpss-4.6.0a1.dist-info}/WHEEL +0 -0
- {cloudpss-4.5.18.dist-info → cloudpss-4.6.0a1.dist-info}/top_level.txt +0 -0
@@ -83,7 +83,7 @@ class DataManageModel(object):
|
|
83
83
|
|
84
84
|
:return: 无
|
85
85
|
'''
|
86
|
-
list = ['thermalLoads', 'heatingLoad', 'coolingLoad', 'electricLoads', 'fuels', 'typhoon', 'rainfall', 'earthquake', 'extremeCold', 'HydrogenLoad', 'ammoniaLoad']
|
86
|
+
list = ['thermalLoads', 'heatingLoad', 'coolingLoad', 'electricLoads', 'fuels', 'typhoon', 'rainfall', 'earthquake', 'extremeCold', 'HydrogenLoad', 'ammoniaLoad', 'MethaneLoad']
|
87
87
|
for kind,value in self._kindUrlMap.items():
|
88
88
|
try:
|
89
89
|
if kind in list:
|
@@ -496,6 +496,11 @@ class IESOptDataManageModel(DataManageModel):
|
|
496
496
|
"制氮设备": "NitrogenProduction",
|
497
497
|
"氨负荷": "ammoniaLoad",
|
498
498
|
"氨": "Ammonia",
|
499
|
+
"制甲烷设备": "MethaneProduction",
|
500
|
+
"碳捕集设备": "CarbonCapture",
|
501
|
+
"储碳装置": "CarbonStorage",
|
502
|
+
"甲烷负荷": "MethaneLoad",
|
503
|
+
"甲烷": "Methane",
|
499
504
|
}
|
500
505
|
_kindUrlMap = {
|
501
506
|
"PhotovoltaicSys": "api/ieslab-opt/rest/dpcs/",
|
@@ -547,5 +552,10 @@ class IESOptDataManageModel(DataManageModel):
|
|
547
552
|
"NitrogenProduction": "api/ieslab-opt/rest/asec/",
|
548
553
|
"ammoniaLoad": "api/ieslab-opt/rest/ammoniaLoad/",
|
549
554
|
"Ammonia": "api/ieslab-opt/rest/ammonia/",
|
555
|
+
"MethaneProduction": "api/ieslab-opt/rest/mcp/",
|
556
|
+
"CarbonCapture": "api/ieslab-opt/rest/cc/",
|
557
|
+
"CarbonStorage": "api/ieslab-opt/rest/escs/",
|
558
|
+
"MethaneLoad": "api/ieslab-opt/rest/methaneLoad/",
|
559
|
+
"Methane": "api/ieslab-opt/rest/methane/",
|
550
560
|
}
|
551
561
|
pass
|
cloudpss/ieslab/PlanModel.py
CHANGED
@@ -171,7 +171,7 @@ class IESLabOptModel(object):
|
|
171
171
|
'''
|
172
172
|
获取当前算例的优化目标设置信息
|
173
173
|
|
174
|
-
:return: Dict 类型,例如:{'OptGoal': <OptimizationMode.经济性: 0>, 'StoSen': "10", '@debug': '', 'clustering_algorithm': '0', 'num_method': '0', 'PowUnPrice': '1000', 'HeatAbandonPrice': '1000'}
|
174
|
+
:return: Dict 类型,例如:{'OptGoal': <OptimizationMode.经济性: 0>, 'StoSen': "10", '@debug': '', 'clustering_algorithm': '0', 'num_method': '0', AbandonRen: '0', 'PowUnPrice': '1000', 'HeatAbandonPrice': '1000'}
|
175
175
|
'''
|
176
176
|
try:
|
177
177
|
url = f'{self._baseUri}/simuOpt/'
|
@@ -184,6 +184,7 @@ class IESLabOptModel(object):
|
|
184
184
|
"@debug": "",
|
185
185
|
"clustering_algorithm": "0",
|
186
186
|
"num_method": "0",
|
187
|
+
"AbandonRen": "0",
|
187
188
|
"PowUnPrice": "1000",
|
188
189
|
"HeatAbandonPrice": "1000"
|
189
190
|
}
|
@@ -195,6 +196,7 @@ class IESLabOptModel(object):
|
|
195
196
|
"@debug": value["@debug"],
|
196
197
|
"clustering_algorithm": value["clustering_algorithm"],
|
197
198
|
"num_method": value["num_method"],
|
199
|
+
"AbandonRen": value["AbandonRen"],
|
198
200
|
"PowUnPrice": value["PowUnPrice"],
|
199
201
|
"HeatAbandonPrice": value["HeatAbandonPrice"]
|
200
202
|
}
|
@@ -205,7 +207,7 @@ class IESLabOptModel(object):
|
|
205
207
|
'''
|
206
208
|
设置当前算例的优化目标
|
207
209
|
|
208
|
-
:param data: dict 类型,例如:{'OptGoal': <OptimizationMode.经济性: 0>, 'StoSen': "10", '@debug': '', 'clustering_algorithm': '0', 'num_method': '0', 'PowUnPrice': '1000', 'HeatAbandonPrice': '1000'}
|
210
|
+
:param data: dict 类型,例如:{'OptGoal': <OptimizationMode.经济性: 0>, 'StoSen': "10", '@debug': '', 'clustering_algorithm': '0', 'num_method': '0','AbandonRen': '0', 'PowUnPrice': '1000', 'HeatAbandonPrice': '1000'}
|
209
211
|
|
210
212
|
:return: boolean 类型,为 True 则设置成功
|
211
213
|
'''
|
@@ -219,6 +221,7 @@ class IESLabOptModel(object):
|
|
219
221
|
"@debug": data.get('@debug', ''),
|
220
222
|
"clustering_algorithm": data.get('clustering_algorithm', ''),
|
221
223
|
"num_method": data.get('num_method', ''),
|
224
|
+
"AbandonRen": data.get('AbandonRen', ''),
|
222
225
|
"PowUnPrice": data.get('PowUnPrice', ''),
|
223
226
|
"HeatAbandonPrice": data.get('HeatAbandonPrice', '')
|
224
227
|
}
|
@@ -267,6 +270,7 @@ class IESLabOptModel(object):
|
|
267
270
|
"@debug": self.optimizationInfo.get('@debug', ''),
|
268
271
|
"clustering_algorithm": self.optimizationInfo.get('clustering_algorithm', '0'),
|
269
272
|
"num_method": self.optimizationInfo.get('num_method', '0'),
|
273
|
+
"AbandonRen": self.optimizationInfo.get('AbandonRen', '0'),
|
270
274
|
"PowUnPrice": self.optimizationInfo.get('PowUnPrice', '1000'),
|
271
275
|
"HeatAbandonPrice": self.optimizationInfo.get('HeatAbandonPrice', '1000'),
|
272
276
|
}
|
cloudpss/job/job.py
CHANGED
@@ -4,7 +4,6 @@ import re
|
|
4
4
|
import time
|
5
5
|
|
6
6
|
from cloudpss.job.result.result import Result
|
7
|
-
from cloudpss.utils.parseDebugArgs import parse_debug_args
|
8
7
|
from .result import getResultClass
|
9
8
|
|
10
9
|
from cloudpss.utils.IO import IO
|
@@ -66,7 +65,6 @@ class Job(Generic[T]):
|
|
66
65
|
input,
|
67
66
|
output,
|
68
67
|
position,
|
69
|
-
**kwargs
|
70
68
|
):
|
71
69
|
super(Job, self).__init__()
|
72
70
|
self.id = id
|
@@ -86,10 +84,9 @@ class Job(Generic[T]):
|
|
86
84
|
self.__receiver = None
|
87
85
|
self.__sender = None
|
88
86
|
self._result = None
|
89
|
-
self.baseUrl = kwargs.get("baseUrl", None)
|
90
87
|
|
91
88
|
@staticmethod
|
92
|
-
def fetch(id
|
89
|
+
def fetch(id):
|
93
90
|
"""
|
94
91
|
获取job信息
|
95
92
|
"""
|
@@ -97,10 +94,11 @@ class Job(Generic[T]):
|
|
97
94
|
raise Exception("id is None")
|
98
95
|
|
99
96
|
variables = {"_a": {"id": id}}
|
100
|
-
|
97
|
+
|
98
|
+
r = graphql_request(Job.__jobQuery, variables)
|
101
99
|
if "errors" in r:
|
102
100
|
raise Exception(r["errors"])
|
103
|
-
return Job(**r["data"]["job"]
|
101
|
+
return Job(**r["data"]["job"])
|
104
102
|
|
105
103
|
|
106
104
|
# @staticmethod
|
@@ -135,12 +133,9 @@ class Job(Generic[T]):
|
|
135
133
|
debug = job["args"].get("@debug", None )
|
136
134
|
debugargs={}
|
137
135
|
if debug is not None:
|
138
|
-
|
139
|
-
|
140
|
-
debugargs
|
141
|
-
# t= [ i.split('=') for i in re.split(r'\s+',debug) if i.find('=')>0]
|
142
|
-
# for i in t:
|
143
|
-
# debugargs[i[0]]=i[1]
|
136
|
+
t= [ i.split('=') for i in re.split(r'\s+',debug) if i.find('=')>0]
|
137
|
+
for i in t:
|
138
|
+
debugargs[i[0]]=i[1]
|
144
139
|
context=[
|
145
140
|
function,
|
146
141
|
f"model/@sdk/{str(int(time.time() * random.random()))}",
|
@@ -167,7 +162,7 @@ class Job(Generic[T]):
|
|
167
162
|
}
|
168
163
|
return variables
|
169
164
|
@staticmethod
|
170
|
-
def create(revisionHash, job, config, name=None, rid=None, policy=None,
|
165
|
+
def create(revisionHash, job, config, name=None, rid=None, policy=None, **kwargs):
|
171
166
|
"""
|
172
167
|
创建一个运行任务
|
173
168
|
|
@@ -182,11 +177,11 @@ class Job(Generic[T]):
|
|
182
177
|
>>> runner = Runner.runRevision(revision,job,config,'')
|
183
178
|
"""
|
184
179
|
variables=Job.__createJobVariables(job, config, revisionHash, rid=rid, policy=policy, **kwargs)
|
185
|
-
r = graphql_request(Job.__createJobQuery, variables
|
180
|
+
r = graphql_request(Job.__createJobQuery, variables)
|
186
181
|
if "errors" in r:
|
187
182
|
raise Exception(r["errors"])
|
188
183
|
id = r["data"]["job"]["id"]
|
189
|
-
return Job.fetch(id
|
184
|
+
return Job.fetch(id)
|
190
185
|
|
191
186
|
|
192
187
|
|
@@ -207,7 +202,7 @@ class Job(Generic[T]):
|
|
207
202
|
if receiver is not None:
|
208
203
|
self.__receiver = receiver
|
209
204
|
if self.__receiver is None:
|
210
|
-
self.__receiver = MessageStreamReceiver(self.output
|
205
|
+
self.__receiver = MessageStreamReceiver(self.output)
|
211
206
|
self.__receiver.connect(**kwargs)
|
212
207
|
return self.__receiver
|
213
208
|
|
@@ -221,7 +216,7 @@ class Job(Generic[T]):
|
|
221
216
|
if sender is not None:
|
222
217
|
self.__sender = sender
|
223
218
|
if self.__sender is None:
|
224
|
-
self.__sender = MessageStreamSender(self.input
|
219
|
+
self.__sender = MessageStreamSender(self.input)
|
225
220
|
self.__sender.connect_legacy(**kwargs)
|
226
221
|
return self.__sender
|
227
222
|
|
@@ -270,7 +265,7 @@ class Job(Generic[T]):
|
|
270
265
|
|
271
266
|
|
272
267
|
|
273
|
-
def abort(self,timeout=3
|
268
|
+
def abort(self,timeout=3):
|
274
269
|
"""
|
275
270
|
中断当前运行实例
|
276
271
|
"""
|
@@ -283,8 +278,8 @@ class Job(Generic[T]):
|
|
283
278
|
'''
|
284
279
|
variables = {
|
285
280
|
'input': {
|
286
|
-
'id': self.
|
281
|
+
'id': self.taskId,
|
287
282
|
'timeout': timeout
|
288
283
|
}
|
289
284
|
}
|
290
|
-
graphql_request(query, variables
|
285
|
+
graphql_request(query, variables)
|
@@ -24,12 +24,10 @@ class Message(object):
|
|
24
24
|
|
25
25
|
|
26
26
|
class MessageStreamReceiver(JobReceiver):
|
27
|
-
def __init__(self, output
|
27
|
+
def __init__(self, output):
|
28
28
|
super().__init__()
|
29
29
|
self.id = output
|
30
|
-
self.origin =
|
31
|
-
if self.origin is None:
|
32
|
-
self.origin =os.environ.get("CLOUDPSS_API_URL", "https://cloudpss.net/")
|
30
|
+
self.origin = os.environ.get("CLOUDPSS_API_URL", "https://cloudpss.net/")
|
33
31
|
self.__hasOpen = False
|
34
32
|
self.templates=TemplateManager()
|
35
33
|
self.timeOffset=0
|
@@ -66,28 +64,26 @@ class MessageStreamReceiver(JobReceiver):
|
|
66
64
|
message = args[1]
|
67
65
|
return self.__on_message(message)
|
68
66
|
def __on_message(self, message):
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
self.ws.close()
|
90
|
-
return None
|
67
|
+
|
68
|
+
data = IO.deserialize(message, "ubjson")
|
69
|
+
self.updateTime(data["timestamp"])
|
70
|
+
self.ws.url = self.__path(data["id"])
|
71
|
+
msg = IO.deserialize(data["data"], "ubjson")
|
72
|
+
if type(msg) is list:
|
73
|
+
if len(msg) == 3:
|
74
|
+
pass
|
75
|
+
|
76
|
+
templateMessage = self.templates.invoke(msg)
|
77
|
+
# print(templateMessage)
|
78
|
+
for m in templateMessage:
|
79
|
+
self.messages.append(m)
|
80
|
+
return
|
81
|
+
else:
|
82
|
+
self.templates.create(msg)
|
83
|
+
return
|
84
|
+
|
85
|
+
self.messages.append(msg)
|
86
|
+
return msg
|
91
87
|
|
92
88
|
|
93
89
|
def __on_error(self, *args, **kwargs):
|
@@ -12,12 +12,10 @@ import logging
|
|
12
12
|
|
13
13
|
|
14
14
|
class MessageStreamSender:
|
15
|
-
def __init__(self, input
|
15
|
+
def __init__(self, input):
|
16
16
|
super().__init__()
|
17
17
|
self.input = input
|
18
|
-
self.origin =
|
19
|
-
if self.origin is None:
|
20
|
-
self.origin =os.environ.get("CLOUDPSS_API_URL", "https://cloudpss.net/")
|
18
|
+
self.origin = os.environ.get("CLOUDPSS_API_URL", "https://cloudpss.net/")
|
21
19
|
self.__hasOpen = False
|
22
20
|
|
23
21
|
def __on_message(self, ws, message):
|
cloudpss/job/result/EMTResult.py
CHANGED
@@ -38,11 +38,6 @@ class EMTResult(Result):
|
|
38
38
|
该类只提供 EMT 仿真使用
|
39
39
|
|
40
40
|
"""
|
41
|
-
|
42
|
-
def __init__(self, receiver, sender = None):
|
43
|
-
super().__init__(receiver, sender)
|
44
|
-
self.virtualInput=VirtualInput()
|
45
|
-
|
46
41
|
__messageIndex = 0
|
47
42
|
def getPlots(self):
|
48
43
|
'''
|
@@ -145,21 +140,15 @@ class EMTResult(Result):
|
|
145
140
|
else:
|
146
141
|
raise Exception('transmitter is None')
|
147
142
|
|
148
|
-
def send(self,message
|
143
|
+
def send(self,message):
|
149
144
|
"""
|
150
145
|
发送消息
|
151
146
|
"""
|
152
147
|
if self._sender is not None:
|
153
|
-
val =
|
154
|
-
"type": 'virtual_input',
|
155
|
-
"data": message,
|
156
|
-
}
|
148
|
+
val =message
|
157
149
|
if type(message) is VirtualInput:
|
158
150
|
val = message.toJson()
|
159
151
|
|
160
|
-
if message is None:
|
161
|
-
val = self.virtualInput.toJson()
|
162
|
-
|
163
152
|
self._sender.write(val)
|
164
153
|
else:
|
165
154
|
raise Exception('transmitter is None')
|
@@ -73,7 +73,7 @@ class DiagramImplement(object):
|
|
73
73
|
|
74
74
|
>>>> diagram.addComponent(args)
|
75
75
|
"""
|
76
|
-
id = "comp_" + str(uuid.uuid4())
|
76
|
+
id = "comp_" + str(uuid.uuid4())
|
77
77
|
shape = "diagram-component"
|
78
78
|
definition = definition
|
79
79
|
label = label or definition
|
@@ -126,10 +126,8 @@ class DiagramImplement(object):
|
|
126
126
|
component = self.cells.get(key)
|
127
127
|
if not component:
|
128
128
|
return False
|
129
|
+
position = component.position.copy()
|
129
130
|
del self.cells[key]
|
130
|
-
position=getattr(component, "position", None)
|
131
|
-
if position is None:
|
132
|
-
return True
|
133
131
|
for edge in self.cells.values():
|
134
132
|
if edge.shape == "diagram-edge":
|
135
133
|
if edge.source.get("cell") == key:
|
cloudpss/model/model.py
CHANGED
@@ -298,7 +298,7 @@ class Model(object):
|
|
298
298
|
return config
|
299
299
|
|
300
300
|
@staticmethod
|
301
|
-
def fetchMany(name=None, cursor=[], pageSize=10,owner=None
|
301
|
+
def fetchMany(name=None, cursor=[], pageSize=10,owner=None):
|
302
302
|
"""
|
303
303
|
获取用户可以运行的项目列表
|
304
304
|
|
@@ -332,13 +332,13 @@ class Model(object):
|
|
332
332
|
if name is not None:
|
333
333
|
variables["_search"] = name
|
334
334
|
|
335
|
-
data = graphql_request(Model.__models_query, {"input": variables}
|
335
|
+
data = graphql_request(Model.__models_query, {"input": variables})
|
336
336
|
if "errors" in data:
|
337
337
|
raise Exception(data["errors"][0]["message"])
|
338
338
|
return data["data"]["models"]['items']
|
339
339
|
|
340
340
|
@staticmethod
|
341
|
-
def fetch(rid
|
341
|
+
def fetch(rid):
|
342
342
|
"""
|
343
343
|
获取项目
|
344
344
|
|
@@ -349,7 +349,7 @@ class Model(object):
|
|
349
349
|
>>> model=Model.fetch('model/Demo/test')
|
350
350
|
|
351
351
|
"""
|
352
|
-
data = graphql_request(Model.__model_query, {"rid": rid}
|
352
|
+
data = graphql_request(Model.__model_query, {"rid": rid})
|
353
353
|
if "errors" in data:
|
354
354
|
raise Exception(data["errors"][0]["message"])
|
355
355
|
return Model(data["data"]["model"])
|
@@ -464,7 +464,7 @@ class Model(object):
|
|
464
464
|
|
465
465
|
|
466
466
|
@staticmethod
|
467
|
-
def create(model
|
467
|
+
def create(model):
|
468
468
|
"""
|
469
469
|
新建项目
|
470
470
|
|
@@ -506,13 +506,12 @@ class Model(object):
|
|
506
506
|
},
|
507
507
|
}
|
508
508
|
},
|
509
|
-
**kwargs
|
510
509
|
)
|
511
510
|
|
512
511
|
|
513
512
|
|
514
513
|
@staticmethod
|
515
|
-
def update(model
|
514
|
+
def update(model):
|
516
515
|
"""
|
517
516
|
更新项目
|
518
517
|
|
@@ -556,7 +555,7 @@ class Model(object):
|
|
556
555
|
'tags': tags,
|
557
556
|
"permissions": permissions,
|
558
557
|
}
|
559
|
-
}
|
558
|
+
})
|
560
559
|
if "errors" in r:
|
561
560
|
raise Exception(r["errors"][0]["message"])
|
562
561
|
return r
|
cloudpss/model/revision.py
CHANGED
@@ -75,8 +75,7 @@ class ModelRevision(object):
|
|
75
75
|
|
76
76
|
>>> revision.run(revision,job,config,'')
|
77
77
|
"""
|
78
|
-
|
79
|
-
revision= ModelRevision.create(self,**kwargs)
|
78
|
+
revision= ModelRevision.create(self)
|
80
79
|
if stop_on_entry is not None:
|
81
80
|
job['args']['stop_on_entry'] = stop_on_entry
|
82
81
|
return Job.create(
|
@@ -85,7 +84,7 @@ class ModelRevision(object):
|
|
85
84
|
|
86
85
|
|
87
86
|
@staticmethod
|
88
|
-
def create(revision, parentHash=None
|
87
|
+
def create(revision, parentHash=None):
|
89
88
|
"""
|
90
89
|
创建一个新版本
|
91
90
|
|
@@ -96,11 +95,12 @@ class ModelRevision(object):
|
|
96
95
|
>>> ModelRevision.create(model.revision)
|
97
96
|
{hash:'4043acbddb9ce0c6174be65573c0380415bc48186c74a459f88865313743230c'}
|
98
97
|
"""
|
98
|
+
|
99
99
|
r = revision.toJSON()
|
100
100
|
if 'hash' in r:
|
101
101
|
del r['hash']
|
102
102
|
variables = {'a': {**r, 'parent': parentHash}}
|
103
|
-
r = graphql_request(ModelRevision.__createModelRevisionQuery, variables
|
103
|
+
r = graphql_request(ModelRevision.__createModelRevisionQuery, variables)
|
104
104
|
if 'errors' in r:
|
105
105
|
raise Exception(r['errors'])
|
106
106
|
|
cloudpss/runner/runner.py
CHANGED
@@ -7,7 +7,6 @@ import random
|
|
7
7
|
from deprecated import deprecated
|
8
8
|
|
9
9
|
from cloudpss.utils.graphqlUtil import graphql_request
|
10
|
-
from cloudpss.utils.parseDebugArgs import parse_debug_args
|
11
10
|
from .receiver import Receiver
|
12
11
|
from .MessageStreamReceiver import MessageStreamReceiver
|
13
12
|
from .result import IESLabSimulationResult, PowerFlowResult, EMTResult, Result, IESResult
|
@@ -165,12 +164,9 @@ class Runner(Generic[T]):
|
|
165
164
|
debug = job["args"].get("@debug", None )
|
166
165
|
debugargs={}
|
167
166
|
if debug is not None:
|
168
|
-
|
169
|
-
|
170
|
-
debugargs
|
171
|
-
# t= [ i.split('=') for i in re.split(r'\s+',debug) if i.find('=')>0]
|
172
|
-
# for i in t:
|
173
|
-
# debugargs[i[0]]=i[1]
|
167
|
+
t= [ i.split('=') for i in re.split(r'\s+',debug) if i.find('=')>0]
|
168
|
+
for i in t:
|
169
|
+
debugargs[i[0]]=i[1]
|
174
170
|
|
175
171
|
context= [
|
176
172
|
function,
|
cloudpss/utils/graphqlUtil.py
CHANGED
@@ -3,9 +3,9 @@ import json
|
|
3
3
|
from cloudpss.utils import request
|
4
4
|
|
5
5
|
|
6
|
-
def graphql_request(query, variables=None,
|
6
|
+
def graphql_request(query, variables=None, **kwargs):
|
7
7
|
payload = {'query': query, 'variables': variables}
|
8
8
|
|
9
|
-
r = request('POST', 'graphql', data=json.dumps(payload),
|
9
|
+
r = request('POST', 'graphql', data=json.dumps(payload), **kwargs)
|
10
10
|
|
11
11
|
return json.loads(r.text)
|
cloudpss/utils/httprequests.py
CHANGED
@@ -12,8 +12,7 @@ def request(method, uri, baseUrl=None, params={}, token=None, **kwargs):
|
|
12
12
|
if baseUrl == None:
|
13
13
|
baseUrl = os.environ.get('CLOUDPSS_API_URL', 'https://cloudpss.net/')
|
14
14
|
url = requests.compat.urljoin(baseUrl,uri)
|
15
|
-
|
16
|
-
token = os.environ.get('CLOUDPSS_TOKEN', None)
|
15
|
+
token = os.environ.get('CLOUDPSS_TOKEN', None)
|
17
16
|
|
18
17
|
if token:
|
19
18
|
headers = {
|
cloudpss/version.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = '4.
|
1
|
+
__version__ = '4.6.0.alpha.1'
|
@@ -1,6 +1,6 @@
|
|
1
1
|
cloudpss/__init__.py,sha256=xnA-UjehYOzH6KV7vOXHwdbGEiw6g_OPKzrbZA9Fuc8,858
|
2
2
|
cloudpss/verify.py,sha256=KF4Gd59DGvCyIEkRD7rNnekWw22XxJpi3DW6keb6j4c,1498
|
3
|
-
cloudpss/version.py,sha256=
|
3
|
+
cloudpss/version.py,sha256=bnUXpy4I7SO5JlXeYIZ1EEl4BE6AC5O9knxDh64dsTU,30
|
4
4
|
cloudpss/asyncio/__init__.py,sha256=CJGopQl_vz3z3fJsK7NjMX5uzkzfrJrbqKVhyYqlYWc,198
|
5
5
|
cloudpss/asyncio/job/__init__.py,sha256=3UIFZYjJTzuckM61o8kim1c3PWt2SSHTL72jrGu5IzI,51
|
6
6
|
cloudpss/asyncio/job/job.py,sha256=Bn2BEERw1J8YarFauTzVrGJK7nmaoMsdlrFUqiHRth4,3897
|
@@ -24,21 +24,21 @@ cloudpss/function/__init__.py,sha256=TNzChB-gQF6oB62F423evpUlgcp6s03D4pKKs89Lz4Q
|
|
24
24
|
cloudpss/function/function.py,sha256=llomkfnTmKMiFJYJ2mKnmAEoIjTNVCnjCUUyiJMOV1s,29
|
25
25
|
cloudpss/function/functionExecution.py,sha256=YM2hS0Ao3jhMJodqFfxk0JAK7ZR00MPh-U2foBWshT0,16897
|
26
26
|
cloudpss/function/job.py,sha256=LdzaTyjvBcMZIyLstSZnt79d2eREljx2HnNoilDp03A,13162
|
27
|
-
cloudpss/ieslab/DataManageModel.py,sha256=
|
27
|
+
cloudpss/ieslab/DataManageModel.py,sha256=mgZyM-EbV5X-tphfxu5sz9TPjO0xlWnMRTCptI4eXzQ,26513
|
28
28
|
cloudpss/ieslab/EvaluationModel.py,sha256=hGZmuaB8lL9LVti_TCG-qCfK_bA-HJgdxYt7oMmVrXY,9399
|
29
29
|
cloudpss/ieslab/IESLabOpt.py,sha256=D2iDbi80ohvU7wKelb-Uk6FP_S0rbZyHfWwlBbQYYPc,9379
|
30
30
|
cloudpss/ieslab/IESLabPlan.py,sha256=rEf1W2pT_J3C8-TFFHVm8Llli9ySSXbBeRpd6Yz9Glk,8345
|
31
31
|
cloudpss/ieslab/IESLabSimulation.py,sha256=-EJFkhklN9ao-nbfk7Lz6JCHboFCSDcn5R2jr3_Z7_A,4046
|
32
|
-
cloudpss/ieslab/PlanModel.py,sha256=
|
32
|
+
cloudpss/ieslab/PlanModel.py,sha256=OBhYz-CiyvaoX7xEO9Gs4w_qUdzOiD2gcHyuBwvS0-c,12875
|
33
33
|
cloudpss/ieslab/__init__.py,sha256=gr1rXYw9vIAGOe60eg7LyMHP7QDXvNf4dJ5GTR_kj1Y,232
|
34
34
|
cloudpss/job/TemplateCompiler.py,sha256=MuJDTQ54wRo5bGSvBJBJjXJ7u463dwpRkaLwIwm_hLE,9936
|
35
35
|
cloudpss/job/TemplateManager.py,sha256=uOvctmE3P17aGWt_26d940FbRUSEs6iovFBb8T5xjd4,1115
|
36
36
|
cloudpss/job/__init__.py,sha256=3UIFZYjJTzuckM61o8kim1c3PWt2SSHTL72jrGu5IzI,51
|
37
|
-
cloudpss/job/job.py,sha256=
|
37
|
+
cloudpss/job/job.py,sha256=pV-J0VBnyExIabzt2hMnIvLFdowWz-QT0DuR80Gv9AE,8297
|
38
38
|
cloudpss/job/jobReceiver.py,sha256=PNYxcN33LiXZVyc4tzhPlpWxKnyWO_ElKjJ9wsxsroI,925
|
39
|
-
cloudpss/job/messageStreamReceiver.py,sha256=
|
40
|
-
cloudpss/job/messageStreamSender.py,sha256=
|
41
|
-
cloudpss/job/result/EMTResult.py,sha256=
|
39
|
+
cloudpss/job/messageStreamReceiver.py,sha256=r5ZKRopDGDhyzu_46xe-uf8ISZB_7GZNHl88uZYYf94,5360
|
40
|
+
cloudpss/job/messageStreamSender.py,sha256=QQO6XtoZNLiUJXeSZmim-XFDBrb9i-JAjMPHKXcscZA,2365
|
41
|
+
cloudpss/job/result/EMTResult.py,sha256=0PVmGSkXSllkwIbGBxqPTmWNk7uGvT5FvqvphiIY38Y,8008
|
42
42
|
cloudpss/job/result/IESLabSimulationResult.py,sha256=a47Ic1vvfHTK_vEokOZxJBnQReqYOWux_aePPic_Hrs,84
|
43
43
|
cloudpss/job/result/IESLabTypicalDayResult.py,sha256=tpWfN3G34l3qSXaTDDdPRSTXR4p7jY3AlP7o9e-A3VI,9554
|
44
44
|
cloudpss/job/result/IESResult.py,sha256=sLTdwZLE2HyZZNvJATgibsOPm3lqYquvLyOJjEgfog0,4027
|
@@ -47,12 +47,12 @@ cloudpss/job/result/__init__.py,sha256=dRWZNoX33cukgrNl6sMkQM3hdQrGHCpwIktoayrpP
|
|
47
47
|
cloudpss/job/result/result.py,sha256=UvtHWNPhVq1NsmuE4m-iy9BywacgLCYRfQMEBusFdpc,4290
|
48
48
|
cloudpss/model/__init__.py,sha256=SNq-bfwcQtDHtTNBYppfUEs8wkjfrQfGeywx7igmvOs,151
|
49
49
|
cloudpss/model/jobDefinitions.py,sha256=uuTwpqStlg3YDmfxbU2PVi_Tf18opa0kYLCMGaOP-qA,3749
|
50
|
-
cloudpss/model/model.py,sha256=
|
51
|
-
cloudpss/model/revision.py,sha256=
|
50
|
+
cloudpss/model/model.py,sha256=UOtHdqS6ARPSWoMKllryqJ4PZg_mJefu6FB2wWZlOWo,26782
|
51
|
+
cloudpss/model/revision.py,sha256=IFznBKirwpfqadyCNJWPGL7lTpQxbCmU1fxdI5AvoA4,4002
|
52
52
|
cloudpss/model/topology.py,sha256=MJF3rQBLWus4RVO6L3Zwih7SWYjRWsLMcrcIBxCmIwM,2617
|
53
53
|
cloudpss/model/implements/__init__.py,sha256=88L_wF9SSzxsbtqwStWIPH4LxaKq7TVcssHQ62YBnls,67
|
54
54
|
cloudpss/model/implements/component.py,sha256=uNSpkZKChdXLiO40Ev4P3oQ1di2Hu4YjcBOb0I8Bf0c,734
|
55
|
-
cloudpss/model/implements/diagram.py,sha256=
|
55
|
+
cloudpss/model/implements/diagram.py,sha256=ILBq7oZVb2ZThmm_HdwGmGX0sZPwetoT4SSVN0xFqzo,6053
|
56
56
|
cloudpss/model/implements/implement.py,sha256=Uld96tjXVDbVUNV8xscyy_nZWLHr3iP2DqA6S3p-XJE,954
|
57
57
|
cloudpss/project/__init__.py,sha256=fpskY-cJGmMcTg1naVzNPtJaRG1xmSc2CFjDTin64Cw,51
|
58
58
|
cloudpss/project/project.py,sha256=uFhOnM8ngo1_ZYz2uArtORKZquYNdOIVLXU_q1MDFI4,17698
|
@@ -64,18 +64,18 @@ cloudpss/runner/MessageStreamReceiver.py,sha256=dT-rKslQbRt3bMTGXupa1YrocHl2zTWO
|
|
64
64
|
cloudpss/runner/__init__.py,sha256=FxiYYmssbZgRjieySzi43yPiWEF6eNos2UsoFQeD2H8,341
|
65
65
|
cloudpss/runner/receiver.py,sha256=QU0RsbCt0EK7sCLHzfj8_QQsuPNfqXxpZi5JKm6roxA,4162
|
66
66
|
cloudpss/runner/result.py,sha256=Q8RcfUnvilxPo6yvtjH6dXePaCqrBjQCljur3rem2pU,13290
|
67
|
-
cloudpss/runner/runner.py,sha256=
|
67
|
+
cloudpss/runner/runner.py,sha256=oCK1PdDNArk25v9S7xvE5r6xfQu0EKHKuxKQN0CLUHE,10093
|
68
68
|
cloudpss/runner/storage.py,sha256=zFET_zwPIOF2Cnh9sgFiS0HFxV1OmVsU34bGUQ6PpkA,4162
|
69
69
|
cloudpss/runner/transform.py,sha256=krOgTZiJSJAb5QSwerAqlbC4Ma0PKi__0WOZlAxw4O8,11613
|
70
70
|
cloudpss/utils/IO.py,sha256=FsFp3V8I1-P0YiBGmjKwbMalBrVKMHUxTjFZFOtv0CQ,5357
|
71
71
|
cloudpss/utils/__init__.py,sha256=jWVHSOqJQWU0fpg2UbWSEQoLCb2Uys-vH5Uqkb0ihNA,326
|
72
72
|
cloudpss/utils/dataEncoder.py,sha256=5PUPb844eOGgFnYrMM8bdjdKH_MZz0lk-67uo8TvwEo,885
|
73
|
-
cloudpss/utils/graphqlUtil.py,sha256=
|
74
|
-
cloudpss/utils/httprequests.py,sha256=
|
73
|
+
cloudpss/utils/graphqlUtil.py,sha256=zGEhRZvy5JMipFKFxjDmbc-HQP3aPZ5noDwi-RTXWSk,280
|
74
|
+
cloudpss/utils/httprequests.py,sha256=Ewxc3AWarQp46-kDTasUC18TfIRpuuBSh5I9wvK0aCI,1881
|
75
75
|
cloudpss/utils/matlab.py,sha256=SLwVt790BjklJK2XNELt9R2n_1ej9Y8QsTIdFkKXLWE,795
|
76
76
|
cloudpss/utils/parseDebugArgs.py,sha256=r8EptSHG9D-U7dT3pHFDclL-8G2La9w4GEjUAY-rsMc,3174
|
77
77
|
cloudpss/utils/yamlLoader.py,sha256=bv_vPDK_e0n_vZ5FwpDJ_NJWqMAwfU3AbhkvQIxPCy4,2677
|
78
|
-
cloudpss-4.
|
79
|
-
cloudpss-4.
|
80
|
-
cloudpss-4.
|
81
|
-
cloudpss-4.
|
78
|
+
cloudpss-4.6.0a1.dist-info/METADATA,sha256=wyDAzQypQ58Yt-OlQHaDHv7QLhEFTXFZ-yAG3qPf1M0,2403
|
79
|
+
cloudpss-4.6.0a1.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
80
|
+
cloudpss-4.6.0a1.dist-info/top_level.txt,sha256=wS9qPU4-aWM9ouzMOx34Nlq-GkdQKpr9vBskwut1BD8,9
|
81
|
+
cloudpss-4.6.0a1.dist-info/RECORD,,
|
File without changes
|
File without changes
|