diff --git a/README.md b/README.md index 14584237..90dbd349 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ The easiest way to install *rapids-singlecell* is to use one of the *yaml* file ``` conda env create -f conda/rsc_rapids_24.02.yml # or -mamba env create -f conda/rsc_rapids_23.12.yml +mamba env create -f conda/rsc_rapids_24.04.yml ``` ### PyPI ``` diff --git a/conda/rsc_rapids_23.12.yml b/conda/rsc_rapids_24.04.yml similarity index 95% rename from conda/rsc_rapids_23.12.yml rename to conda/rsc_rapids_24.04.yml index 6d3d4f31..121b7a07 100644 --- a/conda/rsc_rapids_23.12.yml +++ b/conda/rsc_rapids_24.04.yml @@ -5,7 +5,7 @@ channels: - conda-forge - bioconda dependencies: - - rapids=23.12 + - rapids=24.04 - python=3.10 - cuda-version=11.8 - cudnn diff --git a/docs/Installation.md b/docs/Installation.md index 8bc73cdb..4610fbc0 100644 --- a/docs/Installation.md +++ b/docs/Installation.md @@ -4,7 +4,7 @@ The easiest way to install *rapids-singlecell* is to use one of the *yaml* file ``` conda env create -f conda/rsc_rapids_24.02.yml # or -mamba env create -f conda/rsc_rapids_23.12.yml +mamba env create -f conda/rsc_rapids_24.04.yml ``` ## PyPI As of version 0.4.0 *rapids-singlecell* is now on PyPI. diff --git a/docs/release-notes/0.10.2.md b/docs/release-notes/0.10.2.md index 3753700f..827f0bb0 100644 --- a/docs/release-notes/0.10.2.md +++ b/docs/release-notes/0.10.2.md @@ -1,8 +1,9 @@ -### 0.10.2 {small}`the future` +### 0.10.2 {small}`2024-04-15` ```{rubric} Features ``` * adds the option to return the results for `get.aggregate` as sparse matrices if the input is sparse {pr}`160` {smaller}`S Dicks` +* adds support for `rapids-24.04` {pr}`166` {smaller}`S Dicks` ```{rubric} Performance @@ -12,7 +13,11 @@ ```{rubric} Bug fixes ``` +* fixes small bugs with pandas in `ligrec` {pr}`166` {smaller}`S Dicks` + ```{rubric} Misc ``` * moves the notebooks from docs into a submodule {pr}`164` {smaller}`S Dicks` +* moves tests to rapids-24.04 {pr}`166` {smaller}`S Dicks` +* unpinned pandas version {pr}`166` {smaller}`S Dicks` diff --git a/pyproject.toml b/pyproject.toml index 7567760a..4123d1da 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,7 @@ dependencies = [ "numpy>=1.17.0", "decoupler>=1.3.2", "scipy>=1.4", - "pandas<2.0.0", + "pandas", "natsort", "scikit-misc>=0.1.3", "matplotlib>=3.4", @@ -26,8 +26,8 @@ dependencies = [ ] [project.optional-dependencies] -rapids11 = ["cudf-cu11==24.2.*", "cuml-cu11==24.2.*", "cugraph-cu11==24.2.*"] -rapids12 = ["cudf-cu12==24.2.*", "cuml-cu12==24.2.*", "cugraph-cu12==24.2.*"] +rapids11 = ["cudf-cu11==24.4.*", "cuml-cu11==24.4.*", "cugraph-cu11==24.4.*"] +rapids12 = ["cudf-cu12==24.4.*", "cuml-cu12==24.4.*", "cugraph-cu12==24.4.*"] doc = [ "sphinx>=4.5.0", "sphinx-copybutton", diff --git a/src/rapids_singlecell/squidpy_gpu/_ligrec.py b/src/rapids_singlecell/squidpy_gpu/_ligrec.py index d5309854..a9c810c7 100644 --- a/src/rapids_singlecell/squidpy_gpu/_ligrec.py +++ b/src/rapids_singlecell/squidpy_gpu/_ligrec.py @@ -345,7 +345,13 @@ def find_min_gene_in_complex(_complex: str | None) -> str | None: return complexes[0] df = data[complexes].mean() - return str(df.index[df.argmin()]) + try: + return str(df.index[df.argmin()]) + except ValueError as e: + if "attempt to get argmin of an empty sequence" in str(e): + return str(df.index[0]) + else: + raise ValueError(e) if complex_policy == "min": interactions[SOURCE] = interactions[SOURCE].apply(find_min_gene_in_complex) diff --git a/tests/_data/paul15_means.pickle b/tests/_data/paul15_means.pickle index 6f102886..e368b82e 100644 Binary files a/tests/_data/paul15_means.pickle and b/tests/_data/paul15_means.pickle differ diff --git a/tests/test_ligrec.py b/tests/test_ligrec.py index c4d5914f..3da35ca3 100644 --- a/tests/test_ligrec.py +++ b/tests/test_ligrec.py @@ -40,8 +40,7 @@ def paul15() -> AnnData: @pytest.fixture() def paul15_means() -> pd.DataFrame: - file = Path(__file__).parent / Path("_data/paul15_means.pickle") - with open(file, "rb") as fin: + with open("tests/_data/paul15_means.pickle", "rb") as fin: return pickle.load(fin) @@ -185,19 +184,6 @@ def test_fdr_axis_works(self, adata: AnnData, interactions: Interactions_t): assert not np.allclose(rc["pvalues"].values[mask], ri["pvalues"].values[mask]) - """ - def test_inplace_default_key(self, adata: AnnData, interactions: Interactions_t): - res = ligrec(adata, _CK, interactions=interactions, n_perms=5, copy=False) - - assert res is None - assert isinstance(adata.uns[key], dict) - r = adata.uns[key] - assert len(r) == 3 - assert isinstance(r["means"], pd.DataFrame) - assert isinstance(r["pvalues"], pd.DataFrame) - assert isinstance(r["metadata"], pd.DataFrame) - """ - def test_inplace_key_added(self, adata: AnnData, interactions: Interactions_t): assert "foobar" not in adata.uns res = ligrec(