turingdb 0.2.2__tar.gz → 0.2.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.

Potentially problematic release.


This version of turingdb might be problematic. Click here for more details.

@@ -12,7 +12,7 @@ jobs:
12
12
 
13
13
  strategy:
14
14
  matrix:
15
- python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
15
+ python-version: ["3.13"]
16
16
 
17
17
  steps:
18
18
  - name: Checkout code
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: turingdb
3
- Version: 0.2.2
3
+ Version: 0.2.4
4
4
  Summary: TuringDB python sdk
5
5
  Project-URL: Homepage, https://github.com/turing-db/turingdb-sdk-python
6
6
  Project-URL: Repository, https://github.com/turing-db/turingdb-sdk-python
@@ -8,6 +8,7 @@ License-File: LICENSE.txt
8
8
  Requires-Python: >=3.10
9
9
  Requires-Dist: httpx>=0.28.1
10
10
  Requires-Dist: orjson>=3.11.1
11
+ Requires-Dist: pandas-stubs>=2.3.0.250703
11
12
  Requires-Dist: pandas>=2.3.1
12
13
  Description-Content-Type: text/markdown
13
14
 
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '0.2.2'
32
- __version_tuple__ = version_tuple = (0, 2, 2)
31
+ __version__ = version = '0.2.4'
32
+ __version_tuple__ = version_tuple = (0, 2, 4)
33
33
 
34
34
  __commit_id__ = commit_id = None
@@ -8,6 +8,7 @@ dependencies = [
8
8
  "httpx>=0.28.1",
9
9
  "orjson>=3.11.1",
10
10
  "pandas>=2.3.1",
11
+ "pandas-stubs>=2.3.0.250703",
11
12
  ]
12
13
 
13
14
  [project.urls]
@@ -0,0 +1,3 @@
1
+ from .turingdb import TuringDB, TuringDBException
2
+
3
+ __all__ = ["TuringDB", "TuringDBException"]
File without changes
@@ -64,10 +64,12 @@ class TuringDB:
64
64
  def set_commit(self, commit: str):
65
65
  self._params["commit"] = commit
66
66
 
67
- def set_change(self, change: str):
67
+ def set_change(self, change: int | str):
68
+ if isinstance(change, int):
69
+ change = f"{change:x}"
68
70
  self._params["change"] = change
69
71
 
70
- def checkout(self, change: str = "main", commit: str = "HEAD"):
72
+ def checkout(self, change: int | str = "main", commit: str = "HEAD"):
71
73
  if change == "main":
72
74
  if "change" in self._params:
73
75
  del self._params["change"]
@@ -111,6 +113,9 @@ class TuringDB:
111
113
  if isinstance(json, dict):
112
114
  err = json.get("error")
113
115
  if err is not None:
116
+ details = json.get("error_details")
117
+ if details is not None:
118
+ err = f"{err}: {details}"
114
119
  raise TuringDBException(err)
115
120
 
116
121
  return json
@@ -147,4 +152,3 @@ class TuringDB:
147
152
  arrays = [np.array(columns[i], dtype=dtypes[i]) for i in range(len(columns))]
148
153
 
149
154
  return pd.DataFrame(dict(zip(column_names, arrays)), index=None)
150
-