rowan-python 0.0.4__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.4 → rowan_python-0.0.5}/PKG-INFO +1 -1
- {rowan-python-0.0.4 → rowan_python-0.0.5}/pyproject.toml +1 -1
- {rowan-python-0.0.4 → rowan_python-0.0.5}/rowan/client.py +5 -17
- {rowan-python-0.0.4 → rowan_python-0.0.5}/rowan_python.egg-info/PKG-INFO +1 -1
- {rowan-python-0.0.4 → rowan_python-0.0.5}/LICENSE +0 -0
- {rowan-python-0.0.4 → rowan_python-0.0.5}/README.md +0 -0
- {rowan-python-0.0.4 → rowan_python-0.0.5}/rowan/__init__.py +0 -0
- {rowan-python-0.0.4 → rowan_python-0.0.5}/rowan/utils.py +0 -0
- {rowan-python-0.0.4 → rowan_python-0.0.5}/rowan_python.egg-info/SOURCES.txt +0 -0
- {rowan-python-0.0.4 → rowan_python-0.0.5}/rowan_python.egg-info/dependency_links.txt +0 -0
- {rowan-python-0.0.4 → rowan_python-0.0.5}/rowan_python.egg-info/requires.txt +0 -0
- {rowan-python-0.0.4 → rowan_python-0.0.5}/rowan_python.egg-info/top_level.txt +0 -0
- {rowan-python-0.0.4 → 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,15 +97,12 @@ 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:
|
|
@@ -125,7 +122,7 @@ class Client:
|
|
|
125
122
|
|
|
126
123
|
return response_dict
|
|
127
124
|
|
|
128
|
-
|
|
125
|
+
else:
|
|
129
126
|
response = client.get(f"{API_URL}/workflow/{calc_uuid}", headers=self.headers)
|
|
130
127
|
response.raise_for_status()
|
|
131
128
|
response_dict = response.json()
|
|
@@ -137,31 +134,22 @@ class Client:
|
|
|
137
134
|
|
|
138
135
|
return response_dict
|
|
139
136
|
|
|
140
|
-
else:
|
|
141
|
-
raise ValueError(f"Unknown type ``{type}``!")
|
|
142
|
-
|
|
143
137
|
def stop(self, calc_uuid: str, type: str = "calculation") -> None:
|
|
144
138
|
with httpx.Client() as client:
|
|
145
139
|
if type == "calculation":
|
|
146
140
|
response = client.post(f"{API_URL}/calculation/{calc_uuid}/stop", headers=self.headers)
|
|
147
141
|
response.raise_for_status()
|
|
148
142
|
|
|
149
|
-
|
|
143
|
+
else:
|
|
150
144
|
response = client.post(f"{API_URL}/workflow/{calc_uuid}/stop", headers=self.headers)
|
|
151
145
|
response.raise_for_status()
|
|
152
146
|
|
|
153
|
-
else:
|
|
154
|
-
raise ValueError(f"Unknown type ``{type}``!")
|
|
155
|
-
|
|
156
147
|
def delete(self, calc_uuid: str, type: str = "calculation") -> None:
|
|
157
148
|
with httpx.Client() as client:
|
|
158
149
|
if type == "calculation":
|
|
159
150
|
response = client.delete(f"{API_URL}/calculation/{calc_uuid}", headers=self.headers)
|
|
160
151
|
response.raise_for_status()
|
|
161
152
|
|
|
162
|
-
|
|
153
|
+
else:
|
|
163
154
|
response = client.delete(f"{API_URL}/folder/{calc_uuid}", headers=self.headers)
|
|
164
155
|
response.raise_for_status()
|
|
165
|
-
|
|
166
|
-
else:
|
|
167
|
-
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
|