Skip to content

Instantly share code, notes, and snippets.

@flying-sheep
Created August 27, 2024 14:35
Show Gist options
  • Save flying-sheep/0de2c6b9274bfcdfa83a70fc15841166 to your computer and use it in GitHub Desktop.
Save flying-sheep/0de2c6b9274bfcdfa83a70fc15841166 to your computer and use it in GitHub Desktop.
My scanpy hatch.toml
[metadata]
allow-direct-references = true
[envs.default]
installer = "uv"
#dependencies = ["ipykernel", "snakeviz", "py-spy", "ipywidgets", "ipynbname", "ipympl"]
features = ["dev"]
[envs.hatch-test]
default-args = []
extra-dependencies = [
"scikit-misc",
# "scanorama",
# "zappy",
"dask[diagnostics]", "dask-ml",
# "pyarrow",
# data
# "pooch",
# "openpyxl",
# profilers
# "memory-profiler",
"pyinstrument",
# ipython
"ipykernel",
# "ipywidgets", "ipynbname",
]
features = ["dev", "test"]#, "skmisc", "bbknn", "scrublet"]
[[envs.hatch-test.matrix]]
deps = ["stable", "pre", "min"]
[envs.hatch-test.overrides]
matrix.deps.env-vars = [
{ key = "UV_PRERELEASE", value = "allow", if = ["pre"] },
{ key = "DEPENDENCIES_VERSION", value = "pre-release", if = ["pre"] },
{ key = "UV_RESOLUTION", value = "lowest-direct", if = ["min"] },
]
matrix.deps.python = [
{ if = ["min"], value = "3.9" },
{ if = ["stable", "pre"], value = "3.12" },
]
matrix.deps.extra-dependencies = [
{ if = ["stable"], value = "zappy" },
{ if = ["stable"], value = "openpyxl" },
{ if = ["pre"], value = "anndata @ git+https://github.com/scverse/anndata.git" },
{ if = ["pre"], value = "zarr<3" },
]
#[envs.hatch-test]
#scripts.profile-collect = [
# "py-spy record --format=speedscope -o /tmp/scanpy.speedscope -- pytest --collect-only || true",
# "speedscope /tmp/scanpy.speedscope",
#
#scripts.profile-import = [
# "python -X importtime -m pytest --collect-only 2>/tmp/import.prof",
# "tuna /tmp/import.prof",
#]
[envs.docs]
features = ["doc"]
dependencies = ["setuptools"] # https://bitbucket.org/pybtex-devs/pybtex/issues/169
[envs.docs.scripts]
build = "sphinx-build -M html docs docs/_build -W --keep-going {args}"
clean = "git clean -fX -- docs"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment