Skip to content

Update scRNA tutorial #159

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .github/workflows/execute-nbs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,30 +28,31 @@ jobs:
filter: blob:none
fetch-depth: 0
- name: Cache conda
uses: actions/cache@v2
uses: actions/cache@v4
env:
# Increase this value to reset cache if env file has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('environment.yml') }}
- name: Cache notebooks
uses: actions/cache@v2
uses: actions/cache@v4
env:
# Increase this value to reset cache if env file has not changed
CACHE_NUMBER: 0
with:
path: .jupyter_cache
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('environment.yml') }}
- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: tutorials
channel-priority: strict
channel-priority: flexible
environment-file: environment.yml
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
use-only-tar-bz2: true # This needs to be set for caching to work properly!
# some important packages are not available as .tar.bz2 anymore
# use-only-tar-bz2: true # This needs to be set for caching to work properly!

- name: execute notebooks
run: |
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ __pycache__/
/docs/generated/
/docs/_build/

# User configuration
/hatch.toml

# IDEs
/.idea/
/.vscode/
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ build:
python: "3.11"
sphinx:
configuration: docs/conf.py
# disable this for more lenient docs builds
fail_on_warning: true
python:
install:
- requirements: docs/patched-deps.txt
- method: pip
path: .
extra_requirements:
Expand Down
42 changes: 21 additions & 21 deletions docs/notebooks/anndata_getting_started.ipynb

Large diffs are not rendered by default.

1,145 changes: 404 additions & 741 deletions docs/notebooks/basic-scrna-tutorial.ipynb

Large diffs are not rendered by default.

377 changes: 248 additions & 129 deletions docs/notebooks/scverse_data_backed.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/notebooks/scverse_data_interoperability.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.6"
"version": "3.12.4"
}
},
"nbformat": 4,
Expand Down
167 changes: 85 additions & 82 deletions docs/notebooks/tutorial_axes_anndata_mudata.ipynb

Large diffs are not rendered by default.

147 changes: 95 additions & 52 deletions docs/notebooks/tutorial_concatenation_anndata_mudata.ipynb

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions docs/patched-deps.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# fix from here: https://github.com/executablebooks/MyST-NB/pull/597
myst-nb @ git+https://github.com/flying-sheep/MyST-NB@eval-metadata
11 changes: 6 additions & 5 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@ name: tutorials
channels:
- conda-forge
dependencies:
- python=3.10
- python=3.12
- jupyter-cache
- ipykernel
- ipython
- jupyterlab-myst
- jupytext
- pip
- pip>=24.2
- pip:
- "pandas<2"
- scanpy
- scanpy>=1.10
- scrublet
- leidenalg
- decoupler
# We need this commit: https://github.com/saezlab/decoupler-py/commit/0b3d9a975e06230ebbc32a6f97810be1730b8562
- decoupler @ git+https://github.com/saezlab/decoupler-py.git
- celltypist
- seaborn
- mudata
Expand Down
8 changes: 8 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,21 @@ docs = [
"sphinx-copybutton",
]

[tool.hatch.envs.default]
installer = "uv"

[tool.hatch.envs.registry]
features = ["registry"]
[tool.hatch.envs.registry.scripts]
validate = "python tutorial-registry/validate.py {args}"

[tool.hatch.envs.docs]
features = ["docs"]
extra-dependencies = [
"setuptools", # undeclared dependency in pybtex
# fix from here: https://github.com/executablebooks/MyST-NB/pull/597
"myst-nb @ git+https://github.com/flying-sheep/MyST-NB.git@eval-metadata",
]
[tool.hatch.envs.docs.scripts]
build = "sphinx-build -M html docs docs/_build {args}"

Expand Down