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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: rowan-python
3
- Version: 0.0.4
3
+ Version: 0.0.5
4
4
  Summary: Rowan Python Library
5
5
  Author-email: Corin Wagen <corin@rowansci.com>
6
6
  Project-URL: Homepage, https://github.com/rowansci/rowan-client
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "rowan-python"
3
- version = "0.0.4"
3
+ version = "0.0.5"
4
4
  description = "Rowan Python Library"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.8"
@@ -59,7 +59,7 @@ class Client:
59
59
  },
60
60
  )
61
61
 
62
- elif type in ["pka", "conformers", "tautomers"]:
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
- elif type in ["pka", "conformers", "tautomers"]:
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
- elif type in ["pka", "conformers", "tautomers"]:
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
- elif type in ["pka", "conformers", "tautomers"]:
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
- elif type in ["pka", "conformers", "tautomers"]:
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}``!")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: rowan-python
3
- Version: 0.0.4
3
+ Version: 0.0.5
4
4
  Summary: Rowan Python Library
5
5
  Author-email: Corin Wagen <corin@rowansci.com>
6
6
  Project-URL: Homepage, https://github.com/rowansci/rowan-client
File without changes
File without changes
File without changes