cloudpss 4.1.1a1__tar.gz → 4.1.1a2__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.1.1a1 → cloudpss-4.1.1a2}/PKG-INFO +1 -1
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/job/messageStreamReceiver.py +4 -5
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/job/messageStreamSender.py +4 -2
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/model/topology.py +7 -2
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/utils/httpAsyncRequest.py +1 -0
- cloudpss-4.1.1a2/cloudpss/version.py +1 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss.egg-info/PKG-INFO +1 -1
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss.egg-info/requires.txt +1 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/setup.py +1 -1
- cloudpss-4.1.1a1/cloudpss/version.py +0 -1
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/README.md +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/__init__.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/function/__init__.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/function/function.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/function/functionExecution.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/function/job.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/ieslab/DataManageModel.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/ieslab/EvaluationModel.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/ieslab/IESLabPlan.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/ieslab/IESLabSimulation.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/ieslab/PlanModel.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/ieslab/__init__.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/job/__init__.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/job/job.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/job/jobMachine.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/job/jobPolicy.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/job/jobQueue.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/job/jobReceiver.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/job/jobTres.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/job/view/EMTView.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/job/view/IESLabSimulationView.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/job/view/IESLabTypicalDayView.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/job/view/IESView.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/job/view/PowerFlowView.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/job/view/__init__.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/job/view/view.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/model/__init__.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/model/implements/__init__.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/model/implements/component.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/model/implements/diagram.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/model/implements/implement.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/model/jobDefinitions.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/model/model.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/model/revision.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/project/__init__.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/project/project.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/runner/IESLabEvaluationResult.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/runner/IESLabPlanResult.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/runner/IESLabTypicalDayResult.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/runner/MessageStreamReceiver.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/runner/__init__.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/runner/receiver.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/runner/result.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/runner/runner.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/runner/storage.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/runner/transform.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/utils/AsyncIterable.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/utils/IO.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/utils/__init__.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/utils/dataEncoder.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/utils/graphqlUtil.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/utils/httprequests.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/utils/matlab.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/utils/yamlLoader.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss/verify.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss.egg-info/SOURCES.txt +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss.egg-info/dependency_links.txt +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/cloudpss.egg-info/top_level.txt +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/setup.cfg +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/test/test-sdk.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/test/test-snapshot.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/test/test-topology.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/test/test.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/test/test7950.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/test/testAsync.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/test/testEvent.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/test/testRt copy.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/test/testRt.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/test/testSend.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/test/test_in_new_web_1.py +0 -0
- {cloudpss-4.1.1a1 → cloudpss-4.1.1a2}/test/testb.py +0 -0
@@ -42,8 +42,8 @@ class MessageStreamReceiver(JobReceiver):
|
|
42
42
|
path = head + "://" + str(u[1]) + "/api/streams/id/" + id
|
43
43
|
if fr0m is not None:
|
44
44
|
path = path + "&from=" + str(fr0m)
|
45
|
-
logging.info(f"
|
46
|
-
ws =
|
45
|
+
logging.info(f"MessageStreamReceiver data from websocket: {path}")
|
46
|
+
ws =await websocket_connect(
|
47
47
|
path,
|
48
48
|
open_func=on_open,
|
49
49
|
receive_func=on_message,
|
@@ -58,9 +58,7 @@ class MessageStreamReceiver(JobReceiver):
|
|
58
58
|
def on_message(self, message):
|
59
59
|
data = IO.deserialize(message, "ubjson")
|
60
60
|
msg = IO.deserialize(data["data"], "ubjson")
|
61
|
-
|
62
|
-
if msg.get("type", None) == "log" and self.dev:
|
63
|
-
print(msg)
|
61
|
+
print(msg)
|
64
62
|
self.messages.append(msg)
|
65
63
|
# if msg and type(msg) is dict and msg.get('type', None) == 'terminate':
|
66
64
|
# self.close(ws)
|
@@ -93,6 +91,7 @@ class MessageStreamReceiver(JobReceiver):
|
|
93
91
|
self.messages.append(msg)
|
94
92
|
|
95
93
|
def on_open(self):
|
94
|
+
logging.info(f"MessageStreamReceiver on_open")
|
96
95
|
self._status = 1
|
97
96
|
self.__hasOpen = True
|
98
97
|
pass
|
@@ -52,15 +52,17 @@ class MessageStreamSender:
|
|
52
52
|
self.ws.send_bytes(data)
|
53
53
|
|
54
54
|
async def connect(self):
|
55
|
-
logging.info("connect")
|
56
55
|
self._status = 0
|
57
56
|
if self.job.input is None:
|
58
57
|
raise Exception("id is None")
|
58
|
+
if self.job.input=='00000000-0000-0000-0000-000000000000':
|
59
|
+
return
|
59
60
|
u = list(urlparse(self.origin))
|
60
61
|
head = "wss" if u[0] == "https" else "ws"
|
62
|
+
|
61
63
|
|
62
64
|
path = head + "://" + str(u[1]) + "/api/streams/token/" + self.job.input
|
63
|
-
logging.info(f"
|
65
|
+
logging.info(f"MessageStreamSender data from websocket: {path}")
|
64
66
|
|
65
67
|
self.ws = await websocket_connect(
|
66
68
|
path,
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import asyncio
|
1
2
|
import json
|
2
3
|
|
3
4
|
from cloudpss.utils.httpAsyncRequest import graphql_fetch
|
@@ -44,9 +45,13 @@ class ModelTopology():
|
|
44
45
|
f = open(filePath, 'w', encoding='utf-8')
|
45
46
|
json.dump(data, f, indent=indent)
|
46
47
|
f.close()
|
47
|
-
|
48
|
+
|
49
|
+
@staticmethod
|
50
|
+
def fetch(hash, implementType, config, maximumDepth=None):
|
51
|
+
return asyncio.run(ModelTopology.fetchAsync(hash, implementType, config, maximumDepth))
|
52
|
+
|
48
53
|
@staticmethod
|
49
|
-
async def
|
54
|
+
async def fetchAsync(hash, implementType, config, maximumDepth=None):
|
50
55
|
"""
|
51
56
|
获取拓扑
|
52
57
|
|
@@ -74,6 +74,7 @@ async def websocket_connect(url, open_func, receive_func, closed_func, error_fun
|
|
74
74
|
# ws.register_callback("error", lambda: error_func())
|
75
75
|
open_func()
|
76
76
|
async for msg in ws:
|
77
|
+
|
77
78
|
if msg.type == WSMsgType.BINARY:
|
78
79
|
receive_func(msg.data)
|
79
80
|
if msg.type == WSMsgType.TEXT:
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = '4.1.1-alpha.2'
|
@@ -24,6 +24,6 @@ setup(
|
|
24
24
|
python_requires='>=3.7',
|
25
25
|
install_requires=[
|
26
26
|
'cffi', 'cryptography', 'cycler', 'pycparser', 'PyJWT', 'numpy',
|
27
|
-
'PyYAML', 'requests', 'websocket-client', 'pytz', 'deprecated','py-ubjson','aiohttp'
|
27
|
+
'PyYAML', 'requests', 'websocket-client', 'pytz', 'deprecated','py-ubjson','aiohttp','zstandard'
|
28
28
|
],
|
29
29
|
)
|
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = '4.1.1-alpha.1'
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|