cloudpss 4.0.14__tar.gz → 4.0.16__tar.gz
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-4.0.14 → cloudpss-4.0.16}/PKG-INFO +1 -1
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/model/model.py +8 -5
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/runner/MessageStreamReceiver.py +3 -3
- cloudpss-4.0.16/cloudpss/version.py +1 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss.egg-info/PKG-INFO +1 -1
- {cloudpss-4.0.14 → cloudpss-4.0.16}/test/test.py +4 -5
- cloudpss-4.0.14/cloudpss/version.py +0 -1
- {cloudpss-4.0.14 → cloudpss-4.0.16}/README.md +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/__init__.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/function/__init__.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/function/function.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/function/functionExecution.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/function/job.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/ieslab/DataManageModel.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/ieslab/EvaluationModel.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/ieslab/IESLabPlan.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/ieslab/IESLabSimulation.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/ieslab/PlanModel.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/ieslab/__init__.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/model/__init__.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/model/implements/__init__.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/model/implements/component.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/model/implements/diagram.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/model/implements/implement.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/model/jobDefinitions.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/model/revision.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/model/topology.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/project/__init__.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/project/project.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/runner/IESLabEvaluationResult.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/runner/IESLabPlanResult.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/runner/IESLabTypicalDayResult.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/runner/__init__.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/runner/receiver.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/runner/result.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/runner/runner.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/runner/storage.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/runner/transform.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/utils/IO.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/utils/__init__.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/utils/dataEncoder.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/utils/graphqlUtil.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/utils/httprequests.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/utils/matlab.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/utils/yamlLoader.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss/verify.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss.egg-info/SOURCES.txt +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss.egg-info/dependency_links.txt +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss.egg-info/requires.txt +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/cloudpss.egg-info/top_level.txt +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/setup.cfg +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/setup.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/test/test-async.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/test/test-async2.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/test/test-async3.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/test/test-plot.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/test/test-sdk.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/test/test-sdk1.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/test/test-snapshot.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/test/test-topology.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/test/test-topology1.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/test/test-yield.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/test/test7950.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/test/testAsync.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/test/testEvent.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/test/testRt-test.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/test/testRt.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/test/testRt2.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/test/testSend.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/test/test_in_new_web_1.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/test/test_ws.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/test/test_ws2.py +0 -0
- {cloudpss-4.0.14 → cloudpss-4.0.16}/test/testb.py +0 -0
@@ -394,7 +394,6 @@ class Model(object):
|
|
394
394
|
if matchObj:
|
395
395
|
self.rid = 'model/' + username + '/' + key
|
396
396
|
try:
|
397
|
-
r = request('GET', 'api/resources/' + self.rid)
|
398
397
|
return Model.update(self)
|
399
398
|
except:
|
400
399
|
return Model.create(self)
|
@@ -408,7 +407,6 @@ class Model(object):
|
|
408
407
|
elif owner[0] != username:
|
409
408
|
rid = re.sub(t, username, self.rid)
|
410
409
|
try:
|
411
|
-
r = request('GET', 'api/resources/' + self.rid)
|
412
410
|
return Model.create(self)
|
413
411
|
except:
|
414
412
|
raise Exception(rid + ' 该资源已存在,无法重复创建,请修改 key')
|
@@ -448,7 +446,7 @@ class Model(object):
|
|
448
446
|
auth = (65539 if publicRead else 65537) if isPublic else 0
|
449
447
|
revision = ModelRevision.create(model.revision, model.revision.hash)
|
450
448
|
|
451
|
-
|
449
|
+
r= graphql_request(
|
452
450
|
modelQuery, {
|
453
451
|
'a': {
|
454
452
|
'rid': model.rid,
|
@@ -466,7 +464,9 @@ class Model(object):
|
|
466
464
|
},
|
467
465
|
}
|
468
466
|
})
|
469
|
-
|
467
|
+
if "errors" in r:
|
468
|
+
raise Exception(r["errors"][0]["message"])
|
469
|
+
return r
|
470
470
|
@staticmethod
|
471
471
|
def update(model):
|
472
472
|
"""
|
@@ -506,7 +506,7 @@ class Model(object):
|
|
506
506
|
if xVersion==3:
|
507
507
|
tags=model.tags
|
508
508
|
|
509
|
-
|
509
|
+
r= graphql_request(
|
510
510
|
modelQuery, {
|
511
511
|
'a': {
|
512
512
|
'rid': model.rid,
|
@@ -524,6 +524,9 @@ class Model(object):
|
|
524
524
|
},
|
525
525
|
}
|
526
526
|
})
|
527
|
+
if "errors" in r:
|
528
|
+
raise Exception(r["errors"][0]["message"])
|
529
|
+
return r
|
527
530
|
|
528
531
|
def fetchTopology(
|
529
532
|
self,
|
@@ -46,13 +46,13 @@ class MessageStreamReceiver(object):
|
|
46
46
|
path = head + '://' + str(u[1]) + '/api/streams/id/' + id
|
47
47
|
if fr0m is not None:
|
48
48
|
path = path + '&from=' + str(fr0m)
|
49
|
-
ws = websocket.WebSocketApp(path,
|
49
|
+
self.ws = websocket.WebSocketApp(path,
|
50
50
|
on_open=on_open,
|
51
51
|
on_message=on_message,
|
52
52
|
on_error=on_error,
|
53
53
|
on_close=on_close)
|
54
|
-
ws.run_forever()
|
55
|
-
return ws
|
54
|
+
self.ws.run_forever()
|
55
|
+
return self.ws
|
56
56
|
|
57
57
|
###下面是兼容Receiver部分功能实现
|
58
58
|
def on_message(self, ws, message):
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = '4.0.16'
|
@@ -16,15 +16,14 @@ if __name__ == '__main__':
|
|
16
16
|
cloudpss.setToken(
|
17
17
|
'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhZG1pbiIsInNjb3BlcyI6WyJtb2RlbDo5ODMzNSIsImZ1bmN0aW9uOjk4MzM1IiwiYXBwbGljYXRpb246OTgzMzUiXSwicm9sZXMiOlsiYWRtaW4iXSwidHlwZSI6ImFwcGx5IiwiZXhwIjoxNzI0NTU3MDIzLCJub3RlIjoiYSIsImlhdCI6MTY5MzQ1MzAyM30._Xuyo62ESKLcIAFeNdnfBM44yPiiXli9OPKvXDzL2rPV4J1_qsGZP--bsS1tXAVy-x8ooUIIAAG1yhwmZuk7-Q')
|
18
18
|
print('Token done')
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
# project = cloudpss.Model.fetch('model/admin/7744b02b-0636-5a39-8c16-eca939259ee1')
|
19
|
+
project = cloudpss.Model.fetch('model/admin/aaaa')
|
20
|
+
project.save(key='asdfasd111')
|
21
|
+
# topology =project.fetchTopology()
|
23
22
|
# topology = cloudpss.ModelTopology.fetch("-xrS3SewFhpVYKBtIXLk-XDLCQRQnUmlIbXS3s4sdPUkPKeAMhXHjRgZD1JPjPfQ","emtp",{'args':{}})
|
24
23
|
|
25
24
|
|
26
25
|
|
27
|
-
#
|
26
|
+
# topology= project.fetchTopology(config={'args':{}})
|
28
27
|
|
29
28
|
# topology.dump(topology,'test.json')
|
30
29
|
|
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = '4.0.14'
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|