hopeit.dataframes 0.26.1__tar.gz → 0.26.2__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.
- {hopeit_dataframes-0.26.1 → hopeit_dataframes-0.26.2}/PKG-INFO +3 -3
- {hopeit_dataframes-0.26.1 → hopeit_dataframes-0.26.2}/pyproject.toml +3 -3
- {hopeit_dataframes-0.26.1 → hopeit_dataframes-0.26.2}/src/hopeit/dataframes/datablocks.py +1 -1
- {hopeit_dataframes-0.26.1 → hopeit_dataframes-0.26.2}/src/hopeit/dataframes/dataframe.py +4 -14
- {hopeit_dataframes-0.26.1 → hopeit_dataframes-0.26.2}/src/hopeit/dataframes/serialization/dataset.py +3 -1
- {hopeit_dataframes-0.26.1 → hopeit_dataframes-0.26.2}/src/hopeit.dataframes.egg-info/PKG-INFO +3 -3
- hopeit_dataframes-0.26.2/src/hopeit.dataframes.egg-info/requires.txt +5 -0
- hopeit_dataframes-0.26.1/src/hopeit.dataframes.egg-info/requires.txt +0 -5
- {hopeit_dataframes-0.26.1 → hopeit_dataframes-0.26.2}/README.md +0 -0
- {hopeit_dataframes-0.26.1 → hopeit_dataframes-0.26.2}/setup.cfg +0 -0
- {hopeit_dataframes-0.26.1 → hopeit_dataframes-0.26.2}/src/hopeit/dataframes/__init__.py +0 -0
- {hopeit_dataframes-0.26.1 → hopeit_dataframes-0.26.2}/src/hopeit/dataframes/py.typed +0 -0
- {hopeit_dataframes-0.26.1 → hopeit_dataframes-0.26.2}/src/hopeit/dataframes/serialization/__init__.py +0 -0
- {hopeit_dataframes-0.26.1 → hopeit_dataframes-0.26.2}/src/hopeit/dataframes/serialization/files.py +0 -0
- {hopeit_dataframes-0.26.1 → hopeit_dataframes-0.26.2}/src/hopeit/dataframes/serialization/protocol.py +0 -0
- {hopeit_dataframes-0.26.1 → hopeit_dataframes-0.26.2}/src/hopeit/dataframes/serialization/py.typed +0 -0
- {hopeit_dataframes-0.26.1 → hopeit_dataframes-0.26.2}/src/hopeit/dataframes/serialization/settings.py +0 -0
- {hopeit_dataframes-0.26.1 → hopeit_dataframes-0.26.2}/src/hopeit/dataframes/setup/__init__.py +0 -0
- {hopeit_dataframes-0.26.1 → hopeit_dataframes-0.26.2}/src/hopeit/dataframes/setup/dataframes.py +0 -0
- {hopeit_dataframes-0.26.1 → hopeit_dataframes-0.26.2}/src/hopeit/dataframes/setup/py.typed +0 -0
- {hopeit_dataframes-0.26.1 → hopeit_dataframes-0.26.2}/src/hopeit/dataframes/setup/register_database.py +0 -0
- {hopeit_dataframes-0.26.1 → hopeit_dataframes-0.26.2}/src/hopeit/dataframes/setup/registry.py +0 -0
- {hopeit_dataframes-0.26.1 → hopeit_dataframes-0.26.2}/src/hopeit.dataframes.egg-info/SOURCES.txt +0 -0
- {hopeit_dataframes-0.26.1 → hopeit_dataframes-0.26.2}/src/hopeit.dataframes.egg-info/dependency_links.txt +0 -0
- {hopeit_dataframes-0.26.1 → hopeit_dataframes-0.26.2}/src/hopeit.dataframes.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hopeit.dataframes
|
|
3
|
-
Version: 0.26.
|
|
3
|
+
Version: 0.26.2
|
|
4
4
|
Summary: Hopeit Engine Dataframes for Pandas
|
|
5
5
|
Author-email: Leo Smerling & Pablo Canto <contact@hopeit.com.ar>, Leo Smerling <contact@hopeit.com.ar>, Pablo Canto <contact@hopeit.com.ar>
|
|
6
6
|
License: Apache 2
|
|
@@ -24,8 +24,8 @@ Classifier: Topic :: Internet :: WWW/HTTP
|
|
|
24
24
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
25
25
|
Classifier: Framework :: AsyncIO
|
|
26
26
|
Description-Content-Type: text/markdown
|
|
27
|
-
Requires-Dist: hopeit.engine>=0.26.
|
|
28
|
-
Requires-Dist: hopeit.fs-storage>=0.26.
|
|
27
|
+
Requires-Dist: hopeit.engine>=0.26.2
|
|
28
|
+
Requires-Dist: hopeit.fs-storage>=0.26.2
|
|
29
29
|
Requires-Dist: pandas>=2.2.3
|
|
30
30
|
Requires-Dist: pyarrow>=19.0.1
|
|
31
31
|
Requires-Dist: numpy>=1.26.4
|
|
@@ -4,14 +4,14 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "hopeit.dataframes"
|
|
7
|
-
version = "0.26.
|
|
7
|
+
version = "0.26.2"
|
|
8
8
|
|
|
9
9
|
description = "Hopeit Engine Dataframes for Pandas"
|
|
10
10
|
dynamic = ["readme"]
|
|
11
11
|
|
|
12
12
|
dependencies = [
|
|
13
|
-
"hopeit.engine>=0.26.
|
|
14
|
-
"hopeit.fs-storage>=0.26.
|
|
13
|
+
"hopeit.engine>=0.26.2",
|
|
14
|
+
"hopeit.fs-storage>=0.26.2",
|
|
15
15
|
"pandas>=2.2.3",
|
|
16
16
|
"pyarrow>=19.0.1",
|
|
17
17
|
"numpy>=1.26.4"
|
|
@@ -148,7 +148,7 @@ class DataBlocks(Generic[DataBlockType, DataFrameType]):
|
|
|
148
148
|
storage = await get_dataset_storage(database_key)
|
|
149
149
|
result_df = await DataBlocks._load_datablock_df(storage, dataset, field_names, database_key)
|
|
150
150
|
|
|
151
|
-
#
|
|
151
|
+
# Enfore datatypes and add missing optional fields using class schema (allows schema evolution)
|
|
152
152
|
cls._adapt_to_schema(datablock, keys, result_df)
|
|
153
153
|
|
|
154
154
|
# Adding constant value fields
|
|
@@ -128,12 +128,11 @@ class DataFrameMixin(Generic[DataFrameT, DataObject]):
|
|
|
128
128
|
df = pd.DataFrame(series)
|
|
129
129
|
df.index.name = None # Removes index name to avoid colisions with series name
|
|
130
130
|
if self.__data_object__["validate"]:
|
|
131
|
-
|
|
131
|
+
self._coerce_datatypes(df)
|
|
132
132
|
setattr(self, "__df", df[self.__dataframe__.columns])
|
|
133
133
|
|
|
134
134
|
@classmethod
|
|
135
135
|
def _from_df(cls, df: pd.DataFrame, **series: Any) -> DataFrameT:
|
|
136
|
-
df = df if cls.__data_object__["unsafe"] else pd.DataFrame(df)
|
|
137
136
|
obj = cls(**{**df._series, **series}) # pylint: disable=protected-access
|
|
138
137
|
return obj # type: ignore
|
|
139
138
|
|
|
@@ -145,13 +144,6 @@ class DataFrameMixin(Generic[DataFrameT, DataObject]):
|
|
|
145
144
|
def _from_dataobjects(cls, items: Iterator[DataObject]) -> DataFrameT:
|
|
146
145
|
return cls._from_df(pd.DataFrame(Payload.to_obj(item) for item in items)) # type: ignore[misc]
|
|
147
146
|
|
|
148
|
-
@classmethod
|
|
149
|
-
def _from_df_unsafe(cls, df: pd.DataFrame, **series: pd.Series) -> DataFrameT:
|
|
150
|
-
for col, values in series.items():
|
|
151
|
-
df[col] = values
|
|
152
|
-
obj = cls(**df._series) # pylint: disable=protected-access
|
|
153
|
-
return obj # type: ignore
|
|
154
|
-
|
|
155
147
|
@property
|
|
156
148
|
def _df(self) -> pd.DataFrame:
|
|
157
149
|
return getattr(self, "__df")
|
|
@@ -210,13 +202,11 @@ class DataFrameMixin(Generic[DataFrameT, DataObject]):
|
|
|
210
202
|
def _coerce_datatypes(
|
|
211
203
|
self,
|
|
212
204
|
df: pd.DataFrame,
|
|
213
|
-
) ->
|
|
214
|
-
|
|
215
|
-
name
|
|
205
|
+
) -> None:
|
|
206
|
+
for name, field in self.__dataframe__.fields.items():
|
|
207
|
+
df[name] = self.DATATYPE_MAPPING[field.annotation]( # type: ignore[index, operator]
|
|
216
208
|
name, self._get_series(df, name, field)
|
|
217
209
|
)
|
|
218
|
-
for name, field in self.__dataframe__.fields.items()
|
|
219
|
-
}
|
|
220
210
|
|
|
221
211
|
|
|
222
212
|
def dataframe(
|
{hopeit_dataframes-0.26.1 → hopeit_dataframes-0.26.2}/src/hopeit/dataframes/serialization/dataset.py
RENAMED
|
@@ -60,7 +60,9 @@ class Dataset(Generic[DataFrameT]):
|
|
|
60
60
|
|
|
61
61
|
@classmethod
|
|
62
62
|
async def load(
|
|
63
|
-
cls,
|
|
63
|
+
cls,
|
|
64
|
+
dataset: "Dataset[DataFrameT]",
|
|
65
|
+
database_key: Optional[str] = None,
|
|
64
66
|
) -> DataFrameT:
|
|
65
67
|
try:
|
|
66
68
|
storage = await get_dataset_storage(database_key)
|
{hopeit_dataframes-0.26.1 → hopeit_dataframes-0.26.2}/src/hopeit.dataframes.egg-info/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hopeit.dataframes
|
|
3
|
-
Version: 0.26.
|
|
3
|
+
Version: 0.26.2
|
|
4
4
|
Summary: Hopeit Engine Dataframes for Pandas
|
|
5
5
|
Author-email: Leo Smerling & Pablo Canto <contact@hopeit.com.ar>, Leo Smerling <contact@hopeit.com.ar>, Pablo Canto <contact@hopeit.com.ar>
|
|
6
6
|
License: Apache 2
|
|
@@ -24,8 +24,8 @@ Classifier: Topic :: Internet :: WWW/HTTP
|
|
|
24
24
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
25
25
|
Classifier: Framework :: AsyncIO
|
|
26
26
|
Description-Content-Type: text/markdown
|
|
27
|
-
Requires-Dist: hopeit.engine>=0.26.
|
|
28
|
-
Requires-Dist: hopeit.fs-storage>=0.26.
|
|
27
|
+
Requires-Dist: hopeit.engine>=0.26.2
|
|
28
|
+
Requires-Dist: hopeit.fs-storage>=0.26.2
|
|
29
29
|
Requires-Dist: pandas>=2.2.3
|
|
30
30
|
Requires-Dist: pyarrow>=19.0.1
|
|
31
31
|
Requires-Dist: numpy>=1.26.4
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hopeit_dataframes-0.26.1 → hopeit_dataframes-0.26.2}/src/hopeit/dataframes/serialization/files.py
RENAMED
|
File without changes
|
|
File without changes
|
{hopeit_dataframes-0.26.1 → hopeit_dataframes-0.26.2}/src/hopeit/dataframes/serialization/py.typed
RENAMED
|
File without changes
|
|
File without changes
|
{hopeit_dataframes-0.26.1 → hopeit_dataframes-0.26.2}/src/hopeit/dataframes/setup/__init__.py
RENAMED
|
File without changes
|
{hopeit_dataframes-0.26.1 → hopeit_dataframes-0.26.2}/src/hopeit/dataframes/setup/dataframes.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hopeit_dataframes-0.26.1 → hopeit_dataframes-0.26.2}/src/hopeit/dataframes/setup/registry.py
RENAMED
|
File without changes
|
{hopeit_dataframes-0.26.1 → hopeit_dataframes-0.26.2}/src/hopeit.dataframes.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{hopeit_dataframes-0.26.1 → hopeit_dataframes-0.26.2}/src/hopeit.dataframes.egg-info/top_level.txt
RENAMED
|
File without changes
|