Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ requires = [
"setuptools>=69",
"wheel",
"Cython>=3",
"numpy>=1.26.4,<3"
"numpy>=1.26.4; python_version<'3.13'",
"numpy>=2.1.0; python_version>='3.13' and python_version<'3.14'",
"numpy>=2.3.2; python_version>='3.14'"
]

build-backend = "setuptools.build_meta"
Expand All @@ -36,12 +38,16 @@ maintainers = [
{name = "Apache TsFile Developers", email = "dev@tsfile.apache.org"}
]
dependencies = [
"numpy>=1.26.4,<3",
"pandas>=2.0,<2.3; python_version < '3.13'",
"pandas>=2.3.3; python_version >= '3.13'",
"pyarrow>=16.0,<18; python_version<'3.10'",
"pyarrow>=18.0,<20; python_version>='3.10' and python_version<'3.14'",
"pyarrow>=22.0,<24; python_version>='3.14'"
"numpy>=1.26.4; python_version<'3.13'",
"numpy>=2.1.0; python_version>='3.13' and python_version<'3.14'",
"numpy>=2.3.2; python_version>='3.14'",
"pandas>=2.0.0; python_version<'3.12'",
"pandas>=2.1.1; python_version>='3.12' and python_version<'3.13'",
"pandas>=2.2.3; python_version>='3.13' and python_version<'3.14'",
"pandas>=2.3.3; python_version>='3.14'",
"pyarrow>=16.0; python_version<'3.13'",
"pyarrow>=18.0; python_version>='3.13' and python_version<'3.14'",
"pyarrow>=22.0; python_version>='3.14'"
]

[project.urls]
Expand Down
14 changes: 10 additions & 4 deletions python/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,15 @@
cython==3.0.10
black==25.11.0; python_version < "3.10"
black==26.3.1; python_version >= "3.10"
numpy>=1.26.4,<3
pandas==2.2.2; python_version < "3.13"
pandas>=2.3.3; python_version >= "3.13"
numpy>=1.26.4; python_version < "3.13"
numpy>=2.1.0; python_version >= "3.13" and python_version < "3.14"
numpy>=2.3.2; python_version >= "3.14"
pandas>=2.0.0; python_version < "3.12"
pandas>=2.1.1; python_version >= "3.12" and python_version < "3.13"
pandas>=2.2.3; python_version >= "3.13" and python_version < "3.14"
pandas>=2.3.3; python_version >= "3.14"
setuptools==78.1.1
wheel==0.46.2
pyarrow>=8.0.0
pyarrow>=16.0; python_version < "3.13"
pyarrow>=18.0; python_version >= "3.13" and python_version < "3.14"
pyarrow>=22.0; python_version >= "3.14"
10 changes: 8 additions & 2 deletions python/tests/test_dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,14 @@ def test_write_dataframe_all_datatypes():
assert df_read["bool_col"].equals(df_sorted["bool_col"])
assert df_read["int32_col"].equals(df_sorted["int32_col"])
assert df_read["int64_col"].equals(df_sorted["int64_col"])
assert np.allclose(df_read["float_col"], df_sorted["float_col"])
assert np.allclose(df_read["double_col"], df_sorted["double_col"])
assert np.allclose(
df_read["float_col"].to_numpy(dtype=np.float32, na_value=np.nan),
df_sorted["float_col"].to_numpy(dtype=np.float32, na_value=np.nan),
)
assert np.allclose(
df_read["double_col"].to_numpy(dtype=np.float64, na_value=np.nan),
df_sorted["double_col"].to_numpy(dtype=np.float64, na_value=np.nan),
)
assert df_read["string_col"].equals(df_sorted["string_col"])
assert df_read["blob_col"].equals(df_sorted["blob_col"])
assert df_read["text_col"].equals(df_sorted["text_col"])
Expand Down
10 changes: 8 additions & 2 deletions python/tests/test_to_tsfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,14 @@ def test_dataframe_to_tsfile_all_datatypes():
assert df_read["bool_col"].equals(df_sorted["bool_col"])
assert df_read["int32_col"].equals(df_sorted["int32_col"])
assert df_read["int64_col"].equals(df_sorted["int64_col"])
assert np.allclose(df_read["float_col"], df_sorted["float_col"])
assert np.allclose(df_read["double_col"], df_sorted["double_col"])
assert np.allclose(
df_read["float_col"].to_numpy(dtype=np.float32, na_value=np.nan),
df_sorted["float_col"].to_numpy(dtype=np.float32, na_value=np.nan),
)
assert np.allclose(
df_read["double_col"].to_numpy(dtype=np.float64, na_value=np.nan),
df_sorted["double_col"].to_numpy(dtype=np.float64, na_value=np.nan),
)
assert df_read["string_col"].equals(df_sorted["string_col"])
assert df_read["text_col"].equals(df_sorted["text_col"])
assert df_read["date_col"].equals(df_sorted["date_col"])
Expand Down
Loading