-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
77 lines (65 loc) · 2.47 KB
/
pyproject.toml
File metadata and controls
77 lines (65 loc) · 2.47 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "spatialdata-plot-notebooks"
version = "0.0.0"
description = "Executable notebooks demonstrating spatialdata-plot on real spatial-omics datasets."
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.11"
authors = [{ name = "scverse" }]
# The package itself ships no Python code; this is a pyproject for tooling +
# environment management. The `exec` extra installs everything needed to run
# the notebooks end-to-end.
[project.optional-dependencies]
exec = [
"spatialdata-plot>=0.3.4",
"squidpy",
"jupyter",
"ipykernel",
"watermark",
]
dev = [
"pre-commit>=3.0",
"ruff",
"nbstripout",
]
[project.urls]
Source = "https://github.com/scverse/spatialdata-plot-notebooks"
Documentation = "https://spatialdata.scverse.org/projects/plot/en/latest/"
[tool.hatch.build.targets.wheel]
bypass-selection = true
# Pixi-managed environment for running and authoring the notebooks. After
# `pixi install`, register the Jupyter kernel once with `pixi run
# kernel-install`; the kernel will point at the pixi env's Python, so
# `pixi run lab` (or any external Jupyter) can execute the notebooks
# against the exact pinned dependencies.
[tool.pixi]
workspace.channels = ["conda-forge"]
workspace.platforms = ["linux-64", "osx-arm64"]
dependencies.python = ">=3.11"
dependencies.jupyterlab = "*"
dependencies.ipykernel = "*"
dependencies.nbconvert = "*"
dependencies.watermark = "*"
pypi-dependencies.spatialdata-plot = ">=0.3"
pypi-dependencies.squidpy = "*"
tasks.kernel-install = 'python -m ipykernel install --user --name sdata-plot-notebooks --display-name "sdata-plot-notebooks"'
tasks.lab = "jupyter lab"
tasks.execute = "jupyter nbconvert --to notebook --execute --inplace tutorials/*.ipynb examples/*.ipynb"
[tool.ruff]
line-length = 120
target-version = "py311"
[tool.ruff.lint]
# Notebooks have different idioms than production code (bare expressions to
# render values, repeated assignment to inspect state). Skip bugbear (B*) and
# enforce only the rules that catch real defects.
select = ["E", "F", "W", "I", "UP"]
ignore = ["E501"] # long lines fine in notebooks
[tool.ruff.lint.per-file-ignores]
"*.ipynb" = ["E402"] # imports after markdown intro cells are common
# nbqa runs ruff against a converted .py file, so per-file-ignores keyed on
# *.ipynb don't match. Pass notebook-specific overrides through here instead.
[tool.nbqa.addopts]
ruff = ["--extend-ignore=E402"]