Skip to content

anndata_dask_array.ipynb: copy tweaks / improvements #19

New issue

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

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

Already on GitHub? # to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Docker-based environment for regenerating notebooks deterministically; see `regenerate.sh`
FROM python:3.11.8
RUN apt-get update -y \
&& apt-get install -y graphviz \
&& pip install anndata dask graphviz jupyter juq.py papermill 'zarr<3'
WORKDIR src
ENTRYPOINT [ "juq", "papermill", "run", "-iI" ]
342 changes: 207 additions & 135 deletions anndata_dask_array.ipynb

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions regenerate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash
# Deterministically regenerate notebooks in this directory:
# ```bash
# ./regenerate.sh anndata_dask_array # Regenerate a single notebook
# ./regenerate.sh # Regenerate all notebooks
# ```

set -eo pipefail

cd "$(dirname "${BASH_SOURCE[0]}")"

name=anndata-notebooks
docker build -t $name .

if [ $# -eq 0 ]; then
set -- *.ipynb
fi

for nb in "$@"; do
nb="${nb%.ipynb}.ipynb"
echo "Executing nb: $nb" >&2
docker run -i --rm "--name=$name" -v "$PWD:/src" "$name" "$nb"
done