atlasai-dstoolkit-client 0.0.6__py3-none-any.whl → 0.0.8__py3-none-any.whl
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.
- atlasai/toolkit/feature.py +22 -7
- {atlasai_dstoolkit_client-0.0.6.dist-info → atlasai_dstoolkit_client-0.0.8.dist-info}/METADATA +2 -1
- {atlasai_dstoolkit_client-0.0.6.dist-info → atlasai_dstoolkit_client-0.0.8.dist-info}/RECORD +6 -6
- {atlasai_dstoolkit_client-0.0.6.dist-info → atlasai_dstoolkit_client-0.0.8.dist-info}/LICENSE.txt +0 -0
- {atlasai_dstoolkit_client-0.0.6.dist-info → atlasai_dstoolkit_client-0.0.8.dist-info}/WHEEL +0 -0
- {atlasai_dstoolkit_client-0.0.6.dist-info → atlasai_dstoolkit_client-0.0.8.dist-info}/top_level.txt +0 -0
atlasai/toolkit/feature.py
CHANGED
@@ -12,11 +12,15 @@
|
|
12
12
|
# See the License for the specific language governing permissions and
|
13
13
|
# limitations under the License.
|
14
14
|
|
15
|
+
import logging
|
15
16
|
import uuid
|
17
|
+
|
16
18
|
import pandas as pd
|
19
|
+
from shapely import wkb
|
17
20
|
|
18
21
|
from . import api, constants, utils
|
19
22
|
|
23
|
+
logger = logging.getLogger(__name__)
|
20
24
|
|
21
25
|
def export(*args, **kwargs):
|
22
26
|
fe = FeatureExport(*args, **kwargs)
|
@@ -33,7 +37,7 @@ class FeatureExport:
|
|
33
37
|
return f'FeatureExport({self._search.id})'
|
34
38
|
|
35
39
|
def __str__(self):
|
36
|
-
return f'FeatureExport({self.
|
40
|
+
return f'FeatureExport({self.id})'
|
37
41
|
|
38
42
|
@property
|
39
43
|
def page(self):
|
@@ -60,18 +64,29 @@ class FeatureExport:
|
|
60
64
|
if not self.export:
|
61
65
|
return pd.DataFrame([])
|
62
66
|
|
67
|
+
dfs = []
|
63
68
|
if self.export.get('status') not in ['succeeded', 'failed']:
|
64
69
|
raise Exception(f'Export state is: {self.export.get("status")}')
|
65
|
-
path = None
|
66
70
|
grouped = self.export.get('search_result', {}).get('grouped', [])
|
67
|
-
|
68
|
-
path =
|
69
|
-
|
70
|
-
|
71
|
+
for group in grouped:
|
72
|
+
path = group.get('url')
|
73
|
+
if not path:
|
74
|
+
continue
|
75
|
+
df = pd.read_parquet(path, engine='pyarrow')
|
76
|
+
dfs.append(df)
|
77
|
+
if not dfs:
|
78
|
+
raise Exception('No dataframe found')
|
79
|
+
|
80
|
+
df = pd.concat(dfs, ignore_index=True) if len(dfs) > 1 else dfs[0]
|
71
81
|
|
72
|
-
df = pd.read_parquet(path, engine='pyarrow')
|
73
82
|
if limit:
|
74
83
|
df = df.head(limit)
|
84
|
+
|
85
|
+
try:
|
86
|
+
df['shape'] = wkb.loads(df['shape'])
|
87
|
+
except Exception:
|
88
|
+
logger.warning('Shape field is not in WKB format. Skipping conversion.')
|
89
|
+
|
75
90
|
return df
|
76
91
|
|
77
92
|
def _details(self):
|
{atlasai_dstoolkit_client-0.0.6.dist-info → atlasai_dstoolkit_client-0.0.8.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: atlasai-dstoolkit-client
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.8
|
4
4
|
Summary: UNKNOWN
|
5
5
|
Home-page: UNKNOWN
|
6
6
|
Author: AtlasAI SWE
|
@@ -16,6 +16,7 @@ Requires-Dist: pyarrow (>=19.0.1)
|
|
16
16
|
Requires-Dist: python-dotenv (<2.0.0,>=1.0.1)
|
17
17
|
Requires-Dist: requests (<=3.0.0,>=2.32.3)
|
18
18
|
Requires-Dist: semver (<4.0.0,>=3.0.2)
|
19
|
+
Requires-Dist: shapely (~=2.1.0)
|
19
20
|
Provides-Extra: dev
|
20
21
|
Requires-Dist: coverage ; extra == 'dev'
|
21
22
|
Requires-Dist: flake8 ; extra == 'dev'
|
{atlasai_dstoolkit_client-0.0.6.dist-info → atlasai_dstoolkit_client-0.0.8.dist-info}/RECORD
RENAMED
@@ -2,13 +2,13 @@ atlasai/toolkit/__init__.py,sha256=szu5LHZ41ccWztCI2LvQ3QnZRybosgTbU3yd6tS7cUw,9
|
|
2
2
|
atlasai/toolkit/api.py,sha256=BvO-gLRmbmkKduwbbADjcLlIkS9blzfM_cbMR4DhQmU,5269
|
3
3
|
atlasai/toolkit/constants.py,sha256=sE0PeFa9_htCPVFADHbkyPIz3QOai0tAIA5IiiZI8wA,329
|
4
4
|
atlasai/toolkit/fabric.py,sha256=6aFR2PGQc9P3Qa07WdBg9eKoUzU8n2y_-gGjYcyMrWY,1921
|
5
|
-
atlasai/toolkit/feature.py,sha256=
|
5
|
+
atlasai/toolkit/feature.py,sha256=VKwX_yAwwMo1WuLZ_RbKVJEH4L1PAoYEPzWa0lH9ats,2828
|
6
6
|
atlasai/toolkit/init.py,sha256=JkdJ6QGdYWrq65jgz2pn5RYXUeUe2Ez88_-eMf5CNi0,1100
|
7
7
|
atlasai/toolkit/login.py,sha256=n4ydfo9qCsmbZq6er1xeljBD76vdTJGjbhYHMmOyDbQ,3061
|
8
8
|
atlasai/toolkit/requests.py,sha256=X86nIo07hAjUlilZcZ1lV8RB7KOsTKbTGtcY_SpFEXY,1223
|
9
9
|
atlasai/toolkit/utils.py,sha256=lYh3P2XOshRgHCjFeXJ0FOJWQW64sddgx8c2kL6Wqwc,1566
|
10
|
-
atlasai_dstoolkit_client-0.0.
|
11
|
-
atlasai_dstoolkit_client-0.0.
|
12
|
-
atlasai_dstoolkit_client-0.0.
|
13
|
-
atlasai_dstoolkit_client-0.0.
|
14
|
-
atlasai_dstoolkit_client-0.0.
|
10
|
+
atlasai_dstoolkit_client-0.0.8.dist-info/LICENSE.txt,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
11
|
+
atlasai_dstoolkit_client-0.0.8.dist-info/METADATA,sha256=UscoS32WcwndGfqTPchABqeoy6tzOmZjeOyE6S7G2gM,1368
|
12
|
+
atlasai_dstoolkit_client-0.0.8.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
13
|
+
atlasai_dstoolkit_client-0.0.8.dist-info/top_level.txt,sha256=HRTbErU8nmHFDaJJ5R_XYbwpt21dqdjDpSva8xyy_0k,8
|
14
|
+
atlasai_dstoolkit_client-0.0.8.dist-info/RECORD,,
|
{atlasai_dstoolkit_client-0.0.6.dist-info → atlasai_dstoolkit_client-0.0.8.dist-info}/LICENSE.txt
RENAMED
File without changes
|
File without changes
|
{atlasai_dstoolkit_client-0.0.6.dist-info → atlasai_dstoolkit_client-0.0.8.dist-info}/top_level.txt
RENAMED
File without changes
|