rowan-python 0.0.3__tar.gz → 0.0.4__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.3
3
+ Version: 0.0.4
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.3"
3
+ version = "0.0.4"
4
4
  description = "Rowan Python Library"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.8"
@@ -111,16 +111,31 @@ class Client:
111
111
  def get(self, calc_uuid: str, type: str = "calculation") -> dict:
112
112
  with httpx.Client() as client:
113
113
  if type == "calculation":
114
- response = client.get(f"{API_URL}/calculation/{calc_uuid}/stjames", headers=self.headers)
114
+ stj_response = client.get(f"{API_URL}/calculation/{calc_uuid}/stjames", headers=self.headers)
115
+ stj_response.raise_for_status()
116
+ stj_dict = stj_response.json()
117
+
118
+ response = client.get(f"{API_URL}/calculation/{calc_uuid}", headers=self.headers)
115
119
  response.raise_for_status()
116
120
  response_dict = response.json()
121
+
122
+ # reformat
123
+ del response_dict["settings"]
124
+ response_dict["data"] = stj_dict
125
+
117
126
  return response_dict
118
127
 
119
128
  elif type in ["pka", "conformers", "tautomers"]:
120
129
  response = client.get(f"{API_URL}/workflow/{calc_uuid}", headers=self.headers)
121
130
  response.raise_for_status()
122
131
  response_dict = response.json()
123
- return response_dict["object_data"]
132
+
133
+ # reformat
134
+ response_dict["data"] = response_dict["object_data"]
135
+ del response_dict["object_data"]
136
+ del response_dict["status"]
137
+
138
+ return response_dict
124
139
 
125
140
  else:
126
141
  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.3
3
+ Version: 0.0.4
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