rowan-python 0.0.3__tar.gz → 0.0.5__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.
- {rowan-python-0.0.3 → rowan_python-0.0.5}/PKG-INFO +1 -1
- {rowan-python-0.0.3 → rowan_python-0.0.5}/pyproject.toml +1 -1
- {rowan-python-0.0.3 → rowan_python-0.0.5}/rowan/client.py +21 -18
- {rowan-python-0.0.3 → rowan_python-0.0.5}/rowan_python.egg-info/PKG-INFO +1 -1
- {rowan-python-0.0.3 → rowan_python-0.0.5}/LICENSE +0 -0
- {rowan-python-0.0.3 → rowan_python-0.0.5}/README.md +0 -0
- {rowan-python-0.0.3 → rowan_python-0.0.5}/rowan/__init__.py +0 -0
- {rowan-python-0.0.3 → rowan_python-0.0.5}/rowan/utils.py +0 -0
- {rowan-python-0.0.3 → rowan_python-0.0.5}/rowan_python.egg-info/SOURCES.txt +0 -0
- {rowan-python-0.0.3 → rowan_python-0.0.5}/rowan_python.egg-info/dependency_links.txt +0 -0
- {rowan-python-0.0.3 → rowan_python-0.0.5}/rowan_python.egg-info/requires.txt +0 -0
- {rowan-python-0.0.3 → rowan_python-0.0.5}/rowan_python.egg-info/top_level.txt +0 -0
- {rowan-python-0.0.3 → rowan_python-0.0.5}/setup.cfg +0 -0
|
@@ -59,7 +59,7 @@ class Client:
|
|
|
59
59
|
},
|
|
60
60
|
)
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
else:
|
|
63
63
|
response = client.post(
|
|
64
64
|
f"{API_URL}/workflow",
|
|
65
65
|
headers=self.headers,
|
|
@@ -97,33 +97,42 @@ class Client:
|
|
|
97
97
|
response_dict = response.json()
|
|
98
98
|
status = response_dict["status"]
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
else:
|
|
101
101
|
response = client.get(f"{API_URL}/workflow/{calc_uuid}", headers=self.headers)
|
|
102
102
|
response.raise_for_status()
|
|
103
103
|
response_dict = response.json()
|
|
104
104
|
status = response_dict["object_status"]
|
|
105
105
|
|
|
106
|
-
else:
|
|
107
|
-
raise ValueError(f"Unknown type ``{type}``!")
|
|
108
|
-
|
|
109
106
|
return status in [2, 3, 4]
|
|
110
107
|
|
|
111
108
|
def get(self, calc_uuid: str, type: str = "calculation") -> dict:
|
|
112
109
|
with httpx.Client() as client:
|
|
113
110
|
if type == "calculation":
|
|
114
|
-
|
|
111
|
+
stj_response = client.get(f"{API_URL}/calculation/{calc_uuid}/stjames", headers=self.headers)
|
|
112
|
+
stj_response.raise_for_status()
|
|
113
|
+
stj_dict = stj_response.json()
|
|
114
|
+
|
|
115
|
+
response = client.get(f"{API_URL}/calculation/{calc_uuid}", headers=self.headers)
|
|
115
116
|
response.raise_for_status()
|
|
116
117
|
response_dict = response.json()
|
|
118
|
+
|
|
119
|
+
# reformat
|
|
120
|
+
del response_dict["settings"]
|
|
121
|
+
response_dict["data"] = stj_dict
|
|
122
|
+
|
|
117
123
|
return response_dict
|
|
118
124
|
|
|
119
|
-
|
|
125
|
+
else:
|
|
120
126
|
response = client.get(f"{API_URL}/workflow/{calc_uuid}", headers=self.headers)
|
|
121
127
|
response.raise_for_status()
|
|
122
128
|
response_dict = response.json()
|
|
123
|
-
return response_dict["object_data"]
|
|
124
129
|
|
|
125
|
-
|
|
126
|
-
|
|
130
|
+
# reformat
|
|
131
|
+
response_dict["data"] = response_dict["object_data"]
|
|
132
|
+
del response_dict["object_data"]
|
|
133
|
+
del response_dict["status"]
|
|
134
|
+
|
|
135
|
+
return response_dict
|
|
127
136
|
|
|
128
137
|
def stop(self, calc_uuid: str, type: str = "calculation") -> None:
|
|
129
138
|
with httpx.Client() as client:
|
|
@@ -131,22 +140,16 @@ class Client:
|
|
|
131
140
|
response = client.post(f"{API_URL}/calculation/{calc_uuid}/stop", headers=self.headers)
|
|
132
141
|
response.raise_for_status()
|
|
133
142
|
|
|
134
|
-
|
|
143
|
+
else:
|
|
135
144
|
response = client.post(f"{API_URL}/workflow/{calc_uuid}/stop", headers=self.headers)
|
|
136
145
|
response.raise_for_status()
|
|
137
146
|
|
|
138
|
-
else:
|
|
139
|
-
raise ValueError(f"Unknown type ``{type}``!")
|
|
140
|
-
|
|
141
147
|
def delete(self, calc_uuid: str, type: str = "calculation") -> None:
|
|
142
148
|
with httpx.Client() as client:
|
|
143
149
|
if type == "calculation":
|
|
144
150
|
response = client.delete(f"{API_URL}/calculation/{calc_uuid}", headers=self.headers)
|
|
145
151
|
response.raise_for_status()
|
|
146
152
|
|
|
147
|
-
|
|
153
|
+
else:
|
|
148
154
|
response = client.delete(f"{API_URL}/folder/{calc_uuid}", headers=self.headers)
|
|
149
155
|
response.raise_for_status()
|
|
150
|
-
|
|
151
|
-
else:
|
|
152
|
-
raise ValueError(f"Unknown type ``{type}``!")
|
|
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
|