From db2cc478874c567bb129502006d41b43f2d1bed4 Mon Sep 17 00:00:00 2001 From: Nayib Gloria <55710092+nayib-jose-gloria@users.noreply.github.com> Date: Wed, 21 Aug 2024 20:26:33 -0400 Subject: [PATCH] chore: bump dependencies (#7330) --- python_dependencies/processing/requirements.txt | 6 +++--- tests/unit/processing/test_h5ad_data_file.py | 2 +- tests/unit/processing/test_type_conversion_utils.py | 9 ++++----- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/python_dependencies/processing/requirements.txt b/python_dependencies/processing/requirements.txt index 972c9add3f136..3001fe45b9843 100644 --- a/python_dependencies/processing/requirements.txt +++ b/python_dependencies/processing/requirements.txt @@ -1,4 +1,4 @@ -anndata==0.8.0 +anndata==0.10.8 awscli boto3>=1.11.17 botocore>=1.14.17 @@ -6,8 +6,8 @@ cellxgene-schema dataclasses-json ddtrace==2.1.4 numba==0.59.1 -numpy==1.26.4 -pandas==1.4.4 +numpy<2 +pandas>2,<3 psutil>=5.9.0 psycopg2-binary==2.* pyarrow>=1.0 diff --git a/tests/unit/processing/test_h5ad_data_file.py b/tests/unit/processing/test_h5ad_data_file.py index 7fbeb0e7bcceb..82f7dfae89e07 100644 --- a/tests/unit/processing/test_h5ad_data_file.py +++ b/tests/unit/processing/test_h5ad_data_file.py @@ -304,7 +304,7 @@ def _write_anndata_to_file(self, anndata): def _create_sample_anndata_dataset(self): # Create X - X = np.random.rand(3, 4) + X = np.random.rand(3, 4).astype(np.float32) # Create obs random_string_category = Series(data=["a", "b", "b"], dtype="category") diff --git a/tests/unit/processing/test_type_conversion_utils.py b/tests/unit/processing/test_type_conversion_utils.py index 37f0397fc7ab0..d28185639209f 100644 --- a/tests/unit/processing/test_type_conversion_utils.py +++ b/tests/unit/processing/test_type_conversion_utils.py @@ -128,7 +128,7 @@ def __exit__(self, exc_type, exc_val, exc_tb): "expected_schema_hint": {"type": "float32"}, "logs": None if data.dtype != np.float64 else {"level": logging.WARNING, "output": "may lose precision"}, } - for dtype in [np.float16, np.float32, np.float64] + for dtype in [np.float32, np.float64] for data in [ np.arange(-128, 1000, dtype=dtype), pd.Series(np.arange(-128, 1000, dtype=dtype)), @@ -201,9 +201,9 @@ def __exit__(self, exc_type, exc_val, exc_tb): "data": data, "expected_encoding_dtype": np.float32, "expected_schema_hint": {"type": "categorical"}, - "logs": {"level": logging.WARNING, "output": "may lose precision"}, + "logs": None if dtype == np.float32 else {"level": logging.WARNING, "output": "may lose precision"}, } - for dtype in [np.float16, np.float32, np.float64] + for dtype in [np.float32, np.float64] for data in [ pd.Series(np.array([0, 1, 2], dtype=dtype), dtype="category"), pd.Series(np.array([0, 1, 2], dtype=dtype), dtype="category").cat.remove_categories([1]), @@ -216,7 +216,7 @@ def __exit__(self, exc_type, exc_val, exc_tb): "data": data, "expected_encoding_dtype": np.float32, "expected_schema_hint": {"type": "categorical"}, - "logs": {"level": logging.WARNING, "output": "may lose precision"}, + "logs": None if dtype == np.float32 else {"level": logging.WARNING, "output": "may lose precision"}, } for dtype in [ np.int8, @@ -227,7 +227,6 @@ def __exit__(self, exc_type, exc_val, exc_tb): np.uint32, np.int64, np.uint64, - np.float16, np.float32, np.float64, ]