Skip to content

Commit a42d208

Browse files
committed
fix such that anndata>=0.12.6 is acceptable
1 parent 7d742bb commit a42d208

3 files changed

Lines changed: 14 additions & 19 deletions

File tree

docs/extensions/skip_inherited.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,9 @@ def skip_member_handler(
3333

3434
def setup(app: Sphinx) -> None:
3535
"""Setup lamindb for CI."""
36-
try:
37-
import lamindb as ln
38-
except ImportError:
39-
# lamindb is currently incompatible with anndata>=0.12.13 (lamindb<=2.4.2
40-
# caps anndata<=0.12.10), so it is excluded from the doc extras. Skip the
41-
# CI bootstrap when it isn't installed.
42-
pass
43-
else:
44-
with suppress(RuntimeError):
45-
ln.setup.init(storage="/tmp/lamindb")
36+
import lamindb as ln
37+
38+
with suppress(RuntimeError):
39+
ln.setup.init(storage="/tmp/lamindb")
4640

4741
app.connect("autodoc-skip-member", skip_member_handler)

pyproject.toml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ classifiers = [
2323
"Programming Language :: Python :: 3.14",
2424
]
2525
dependencies = [
26-
"anndata>=0.12.13",
26+
"anndata>=0.12.6",
2727
"duckdb",
2828
"fast-array-utils[sparse]",
2929
"filelock",
@@ -41,13 +41,7 @@ optional-dependencies.dev = [
4141
]
4242
optional-dependencies.doc = [
4343
"docutils>=0.8,!=0.18.*,!=0.19.*",
44-
# Do not include vitessce[all] in doc: https://github.com/keller-mark/esbuild-py/issues/19.
45-
# Do not include ehrdata[lamin] in doc: every lamindb release through 2.4.2 caps
46-
# anndata<=0.12.10 (via lamindb-core[full]), which conflicts with ehrdata's
47-
# anndata>=0.12.13 pin. Notebooks aren't executed (nb_execution_mode = "off"), and
48-
# the only references to lamindb in conf.py are an intersphinx URL and a qualname
49-
# override, neither of which needs the package installed.
50-
"ehrdata[torch]",
44+
"ehrdata[lamin,torch]", # do not include vitessce[all] in doc: https://github.com/keller-mark/esbuild-py/issues/19
5145
"ipykernel",
5246
"ipython",
5347
"myst-nb>=1.1",
@@ -72,6 +66,10 @@ optional-dependencies.lamin = [
7266
optional-dependencies.test = [
7367
"coverage>=7.10",
7468
"dask",
69+
# No lamindb wheel/sdist is available for Python 3.14; pinning >=2.1 also prevents
70+
# uv from backtracking to ancient lamindb 0.50.x (universal_pathlib==0.1.0, which
71+
# imports `_PosixFlavour` removed in Python 3.12).
72+
"lamindb>=2.1; python_version<'3.14'",
7573
"pytest",
7674
"pytest-cov",
7775
"torch",

src/ehrdata/core/ehrdata.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,10 @@ class EHRData(AnnData):
202202
_t: pd.DataFrame | None
203203
_n_t: int
204204

205-
layers: AlignedMappingProperty3D = AlignedMappingProperty3D(Layers3D)
205+
# Use keyword arguments so this works across the 0.12.x dataclass-field re-ordering:
206+
# 0.12.6-0.12.11 require `(name, cls)`; 0.12.12+ make `name` optional (populated by
207+
# `__set_name__`) and only require `cls`. Passing both by keyword satisfies both.
208+
layers: AlignedMappingProperty3D = AlignedMappingProperty3D(name="layers", cls=Layers3D)
206209

207210
def __init__(
208211
self,

0 commit comments

Comments
 (0)