Skip to content

Commit f1882ad

Browse files
authored
Merge pull request #326 from BiomedicalMachineLearning/newmana/upgrade
Upgrade to Python 3.10
2 parents d6f1c02 + 2fc7343 commit f1882ad

File tree

178 files changed

+4537
-4368
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

178 files changed

+4537
-4368
lines changed

.github/workflows/python-package.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,14 @@ jobs:
2626
- name: Install dependencies
2727
run: |
2828
python -m pip install --upgrade pip
29-
python -m pip install pytest
30-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
29+
pip install -e .[dev,test]
30+
- name: Check style
31+
run: |
32+
black stlearn tests
33+
ruff check stlearn tests
34+
- name: Check types
35+
run: |
36+
mypy stlearn tests
3137
- name: Test with pytest
3238
run: |
33-
pytest
39+
pytest

.gitignore

Lines changed: 59 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,71 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
15
*.pyc
2-
.ipynb_checkpoints
3-
*/.ipynb_checkpoints/*
6+
7+
# C extensions
8+
*.so
9+
10+
# Distribution / packaging
11+
.Python
412
build/
13+
docs/api/
14+
docs/_build/
15+
docs/generated/
16+
data/samples
17+
develop-eggs/
518
dist/
6-
*.egg-info
19+
downloads/
20+
eggs/
21+
.eggs/
22+
lib/
23+
lib64/
24+
parts/
25+
sdist/
26+
var/
27+
wheels/
28+
share/python-wheels/
29+
*.egg-info/
30+
.installed.cfg
31+
*.egg
32+
MANIFEST
33+
34+
# Unit tests / coverage reports
35+
htmlcov/
36+
.tox/
37+
.nox/
38+
.coverage
39+
.coverage.*
40+
.cache
41+
nosetests.xml
42+
coverage.xml
43+
*.cover
44+
*.py,cover
45+
.hypothesis/
46+
.pytest_cache/
47+
cover/
48+
49+
# Jupyter Notebook
50+
.ipynb_checkpoints
51+
*/.ipynb_checkpoints/*
752
/*.ipynb
53+
54+
# Data files
855
/*.csv
9-
output/
56+
57+
# MacOS caching
1058
.DS_Store
1159
*/.DS_Store
60+
61+
# PyCharm etc
1262
.idea/
13-
docs/_build
63+
64+
# Sphinx documentation
65+
docs.bk/_build
66+
67+
# Distribution/package/temporary files
1468
data/
1569
tiling/
16-
.pytest_cache
1770
figures/
1871
*.h5ad
19-
inferCNV/
20-
stlearn/tools/microenv/cci/junk_code.py
21-
stlearn/tools/microenv/cci/.Rhistory

.readthedocs.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,25 @@
1+
# Read the Docs configuration file
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
4+
# Required
5+
version: 2
6+
7+
# Set the OS, Python version, and other tools you might need
18
build:
2-
image: latest
9+
os: ubuntu-24.04
10+
tools:
11+
python: "3.10"
12+
13+
# Build documentation in the "docs/" directory with Sphinx
14+
sphinx:
15+
configuration: docs/conf.py
16+
17+
# Optionally, but recommended,
18+
# declare the Python requirements required to build your documentation
19+
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
320
python:
4-
version: 3.8
21+
install:
22+
- method: pip
23+
path: .
24+
extra_requirements:
25+
- dev

AUTHORS.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ Credits
55
Development Lead
66
----------------
77

8-
* Genomics and Machine Learning lab
8+
* Genomics and Machine Learning Lab
99

1010
Contributors
1111
------------
1212

13-
None yet. Why not be the first?
13+
* Brad Balderson
14+
* Andrew Newman
15+
* Duy Pham
16+
* Xiao Tan

CONTRIBUTING.rst

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,26 +64,36 @@ Ready to contribute? Here's how to set up `stlearn` for local development.
6464

6565
$ git clone git@github.com:your_name_here/stlearn.git
6666

67-
3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::
67+
3. Install your local copy into a virtualenv. This is how you set up your fork for local development::
6868

69-
$ mkvirtualenv stlearn
69+
$ conda create -n stlearn-dev python=3.10 --y
70+
$ conda activate stlearn-dev
7071
$ cd stlearn/
71-
$ python setup.py develop
72+
$ pip install -e .[dev,test]
73+
74+
Or if you prefer pip/virtualenv::
75+
76+
$ python -m venv stlearn-env
77+
$ source stlearn-env/bin/activate # On Windows: stlearn-env\Scripts\activate
78+
$ cd stlearn/
79+
$ pip install -e .[dev,test]
7280

7381
4. Create a branch for local development::
7482

7583
$ git checkout -b name-of-your-bugfix-or-feature
7684

7785
Now you can make your changes locally.
7886

79-
5. When you're done making changes, check that your changes pass flake8 and the
80-
tests, including testing other Python versions with tox::
87+
5. When you're done making changes, check that your changes pass linters and tests::
8188

82-
$ flake8 stlearn tests
83-
$ python setup.py test or pytest
84-
$ tox
89+
$ black stlearn tests
90+
$ ruff check stlearn tests
91+
$ mypy stlearn tests
92+
$ pytest
93+
94+
Or run everything with tox::
8595

86-
To get flake8 and tox, just pip install them into your virtualenv.
96+
$ tox
8797

8898
6. Commit your changes and push your branch to GitHub::
8999

HISTORY.rst

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

5+
1.1.0 (2025-07-02)
6+
------------------
7+
* Support Python 3.10.x
8+
* Added quality checks black, ruff and mypy and fixed appropriate source code.
9+
* Copy parameters now work with the same semantics as scanpy.
10+
* Library upgrades for leidenalg, louvain, numba, numpy, scanpy, and tensorflow.
11+
* datasets.xenium_sge - loads Xenium data (and caches it) similar to scanpy.visium_sge.
12+
13+
API and Bug Fixes:
14+
* Xenium TIFF and cell positions are now aligned.
15+
* Consistent with type annotations - mainly missing None annotations.
16+
* pl.cluster_plot - Does not keep colours from previous runs when clustering.
17+
* pl.trajectory.pseudotime_plot - Fix typing of cluster values in .uns["split_node"].
18+
* Removed datasets.example_bcba - Replaced with wrapper for scanpy.visium_sge.
19+
* Moved spatials directory to spatial, cleaned up pl and tl packages.
20+
521
0.4.11 (2022-11-25)
622
------------------
23+
724
0.4.10 (2022-11-22)
825
------------------
26+
927
0.4.8 (2022-06-15)
1028
------------------
29+
1130
0.4.7 (2022-03-28)
1231
------------------
32+
1333
0.4.6 (2022-03-09)
1434
------------------
35+
1536
0.4.5 (2022-03-02)
1637
------------------
38+
1739
0.4.0 (2022-02-03)
1840
------------------
41+
1942
0.3.2 (2021-03-29)
2043
------------------
44+
2145
0.3.1 (2020-12-24)
2246
------------------
47+
2348
0.2.7 (2020-09-12)
2449
------------------
50+
2551
0.2.6 (2020-08-04)
52+
------------------

LICENSE

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
2-
31
BSD License
42

5-
Copyright (c) 2020, Genomics and Machine Learning lab
3+
Copyright (c) 2020-2025, Genomics and Machine Learning lab
64
All rights reserved.
75

86
Redistribution and use in source and binary forms, with or without modification,

docs/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Minimal makefile for Sphinx documentation
22
#
33

4-
# You can set these variables from the command line.
5-
SPHINXOPTS =
6-
SPHINXBUILD = python -msphinx
7-
SPHINXPROJ = stlearn
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
88
SOURCEDIR = .
99
BUILDDIR = _build
1010

docs/_static/css/custom.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/* Custom styling for stLearn documentation */
2+
3+
p img {
4+
vertical-align: bottom
5+
}

0 commit comments

Comments
 (0)