Skip to content

Commit 375bdb1

Browse files
authored
Merge pull request #338 from BiomedicalMachineLearning/newmana/support-python-versions
Newmana/support python versions 3.11 and 3.12.
2 parents 533eea2 + 3cda78b commit 375bdb1

13 files changed

Lines changed: 117 additions & 60 deletions

File tree

.github/workflows/python-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
strategy:
1717
matrix:
18-
python-version: [3.10.18]
18+
python-version: [3.12.12]
1919

2020
steps:
2121
- uses: actions/checkout@v2

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ version: 2
88
build:
99
os: ubuntu-24.04
1010
tools:
11-
python: "3.10"
11+
python: "3.12"
1212

1313
# Build documentation in the "docs/" directory with Sphinx
1414
sphinx:

CONTRIBUTING.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,18 @@ Ready to contribute? Here's how to set up `stlearn` for local development.
6666

6767
3. Install your local copy into a virtualenv. This is how you set up your fork for local development::
6868

69-
$ conda create -n stlearn-dev python=3.10 --y
69+
Run the following:
70+
$ conda create -n stlearn-dev python=3.12 --y
7071
$ conda activate stlearn-dev
7172
$ cd stlearn/
7273
$ pip install -e .[dev,test]
7374

75+
If you get an error for louvain package on MacOS, make sure you have cmake installed first (if you have brew):
76+
$ brew install cmake
77+
78+
You can also use conda to install these dependencies (after creating the environment):
79+
$ conda install -c conda-forge louvain leidenalg python-igraph
80+
7481
Or if you prefer pip/virtualenv::
7582

7683
$ python -m venv stlearn-env

HISTORY.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
History
33
=======
44

5+
1.2.0 (2025-10-20)
6+
------------------
7+
* Added support for Python 3.11 and 3.12.
8+
* Upgraded scanpy to 1.11 - clustering will be different.
9+
* Added more CCI tests.
10+
511
1.1.5 (2025-09-17)
612
------------------
713
* Add Leiden clustering wrapper.

docs/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Install by PyPi
1313
Prepare conda environment for stLearn
1414
::
1515

16-
conda create -n stlearn python=3.10 --y
16+
conda create -n stlearn python=3.12 --y
1717
conda activate stlearn
1818

1919
**Step 2:**

docs/release_notes/1.2.0.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
1.1.5 `2025-10-20`
2+
~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
.. rubric:: Features
5+
* Added support for Python 3.11 and 3.12.
6+
* Upgraded scanpy to 1.11 - clustering will be different.
7+
* Added more CCI tests.

docs/release_notes/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
Release Notes
22
===================================================
33

4+
.. include:: 1.2.0.rst
5+
46
.. include:: 1.1.5.rst
57

68
.. include:: 1.1.1.rst

pyproject.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,23 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "stlearn"
7-
version = "1.1.5"
7+
version = "1.2.0"
88
authors = [
99
{name = "Genomics and Machine Learning lab", email = "andrew.newman@uq.edu.au"},
1010
]
1111
description = "A downstream analysis toolkit for Spatial Transcriptomic data"
1212
readme = {file = "README.md", content-type = "text/markdown"}
1313
license = {text = "BSD license"}
14-
requires-python = "~=3.10.0"
14+
requires-python = ">=3.10,<3.13"
1515
keywords = ["stlearn"]
1616
classifiers = [
1717
"Development Status :: 5 - Production/Stable",
1818
"Intended Audience :: Developers",
1919
"License :: OSI Approved :: BSD License",
2020
"Natural Language :: English",
2121
"Programming Language :: Python :: 3.10",
22+
"Programming Language :: Python :: 3.11",
23+
"Programming Language :: Python :: 3.12",
2224
]
2325
dynamic = ["dependencies"]
2426

@@ -34,6 +36,7 @@ dev = [
3436
"furo==2024.8.6",
3537
"myst-parser>=0.18",
3638
"nbsphinx>=0.9.0",
39+
"types-tensorflow>=2.8.0",
3740
"sphinx-autodoc-typehints>=1.24.0",
3841
"sphinx-autosummary-accessors>=2023.4.0",
3942
]

requirements.txt

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
bokeh==3.7.3
2-
click==8.2.1
3-
leidenalg==0.10.2
4-
louvain==0.8.2
5-
numba==0.58.1
6-
numpy==1.26.4
7-
pillow==11.3.0
8-
scanpy==1.10.4
9-
scikit-image==0.22.0
10-
tensorflow==2.14.1
11-
keras==2.14.0
12-
types-tensorflow>=2.8.0
13-
imageio==2.37.0
14-
scipy==1.11.4
15-
scikit-learn==1.7.0
1+
bokeh>=3.7.0,<4.0
2+
click>=8.2.0,<9.0
3+
leidenalg>=0.10.0,<0.11
4+
louvain>=0.8.2
5+
numba>=0.58.1
6+
numpy>=1.26.0,<2.0
7+
pillow>=11.0.0,<12.0
8+
scanpy>=1.11.0,<2.0
9+
scikit-image>=0.22.0,<0.23
10+
tensorflow>=2.14.1
11+
keras>=2.14.0
12+
pandas>=2.3.0
13+
imageio>=2.37.0,<3.0
14+
scipy>=1.11.0,<2.0
15+
scikit-learn>=1.7.0,<2.0

stlearn/embedding/pca.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def run_pca(
99
data: AnnData | np.ndarray | spmatrix,
1010
n_comps: int = 50,
1111
zero_center: bool | None = True,
12-
svd_solver: str = "auto",
12+
svd_solver: str = "arpack",
1313
random_state: int | RandomState | None = 0,
1414
return_info: bool = False,
1515
use_highly_variable: bool | None = None,
@@ -38,11 +38,11 @@ def run_pca(
3838
Passing `None` decides automatically based on sparseness of the data.
3939
svd_solver
4040
SVD solver to use:
41-
`'arpack'`
41+
`'arpack'` (the default - deterministic)
4242
for the ARPACK wrapper in SciPy (:func:`~scipy.sparse.linalg.svds`)
4343
`'randomized'`
4444
for the randomized algorithm due to Halko (2009).
45-
`'auto'` (the default)
45+
`'auto'`
4646
chooses automatically depending on the size of the problem.
4747
random_state
4848
Change to use different initial states for the optimization.

0 commit comments

Comments
 (0)