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.
Files changed (74) hide show
  1. {cloudpss-4.0.17 → cloudpss-4.0.18}/PKG-INFO +1 -1
  2. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/runner/MessageStreamReceiver.py +1 -1
  3. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/runner/runner.py +12 -6
  4. cloudpss-4.0.18/cloudpss/version.py +1 -0
  5. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss.egg-info/PKG-INFO +1 -1
  6. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss.egg-info/requires.txt +1 -1
  7. {cloudpss-4.0.17 → cloudpss-4.0.18}/setup.py +1 -1
  8. cloudpss-4.0.18/test/test.py +29 -0
  9. cloudpss-4.0.17/cloudpss/version.py +0 -1
  10. cloudpss-4.0.17/test/test.py +0 -42
  11. {cloudpss-4.0.17 → cloudpss-4.0.18}/README.md +0 -0
  12. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/__init__.py +0 -0
  13. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/function/__init__.py +0 -0
  14. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/function/function.py +0 -0
  15. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/function/functionExecution.py +0 -0
  16. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/function/job.py +0 -0
  17. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/ieslab/DataManageModel.py +0 -0
  18. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/ieslab/EvaluationModel.py +0 -0
  19. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/ieslab/IESLabPlan.py +0 -0
  20. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/ieslab/IESLabSimulation.py +0 -0
  21. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/ieslab/PlanModel.py +0 -0
  22. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/ieslab/__init__.py +0 -0
  23. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/model/__init__.py +0 -0
  24. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/model/implements/__init__.py +0 -0
  25. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/model/implements/component.py +0 -0
  26. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/model/implements/diagram.py +0 -0
  27. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/model/implements/implement.py +0 -0
  28. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/model/jobDefinitions.py +0 -0
  29. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/model/model.py +0 -0
  30. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/model/revision.py +0 -0
  31. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/model/topology.py +0 -0
  32. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/project/__init__.py +0 -0
  33. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/project/project.py +0 -0
  34. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/runner/IESLabEvaluationResult.py +0 -0
  35. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/runner/IESLabPlanResult.py +0 -0
  36. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/runner/IESLabTypicalDayResult.py +0 -0
  37. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/runner/__init__.py +0 -0
  38. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/runner/receiver.py +0 -0
  39. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/runner/result.py +0 -0
  40. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/runner/storage.py +0 -0
  41. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/runner/transform.py +0 -0
  42. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/utils/IO.py +0 -0
  43. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/utils/__init__.py +0 -0
  44. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/utils/dataEncoder.py +0 -0
  45. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/utils/graphqlUtil.py +0 -0
  46. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/utils/httprequests.py +0 -0
  47. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/utils/matlab.py +0 -0
  48. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/utils/yamlLoader.py +0 -0
  49. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss/verify.py +0 -0
  50. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss.egg-info/SOURCES.txt +0 -0
  51. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss.egg-info/dependency_links.txt +0 -0
  52. {cloudpss-4.0.17 → cloudpss-4.0.18}/cloudpss.egg-info/top_level.txt +0 -0
  53. {cloudpss-4.0.17 → cloudpss-4.0.18}/setup.cfg +0 -0
  54. {cloudpss-4.0.17 → cloudpss-4.0.18}/test/test-async.py +0 -0
  55. {cloudpss-4.0.17 → cloudpss-4.0.18}/test/test-async2.py +0 -0
  56. {cloudpss-4.0.17 → cloudpss-4.0.18}/test/test-async3.py +0 -0
  57. {cloudpss-4.0.17 → cloudpss-4.0.18}/test/test-plot.py +0 -0
  58. {cloudpss-4.0.17 → cloudpss-4.0.18}/test/test-sdk.py +0 -0
  59. {cloudpss-4.0.17 → cloudpss-4.0.18}/test/test-sdk1.py +0 -0
  60. {cloudpss-4.0.17 → cloudpss-4.0.18}/test/test-snapshot.py +0 -0
  61. {cloudpss-4.0.17 → cloudpss-4.0.18}/test/test-topology.py +0 -0
  62. {cloudpss-4.0.17 → cloudpss-4.0.18}/test/test-topology1.py +0 -0
  63. {cloudpss-4.0.17 → cloudpss-4.0.18}/test/test-yield.py +0 -0
  64. {cloudpss-4.0.17 → cloudpss-4.0.18}/test/test7950.py +0 -0
  65. {cloudpss-4.0.17 → cloudpss-4.0.18}/test/testAsync.py +0 -0
  66. {cloudpss-4.0.17 → cloudpss-4.0.18}/test/testEvent.py +0 -0
  67. {cloudpss-4.0.17 → cloudpss-4.0.18}/test/testRt-test.py +0 -0
  68. {cloudpss-4.0.17 → cloudpss-4.0.18}/test/testRt.py +0 -0
  69. {cloudpss-4.0.17 → cloudpss-4.0.18}/test/testRt2.py +0 -0
  70. {cloudpss-4.0.17 → cloudpss-4.0.18}/test/testSend.py +0 -0
  71. {cloudpss-4.0.17 → cloudpss-4.0.18}/test/test_in_new_web_1.py +0 -0
  72. {cloudpss-4.0.17 → cloudpss-4.0.18}/test/test_ws.py +0 -0
  73. {cloudpss-4.0.17 → cloudpss-4.0.18}/test/test_ws2.py +0 -0
  74. {cloudpss-4.0.17 → cloudpss-4.0.18}/test/testb.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cloudpss
3
- Version: 4.0.17
3
+ Version: 4.0.18
4
4
  Summary: cloudpss sdk
5
5
  Home-page: https://www.cloudpss.net
6
6
  Author: cloudpss
@@ -19,7 +19,7 @@ class Message(object):
19
19
  class MessageStreamReceiver(object):
20
20
  """消息流读取函数结果"""
21
21
 
22
- def __init__(self, id, db):
22
+ def __init__(self, id, db, **kwargs):
23
23
  self.origin = os.environ.get('CLOUDPSS_API_URL',
24
24
  'https://cloudpss.net/')
25
25
  self.id = id
@@ -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'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cloudpss
3
- Version: 4.0.17
3
+ Version: 4.0.18
4
4
  Summary: cloudpss sdk
5
5
  Home-page: https://www.cloudpss.net
6
6
  Author: cloudpss
@@ -6,7 +6,7 @@ PyJWT
6
6
  numpy
7
7
  PyYAML
8
8
  requests
9
- websocket-client
9
+ websocket-client>=1.4.0
10
10
  pytz
11
11
  deprecated
12
12
  zstandard
@@ -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'
@@ -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