cloudpss 4.0.17__tar.gz → 4.0.19__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.17 → cloudpss-4.0.19}/PKG-INFO +1 -1
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/function/functionExecution.py +10 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/runner/MessageStreamReceiver.py +1 -1
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/runner/runner.py +12 -6
- cloudpss-4.0.19/cloudpss/version.py +1 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss.egg-info/PKG-INFO +1 -1
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss.egg-info/requires.txt +1 -1
- {cloudpss-4.0.17 → cloudpss-4.0.19}/setup.py +1 -1
- cloudpss-4.0.19/test/test.py +29 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/test/testRt.py +8 -6
- {cloudpss-4.0.17 → cloudpss-4.0.19}/test/testRt2.py +1 -1
- cloudpss-4.0.17/cloudpss/version.py +0 -1
- cloudpss-4.0.17/test/test.py +0 -42
- {cloudpss-4.0.17 → cloudpss-4.0.19}/README.md +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/__init__.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/function/__init__.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/function/function.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/function/job.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/ieslab/DataManageModel.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/ieslab/EvaluationModel.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/ieslab/IESLabPlan.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/ieslab/IESLabSimulation.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/ieslab/PlanModel.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/ieslab/__init__.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/model/__init__.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/model/implements/__init__.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/model/implements/component.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/model/implements/diagram.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/model/implements/implement.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/model/jobDefinitions.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/model/model.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/model/revision.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/model/topology.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/project/__init__.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/project/project.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/runner/IESLabEvaluationResult.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/runner/IESLabPlanResult.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/runner/IESLabTypicalDayResult.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/runner/__init__.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/runner/receiver.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/runner/result.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/runner/storage.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/runner/transform.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/utils/IO.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/utils/__init__.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/utils/dataEncoder.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/utils/graphqlUtil.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/utils/httprequests.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/utils/matlab.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/utils/yamlLoader.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss/verify.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss.egg-info/SOURCES.txt +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss.egg-info/dependency_links.txt +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/cloudpss.egg-info/top_level.txt +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/setup.cfg +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/test/test-async.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/test/test-async2.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/test/test-async3.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/test/test-plot.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/test/test-sdk.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/test/test-sdk1.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/test/test-snapshot.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/test/test-topology.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/test/test-topology1.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/test/test-yield.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/test/test7950.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/test/testAsync.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/test/testEvent.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/test/testRt-test.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/test/testSend.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/test/test_in_new_web_1.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/test/test_ws.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/test/test_ws2.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.19}/test/testb.py +0 -0
@@ -419,4 +419,14 @@ class FunctionExecution(object):
|
|
419
419
|
'yAxis': layout.get('yaxis', {}),
|
420
420
|
}
|
421
421
|
}
|
422
|
+
self.print(result)
|
423
|
+
|
424
|
+
def custom(self, data, key=None,verb='replace'):
|
425
|
+
result = {
|
426
|
+
'key': key,
|
427
|
+
'version': 1,
|
428
|
+
'verb': verb,
|
429
|
+
'type': 'custom',
|
430
|
+
'data': data
|
431
|
+
}
|
422
432
|
self.print(result)
|
@@ -143,6 +143,16 @@ class Runner(Generic[T]):
|
|
143
143
|
t= [ i.split('=') for i in re.split(r'\s+',debug) if i.find('=')>0]
|
144
144
|
for i in t:
|
145
145
|
debugargs[i[0]]=i[1]
|
146
|
+
|
147
|
+
context= [
|
148
|
+
function,
|
149
|
+
rid,
|
150
|
+
f"model/@sdk/{str(int(time.time() * random.random()))}",
|
151
|
+
]
|
152
|
+
|
153
|
+
PARENT_JOB_ID =kwargs.get("PARENT_JOB_ID",None)
|
154
|
+
if PARENT_JOB_ID is not None:
|
155
|
+
context.append(f"job/parent/{PARENT_JOB_ID}")
|
146
156
|
variables = {
|
147
157
|
"input": {
|
148
158
|
"args": {
|
@@ -151,11 +161,7 @@ class Runner(Generic[T]):
|
|
151
161
|
"_ModelArgs": config["args"],
|
152
162
|
"implement":implement
|
153
163
|
},
|
154
|
-
"context":
|
155
|
-
function,
|
156
|
-
rid,
|
157
|
-
f"model/@sdk/{str(int(time.time() * random.random()))}",
|
158
|
-
],
|
164
|
+
"context": context,
|
159
165
|
"policy": policy,
|
160
166
|
"debug":debugargs
|
161
167
|
}
|
@@ -185,7 +191,7 @@ class Runner(Generic[T]):
|
|
185
191
|
|
186
192
|
|
187
193
|
query = '''mutation($input:CreateJobInput!){job:createJob(input:$input){id input output status position}}'''
|
188
|
-
variables = Runner.__createJobVariables(job, config, revisionHash, rid,policy)
|
194
|
+
variables = Runner.__createJobVariables(job, config, revisionHash, rid,policy, **kwargs)
|
189
195
|
r = graphql_request(query, variables)
|
190
196
|
if 'errors' in r:
|
191
197
|
raise Exception(r['errors'])
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = '4.0.19'
|
@@ -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','zstandard','py-ubjson'
|
27
|
+
'PyYAML', 'requests', 'websocket-client>=1.4.0', 'pytz', 'deprecated','zstandard','py-ubjson'
|
28
28
|
],
|
29
29
|
)
|
@@ -0,0 +1,29 @@
|
|
1
|
+
|
2
|
+
import time
|
3
|
+
import sys
|
4
|
+
import os
|
5
|
+
|
6
|
+
sys.path.append(os.path.join(os.path.dirname(__file__), '..\\'))
|
7
|
+
import cloudpss
|
8
|
+
import time
|
9
|
+
import numpy as np
|
10
|
+
import pandas as pd
|
11
|
+
import json
|
12
|
+
|
13
|
+
if __name__ == '__main__':
|
14
|
+
os.environ['CLOUDPSS_API_URL'] = 'http://10.101.10.45/'
|
15
|
+
print('CLOUDPSS connected')
|
16
|
+
cloudpss.setToken(
|
17
|
+
'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhZG1pbiIsInNjb3BlcyI6WyJtb2RlbDo5ODMzNSIsImZ1bmN0aW9uOjk4MzM1IiwiYXBwbGljYXRpb246OTgzMzUiXSwicm9sZXMiOlsiYWRtaW4iXSwidHlwZSI6ImFwcGx5IiwiZXhwIjoxNzI0NTU3MDIzLCJub3RlIjoiYSIsImlhdCI6MTY5MzQ1MzAyM30._Xuyo62ESKLcIAFeNdnfBM44yPiiXli9OPKvXDzL2rPV4J1_qsGZP--bsS1tXAVy-x8ooUIIAAG1yhwmZuk7-Q')
|
18
|
+
print('Token done')
|
19
|
+
# project = cloudpss.Model.fetch('model/admin/7744b02b-0636-5a39-8c16-eca939259ee1')
|
20
|
+
topology = cloudpss.ModelTopology.fetch("-xrS3SewFhpVYKBtIXLk-XDLCQRQnUmlIbXS3s4sdPUkPKeAMhXHjRgZD1JPjPfQ","emtp",{'args':{}})
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
# topology= project.fetchTopology(config={'args':{}})
|
25
|
+
|
26
|
+
topology.dump(topology,'test.json')
|
27
|
+
|
28
|
+
|
29
|
+
|
@@ -46,7 +46,7 @@ class RealTimeSream(socketio.ClientNamespace):
|
|
46
46
|
virtual_input=self.config['virtual_input']
|
47
47
|
virtual_output=self.config['virtual_output']
|
48
48
|
display=self.config['display']
|
49
|
-
|
49
|
+
data=data['data']
|
50
50
|
d ={}
|
51
51
|
for x,v in display.items():
|
52
52
|
d[v]=x
|
@@ -79,7 +79,8 @@ class RealTimeSream(socketio.ClientNamespace):
|
|
79
79
|
d ={}
|
80
80
|
for x,v in display.items():
|
81
81
|
d[v]=x
|
82
|
-
data =
|
82
|
+
data =msg['data']
|
83
|
+
data =struct.unpack('d'*int(len(data)/8),data)
|
83
84
|
i = 0
|
84
85
|
runTime =0
|
85
86
|
self.series=[]
|
@@ -140,7 +141,7 @@ if __name__ == '__main__':
|
|
140
141
|
# logging.basicConfig(level=logging.DEBUG)
|
141
142
|
job = cloudpss.currentJob()
|
142
143
|
|
143
|
-
remoteAddr= job.args.get('remoteAddr','http://10.101.10.
|
144
|
+
remoteAddr= job.args.get('remoteAddr','http://10.101.10.104:13336/')
|
144
145
|
|
145
146
|
if not remoteAddr.startswith('http://'):
|
146
147
|
remoteAddr='http://'+remoteAddr
|
@@ -154,12 +155,13 @@ if __name__ == '__main__':
|
|
154
155
|
job.custom(inputNumericValue,'numeric')
|
155
156
|
job.custom(outputNumericValue,'output')
|
156
157
|
# print(json.dumps(inputNumericValue),flush=True)
|
158
|
+
# print(json.dumps(outputNumericValue),flush=True)
|
157
159
|
|
158
160
|
def chartCallBack(series):
|
159
|
-
for serie in series:
|
160
|
-
job.plot([serie],key=serie['name'])
|
161
|
+
# for serie in series:
|
162
|
+
# job.plot([serie],key=serie['name'])
|
161
163
|
# job.plot(series,key='test1')
|
162
|
-
|
164
|
+
pass
|
163
165
|
def onStartJob(config):
|
164
166
|
virtual_input=config['virtual_input']
|
165
167
|
virtual_output=config['virtual_output']
|
@@ -134,7 +134,7 @@ if __name__ == '__main__':
|
|
134
134
|
# logging.basicConfig(level=logging.DEBUG)
|
135
135
|
job = cloudpss.currentJob()
|
136
136
|
|
137
|
-
remoteAddr= job.args.get('remoteAddr','http://10.101.10.
|
137
|
+
remoteAddr= job.args.get('remoteAddr','http://10.101.10.104/')
|
138
138
|
|
139
139
|
inputKey= job.args.get('inputKey',None)
|
140
140
|
inputValue= job.args.get('inputValue',None)
|
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = '4.0.17'
|
cloudpss-4.0.17/test/test.py
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
|
2
|
-
import time
|
3
|
-
import sys
|
4
|
-
import os
|
5
|
-
|
6
|
-
sys.path.append(os.path.join(os.path.dirname(__file__), '..\\'))
|
7
|
-
import cloudpss
|
8
|
-
import time
|
9
|
-
import numpy as np
|
10
|
-
import pandas as pd
|
11
|
-
import json
|
12
|
-
|
13
|
-
if __name__ == '__main__':
|
14
|
-
# os.environ['CLOUDPSS_API_URL'] = 'http://10.101.10.45/'
|
15
|
-
# print('CLOUDPSS connected')
|
16
|
-
# cloudpss.setToken(
|
17
|
-
# 'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhZG1pbiIsInNjb3BlcyI6WyJtb2RlbDo5ODMzNSIsImZ1bmN0aW9uOjk4MzM1IiwiYXBwbGljYXRpb246OTgzMzUiXSwicm9sZXMiOlsiYWRtaW4iXSwidHlwZSI6ImFwcGx5IiwiZXhwIjoxNzI0NTU3MDIzLCJub3RlIjoiYSIsImlhdCI6MTY5MzQ1MzAyM30._Xuyo62ESKLcIAFeNdnfBM44yPiiXli9OPKvXDzL2rPV4J1_qsGZP--bsS1tXAVy-x8ooUIIAAG1yhwmZuk7-Q')
|
18
|
-
# print('Token done')
|
19
|
-
# project = cloudpss.Model.fetch('model/admin/aaaa')
|
20
|
-
# project.save(key='asdfasd111')
|
21
|
-
# topology =project.fetchTopology()
|
22
|
-
# topology = cloudpss.ModelTopology.fetch("-xrS3SewFhpVYKBtIXLk-XDLCQRQnUmlIbXS3s4sdPUkPKeAMhXHjRgZD1JPjPfQ","emtp",{'args':{}})
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
# topology= project.fetchTopology(config={'args':{}})
|
27
|
-
|
28
|
-
# topology.dump(topology,'test.json')
|
29
|
-
|
30
|
-
# tk=None
|
31
|
-
tk = 'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhZG1pbiIsInNjb3BlcyI6WyJicm93c2VyIl0sInR5cGUiOiJicm93c2VyIiwiZXhwIjoxNzE2NTM4OTY0LCJpYXQiOjE3MTM4NjA1NjR9.caupiw4utZ_K-OwaHxBnuU0yLYcsNWZXwRuEp80Ij2ENW3ckP7HUUaUBEewfpTYRaXS4MnWq2zz1KJGJnrh_4A'
|
32
|
-
apiURL = 'http://cloudpss-calculate.local.ddns.cloudpss.net/'
|
33
|
-
print('Start')
|
34
|
-
username = 'admin' #用户名
|
35
|
-
projectKey = 'zdh_sx_test'
|
36
|
-
|
37
|
-
cloudpss.setToken(tk)
|
38
|
-
os.environ['CLOUDPSS_API_URL'] = apiURL
|
39
|
-
project = cloudpss.Model.fetch('model/'+username+'/'+projectKey)
|
40
|
-
|
41
|
-
|
42
|
-
|
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
|