A cookiecutter/cruft template for single-cell analysis projects. It scaffolds a ready-to-run project (notebooks, scripts, a src/ package, Jupyter Book docs, pre-commit hooks) with all the project-specific values filled in automatically, and later lets you pull template improvements into a project you already generated.
You can check out the CellRank 2 and CellRank protocol reproducibility repositories for example repositories following the same outline as this template, built off an earlier version of it.
uvx cruft create https://github.com/WeilerP/sc_analysis_templateYou'll be prompted for:
project_name: human-readable project namepackage_name: Python import name (derived fromproject_name, editable)package_description,author_name,author_emailgithub_username: your personal GitHub accountgithub_namespace: the account or organization the repo will live under (defaults togithub_username)
cd into the generated directory, and follow the installation and setup instructions outlined in the project's README.
uvx cruft check # is this project behind the template?
uvx cruft update # apply template changes; writes *.rej files only on conflictIf cruft update produces .rej files, resolve the conflicts by hand and remove them — the generated project's pre-commit hooks (check-merge-conflict, forbid-to-commit) block committing until you do.
Everything a generated project gets lives under {{ cookiecutter.project_name }}/; cookiecutter.json defines the prompted variables, and hooks/pre_gen_project.py / hooks/post_gen_project.py run before/after generation. To test a change:
uvx cruft create . --no-input --output-dir /tmp/cc-out
cd "/tmp/cc-out/Example Analysis"
uv sync --all-groups && uv run pre-commit run --all-filesThis project is licensed under the terms of the BSD 3-Clause License.