Skip to content

Commit

Permalink
Update dependencies (#396)
Browse files Browse the repository at this point in the history
* pin pandas 2 and adapt breaking code

* update scanorama

* set minimum python version to 3.8
  • Loading branch information
mumichae authored Jan 9, 2024
1 parent ed3e284 commit d42f919
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 25 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
with:
fetch-depth: 0

- name: Set up Python 3.9
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: 3.9
python-version: '3.10'
- name: Install pip dependencies
run: |
python -m pip install --upgrade pip
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: '3.10'

- uses: actions/cache@v3
with:
Expand All @@ -32,7 +32,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python: [3.7, 3.9]
python: ['3.8', '3.10']
os: [ubuntu-latest, macos-latest]

steps:
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
strategy:
matrix:
r: [4.2]
python: [3.9]
python: ['3.10']
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python: [3.7, 3.9]
python: ['3.8', '3.10']
os: [ubuntu-latest]

steps:
Expand Down
8 changes: 6 additions & 2 deletions scib/metrics/cell_cycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,12 @@ def cell_cycle(

if agg_func is None:
return pd.DataFrame(
[batches, scores_before, scores_after, scores_final],
columns=["batch", "before", "after", "score"],
{
"batch": pd.Series(batches, dtype=str),
"before": pd.Series(scores_before, dtype=float),
"after": pd.Series(scores_after, dtype=float),
"score": pd.Series(scores_final, dtype=float),
}
)
else:
return agg_func(scores_final)
Expand Down
2 changes: 1 addition & 1 deletion scib/metrics/trajectory.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def get_root(adata_pre, adata_post, ct_key, pseudotime_key="dpt_pseudotime", dpt
csgraph=adata_post.obsp["connectivities"], directed=False, return_labels=True
)

start_clust = adata_pre.obs.groupby([ct_key]).mean()[pseudotime_key].idxmin()
start_clust = adata_pre.obs.groupby(ct_key)[pseudotime_key].mean().idxmin()
min_dpt = adata_pre.obs[adata_pre.obs[ct_key] == start_clust].index
which_max_neigh = (
adata_post.obs["neighborhood"]
Expand Down
28 changes: 14 additions & 14 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,36 +17,36 @@ author = Malte D. Luecken, Maren Buettner, Daniel C. Strobl, Michaela F. Mueller
author_email = [email protected], [email protected]
license = MIT
url = https://github.com/theislab/scib
project_urls =
project_urls =
Pipeline = https://github.com/theislab/scib-pipeline
Reproducibility = https://theislab.github.io/scib-reproducibility
Bug Tracker = https://github.com/theislab/scib/issues
keywords =
keywords =
benchmarking
single cell
data integration
classifiers =
classifiers =
Development Status :: 3 - Alpha
Intended Audience :: Developers
Intended Audience :: Science/Research
Topic :: Software Development :: Build Tools
License :: OSI Approved :: MIT License
Programming Language :: Python :: 3
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10

[bdist_wheel]
build_number = 1

[options]
packages =
packages =
scib
scib.metrics
python_requires = >=3.7
install_requires =
python_requires = >=3.8
install_requires =
numpy
pandas<2
pandas>=2
seaborn
matplotlib
numba
Expand All @@ -65,7 +65,7 @@ install_requires =
zip_safe = False

[options.package_data]
scib =
scib =
resources/*.txt
knn_graph/*

Expand All @@ -76,10 +76,10 @@ dev = build; twine; isort; bump2version; pre-commit
docs = sphinx; sphinx_rtd_theme; myst_parser; sphinx-automodapi
louvain = python-igraph; louvain>=0.8
bbknn = bbknn ==1.3.9
scanorama = scanorama ==1.7.0
scanorama = scanorama >=1.7.4
mnn = mnnpy ==0.1.9.5
scgen = scgen >=2.1.0
scvi = scvi-tools >=0.16.1
scvi = scvi-tools >=0.16
trvae = trvae ==1.1.2
trvaep = trvaep ==0.1.0
desc = desc ==2.0.3
Expand All @@ -95,7 +95,7 @@ skip_glob = docs/*
line-length = 120
target-version = py38
include = \.pyi?$
exclude =
exclude =
.eggs
.git
.venv
Expand All @@ -104,7 +104,7 @@ exclude =

[flake8]
max-line-length = 88
ignore =
ignore =
W503
W504
E501
Expand All @@ -126,7 +126,7 @@ ignore =
RST304
C408
exclude = .git,__pycache__,build,docs/_build,dist
per-file-ignores =
per-file-ignores =
scib/*: D
tests/*: D
*/__init__.py: F401
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ def adata_pbmc_template():
adata_concat = adata_ref.concatenate(adata, batch_categories=["ref", "new"])
adata_concat.obs.louvain = adata_concat.obs.louvain.astype("category")
# fix category ordering
adata_concat.obs.louvain.cat.reorder_categories(
adata_ref.obs.louvain.cat.categories, inplace=True
adata_concat.obs["louvain"] = adata_concat.obs["louvain"].cat.set_categories(
adata_ref.obs["louvain"].cat.categories
)
adata_concat.obs["celltype"] = adata_concat.obs["louvain"]

Expand Down

0 comments on commit d42f919

Please sign in to comment.