You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CLI write path fails on anndata >= 0.11: allow_write_nullable_strings is False #23
Surfaced while running the full suite for #22 (settylab/dotto-nexus#310 work); not caused by
that branch — it reproduces at 19ee1a1 in a clean worktree. Filing rather than working around
it, per the lab-tool routing contract.
Symptom
49 tests fail in tests/test_cli.py, tests/test_cli_compute_config.py, tests/test_cli_dm_coverage.py and tests/test_cli_smooth.py, all with the same error:
RuntimeError: `anndata.settings.allow_write_nullable_strings` is False, because writing of
`pd.arrays.StringArray` is new and not supported in anndata < 0.11, still use by many people.
Opt-in to writing these arrays by toggling the setting to True.
Environment: anndata 0.12.6, kompot 0.8.0 @19ee1a1, Python 3.13.5. The rest of the suite is
green (2,021 passed, 32 skipped) — this is confined to the CLI's .h5ad write path.
The CLI writes a var/obs column backed by a pandas StringArray, which anndata refuses to
write unless the caller opts in. Because it is the writing side, the failure only shows up in
the CLI tests; the library API paths never hit it.
Why it matters beyond the tests
If the CLI genuinely cannot write its output under a current anndata, kompot de / kompot da / kompot smooth are broken for anyone on anndata >= 0.11 with default settings, not just in CI.
Worth confirming against a real invocation before deciding whether this is a test-fixture issue or
a user-facing one — I have not done that, since it is outside the scope of the work that surfaced
it.
Likely fixes
Either coerce the offending column to object/category before writing, or set anndata.settings.allow_write_nullable_strings = True at the CLI's write site (narrow, explicit)
rather than globally at import.
Activity
fix(cli): write output under anndata 0.11/0.12 with nullable strings (#…
docs(changelog): 0.9.0 entries for #23, #28/#33, #30, #31 and the 200…
test(cli): write CLI fixtures through write_output (#23)