Skip to content

Commit

Permalink
Merging main branch into staging branch
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Aug 22, 2024
2 parents 0c386de + db2cc47 commit 6d33571
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
6 changes: 3 additions & 3 deletions python_dependencies/processing/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
anndata==0.8.0
anndata==0.10.8
awscli
boto3>=1.11.17
botocore>=1.14.17
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
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/processing/test_h5ad_data_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
9 changes: 4 additions & 5 deletions tests/unit/processing/test_type_conversion_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
Expand Down Expand Up @@ -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]),
Expand All @@ -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,
Expand All @@ -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,
]
Expand Down

0 comments on commit 6d33571

Please sign in to comment.