-
Notifications
You must be signed in to change notification settings - Fork 56
102 lines (89 loc) · 3.61 KB
/
test_tutorials.yml
File metadata and controls
102 lines (89 loc) · 3.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: Test tutorials
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
# to fail on error in multiline statements (-e), in pipes (-o pipefail), and on unset variables (-u).
shell: bash -euo pipefail {0}
env:
NOTEBOOK_PATH: docs/tutorials/notebooks
strategy:
fail-fast: false
matrix:
notebook: [
"augur.ipynb",
"cinemaot.ipynb",
"differential_gene_expression.ipynb",
"distances.ipynb",
"distance_tests.ipynb",
"enrichment.ipynb",
"guide_rna_assignment.ipynb",
"milo.ipynb",
"mixscape.ipynb",
"sccoda.ipynb",
# "perturbation_space.ipynb", seems to run OOM as of Jax implementation
# "dialogue.ipynb", takes too long
# "tasccoda.ipynb", a pain to get running because of the required QT dependency. The QT action leads to a dead kernel
# also no use cases yet
]
steps:
- uses: actions/checkout@v6
with:
filter: blob:none
fetch-depth: 0
submodules: "true"
- name: Cache pertpy's metadata folder
uses: actions/cache@v4
with:
path: cache
key: ${{ runner.os }}-pertpy-cache-${{ hashFiles('pertpy/metadata/**') }}
restore-keys: |
${{ runner.os }}-pertpy-cache
- name: Cache data aka datasets folder
uses: actions/cache@v4
with:
path: data
key: ${{ runner.os }}-pertpy-data
restore-keys: |
${{ runner.os }}-pertpy-data
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.14"
- name: Install R
uses: r-lib/actions/setup-r@v2
with:
r-version: "4.5.3"
- name: Cache R packages
id: r-cache
uses: actions/cache@v3
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-r-${{ hashFiles('**/pertpy/tools/_milo.py') }}
restore-keys: ${{ runner.os }}-r-
- name: Install R dependencies
if: steps.r-cache.outputs.cache-hit != 'true'
run: |
mkdir -p ${{ env.R_LIBS_USER }}
Rscript --vanilla -e "install.packages(c('BiocManager', 'statmod'), repos='https://cran.r-project.org'); BiocManager::install('edgeR', lib='${{ env.R_LIBS_USER }}')"
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: pyproject.toml
- name: Install dependencies
run: |
uv pip install --system rpy2 decoupler muon
uv pip install --system ".[dev,test,all]"
uv pip install --system nbconvert ipykernel
- name: Run ${{ matrix.notebook }} Notebook
run: jupyter nbconvert --to notebook --execute ${{ env.NOTEBOOK_PATH }}/${{ matrix.notebook }}