Skip to content

Commit d72c1e4

Browse files
authored
Move package management over to uv (#24)
* Moved over * Done
1 parent a0df340 commit d72c1e4

File tree

8 files changed

+1360
-447
lines changed

8 files changed

+1360
-447
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@ jobs:
77
runs-on: self-hosted
88
steps:
99
- uses: actions/checkout@v4
10-
- name: Setup rye
11-
uses: eifinger/setup-rye@v4
10+
- name: Install uv
11+
uses: astral-sh/setup-uv@v6
1212
with:
1313
enable-cache: true
14-
version: '0.39.0'
1514
- name: Setup environment
1615
run: make .venv
1716
- name: Build figures

.github/workflows/test.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,15 @@ jobs:
1010
runs-on: self-hosted
1111
steps:
1212
- uses: actions/checkout@v4
13-
- name: Setup rye
14-
uses: eifinger/setup-rye@v4
13+
- name: Install uv
14+
uses: astral-sh/setup-uv@v6
1515
with:
1616
enable-cache: true
17-
version: '0.39.0'
1817
- name: Setup environment
1918
run: make .venv
2019
- name: Test with pytest
2120
run: make coverage.xml
2221
- name: Check formatting
23-
run: rye fmt --check
22+
run: uv run ruff format --check
2423
- name: Check linting
25-
run: rye lint
24+
run: uv run ruff check

makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,24 @@ all: $(allOutput)
99

1010
output/figure%.svg: pf2barcode/figures/figure%.py .venv
1111
@ mkdir -p ./output
12-
rye run fbuild $*
12+
uv run fbuild $*
1313

1414
.venv: pyproject.toml
15-
rye sync
15+
uv sync --all-extras
1616

1717
test: .venv
18-
rye run pytest -s -x -v pf2barcode/tests/test_import.py
18+
uv run pytest -s -x -v pf2barcode/tests/test_import.py
1919

2020
clean:
2121
rm -rf output profile profile.svg
2222
rm -rf factor_cache
2323

2424
pyright: .venv
25-
rye run pyright pf2barcode
25+
uv run pyright pf2barcode
2626

2727
coverage.xml: .venv
28-
rye run pytest --cov=pf2barcode --cov-report xml:coverage.xml
28+
uv run pytest --cov=pf2barcode --cov-report xml:coverage.xml
2929

3030
testprofile: .venv
31-
rye run python3 -m cProfile -o profile -m pytest -s -v -x
31+
uv run python3 -m cProfile -o profile -m pytest -s -v -x
3232
gprof2dot -f pstats --node-thres=5.0 profile | dot -Tsvg -o profile.svg

pf2barcode/geneontology.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import pandas as pd
33

44

5-
def geneOntology(X, var_names) -> pd.DataFrame:
5+
def geneOntology(X, var_names: list[str]) -> pd.DataFrame:
66
"""Plots top Gene Ontology terms for molecular function,
77
biological process, cellular component. Uses factors as
88
input for function"""

pyproject.toml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
[project]
22
name = "pf2barcode"
33
version = "0.1.0"
4+
readme = "README.md"
45
description = "Single cell analysis across conditions using PARAFAC2."
56
authors = [
67
{ name = "Aaron Meyer", email = "git@asmlab.org" }
78
]
89
license = { text = "MIT" }
9-
requires-python = ">=3.12,<3.13"
10+
requires-python = ">=3.13.1,<3.14"
1011
dependencies = [
1112
"numpy>=2.2",
12-
"scipy==1.15.3",
13+
"scipy>=1.16",
1314
"scikit-learn>=1.7",
1415
"seaborn>=0.13",
1516
"pandas>=2.3",
1617
"gseapy>=1.1",
17-
"scanpy>=1.11.2",
18+
"scanpy>=1.11",
1819
"ipykernel>=6.29",
19-
"anndata>=0.11.4",
20+
"anndata>=0.12",
2021
]
2122

22-
[tool.rye]
23-
managed = true
24-
dev-dependencies = [
23+
[dependency-groups]
24+
dev = [
25+
"pyright>=1.1.406",
2526
"pytest>=8.2.0",
26-
"pytest-cov>=5.0",
27+
"pytest-cov>=6.0",
28+
"ruff>=0.14.1",
2729
]
2830

29-
readme = "README.md"
30-
3131
[project.scripts]
3232
fbuild = "pf2barcode.figures.common:genFigure"
3333

requirements-dev.lock

Lines changed: 0 additions & 216 deletions
This file was deleted.

0 commit comments

Comments
 (0)