pydiverse-common 0.3.11__tar.gz → 0.3.12__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.
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/PKG-INFO +1 -1
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/docs/source/changelog.md +3 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/pyproject.toml +1 -1
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/src/pydiverse/common/dtypes.py +9 -2
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/tests/dtypes/test_dtype_pandas.py +18 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/.gitattributes +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/.github/CODEOWNERS +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/.github/dependabot.yml +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/.github/scripts/check_deps.sh +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/.github/workflows/release.yml +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/.github/workflows/tests.yml +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/.github/workflows/update-lockfiles.yml +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/.gitignore +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/.pre-commit-config.yaml +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/.readthedocs.yaml +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/LICENSE +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/README.md +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/docs/Makefile +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/docs/make.bat +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/docs/package/README.md +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/docs/source/conf.py +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/docs/source/index.md +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/docs/source/license.md +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/docs/source/reference/api.rst +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/pixi.lock +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/pixi.toml +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/pytest.ini +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/src/pydiverse/common/__init__.py +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/src/pydiverse/common/errors/__init__.py +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/src/pydiverse/common/testing.py +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/src/pydiverse/common/util/__init__.py +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/src/pydiverse/common/util/computation_tracing.py +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/src/pydiverse/common/util/deep_map.py +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/src/pydiverse/common/util/deep_merge.py +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/src/pydiverse/common/util/disposable.py +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/src/pydiverse/common/util/hashing.py +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/src/pydiverse/common/util/import_.py +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/src/pydiverse/common/util/structlog.py +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/src/pydiverse/common/version.py +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/tests/conftest.py +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/tests/dtypes/test_dtype_polars.py +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/tests/dtypes/test_dtype_pyarrow.py +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/tests/dtypes/test_dtype_sqlalchemy.py +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/tests/test_util.py +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/tests/test_version.py +0 -0
- {pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/typos.toml +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: pydiverse-common
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.12
|
4
4
|
Summary: Common functionality shared between pydiverse libraries
|
5
5
|
Author: QuantCo, Inc.
|
6
6
|
Author-email: Martin Trautmann <windiana@users.sf.net>, Finn Rudolph <finn.rudolph@t-online.de>
|
@@ -311,6 +311,15 @@ class Dtype:
|
|
311
311
|
|
312
312
|
if isinstance(self, Enum):
|
313
313
|
return pd.CategoricalDtype(self.categories)
|
314
|
+
if isinstance(self, String):
|
315
|
+
return pd.StringDtype() # max_length not needed for dataframes
|
316
|
+
if isinstance(self, Decimal):
|
317
|
+
# NumericDtype exists but is not used because fixpoint is more common
|
318
|
+
# in SQL than in dataframes.
|
319
|
+
return pd.Float64Dtype()
|
320
|
+
if isinstance(self, List):
|
321
|
+
# we don't want to produce object columns
|
322
|
+
raise TypeError("pandas doesn't have a native list dtype")
|
314
323
|
|
315
324
|
return {
|
316
325
|
Int(): pd.Int64Dtype(), # we default to 64 bit
|
@@ -325,8 +334,6 @@ class Dtype:
|
|
325
334
|
Float(): pd.Float64Dtype(), # we default to 64 bit
|
326
335
|
Float32(): pd.Float32Dtype(),
|
327
336
|
Float64(): pd.Float64Dtype(),
|
328
|
-
Decimal(): pd.Float64Dtype(), # NumericDtype exists but is not used
|
329
|
-
String(): pd.StringDtype(),
|
330
337
|
Bool(): pd.BooleanDtype(),
|
331
338
|
Date(): "datetime64[s]",
|
332
339
|
Datetime(): "datetime64[us]",
|
@@ -113,7 +113,15 @@ def test_dtype_to_pandas_numpy():
|
|
113
113
|
assert_conversion(UInt16(), pd.UInt16Dtype())
|
114
114
|
assert_conversion(UInt8(), pd.UInt8Dtype())
|
115
115
|
|
116
|
+
assert_conversion(Float64(), pd.Float64Dtype())
|
117
|
+
assert_conversion(Float32(), pd.Float32Dtype())
|
118
|
+
|
119
|
+
assert_conversion(Decimal(), pd.Float64Dtype())
|
120
|
+
assert_conversion(Decimal(15), pd.Float64Dtype())
|
121
|
+
assert_conversion(Decimal(15, 2), pd.Float64Dtype())
|
122
|
+
|
116
123
|
assert_conversion(String(), pd.StringDtype())
|
124
|
+
assert_conversion(String(10), pd.StringDtype())
|
117
125
|
assert_conversion(Bool(), pd.BooleanDtype())
|
118
126
|
|
119
127
|
assert_conversion(Date(), "datetime64[s]")
|
@@ -142,7 +150,17 @@ def test_dtype_to_pandas_pyarrow():
|
|
142
150
|
assert_conversion(UInt16(), pa.uint16())
|
143
151
|
assert_conversion(UInt8(), pa.uint8())
|
144
152
|
|
153
|
+
assert_conversion(Float64(), pa.float64())
|
154
|
+
assert_conversion(Float32(), pa.float32())
|
155
|
+
|
156
|
+
assert_conversion(Decimal(), pa.decimal128(31, 11))
|
157
|
+
assert_conversion(Decimal(76), pa.decimal256(76, 76 // 3 + 1))
|
158
|
+
assert_conversion(Decimal(15), pa.decimal64(15, 6))
|
159
|
+
assert_conversion(Decimal(18, 2), pa.decimal64(18, 2))
|
160
|
+
assert_conversion(Decimal(9, 9), pa.decimal32(9, 9))
|
161
|
+
|
145
162
|
assert_conversion(String(), pd.StringDtype(storage="pyarrow"))
|
163
|
+
assert_conversion(String(10), pd.StringDtype(storage="pyarrow"))
|
146
164
|
assert_conversion(Bool(), pa.bool_())
|
147
165
|
|
148
166
|
assert_conversion(Date(), pa.date32())
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{pydiverse_common-0.3.11 → pydiverse_common-0.3.12}/src/pydiverse/common/util/computation_tracing.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|