cloudpss 4.0.17__tar.gz → 4.0.18__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.18}/PKG-INFO +1 -1
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/runner/MessageStreamReceiver.py +1 -1
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/runner/runner.py +12 -6
- cloudpss-4.0.18/cloudpss/version.py +1 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss.egg-info/PKG-INFO +1 -1
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss.egg-info/requires.txt +1 -1
- {cloudpss-4.0.17 → cloudpss-4.0.18}/setup.py +1 -1
- cloudpss-4.0.18/test/test.py +29 -0
- 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.18}/README.md +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/__init__.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/function/__init__.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/function/function.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/function/functionExecution.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/function/job.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/ieslab/DataManageModel.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/ieslab/EvaluationModel.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/ieslab/IESLabPlan.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/ieslab/IESLabSimulation.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/ieslab/PlanModel.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/ieslab/__init__.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/model/__init__.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/model/implements/__init__.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/model/implements/component.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/model/implements/diagram.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/model/implements/implement.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/model/jobDefinitions.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/model/model.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/model/revision.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/model/topology.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/project/__init__.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/project/project.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/runner/IESLabEvaluationResult.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/runner/IESLabPlanResult.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/runner/IESLabTypicalDayResult.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/runner/__init__.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/runner/receiver.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/runner/result.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/runner/storage.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/runner/transform.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/utils/IO.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/utils/__init__.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/utils/dataEncoder.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/utils/graphqlUtil.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/utils/httprequests.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/utils/matlab.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/utils/yamlLoader.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/verify.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss.egg-info/SOURCES.txt +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss.egg-info/dependency_links.txt +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss.egg-info/top_level.txt +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/setup.cfg +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/test/test-async.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/test/test-async2.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/test/test-async3.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/test/test-plot.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/test/test-sdk.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/test/test-sdk1.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/test/test-snapshot.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/test/test-topology.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/test/test-topology1.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/test/test-yield.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/test/test7950.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/test/testAsync.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/test/testEvent.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/test/testRt-test.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/test/testRt.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/test/testRt2.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/test/testSend.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/test/test_in_new_web_1.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/test/test_ws.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/test/test_ws2.py +0 -0
- {cloudpss-4.0.17 → cloudpss-4.0.18}/test/testb.py +0 -0
@@ -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.18'
|
@@ -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
|
+
|
@@ -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
|
File without changes
|
File without changes
|
File without changes
|