Skip to content

Commit c83bef7

Browse files
committed
restore n_jobs parameters (xenium) for backward compatibility
1 parent 473b2ae commit c83bef7

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/spatialdata_io/readers/xenium.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ def xenium(
7070
morphology_focus: bool = True,
7171
aligned_images: bool = True,
7272
cells_table: bool = True,
73+
n_jobs: int | None = None,
7374
gex_only: bool = True,
7475
imread_kwargs: Mapping[str, Any] = MappingProxyType({}),
7576
image_models_kwargs: Mapping[str, Any] = MappingProxyType({}),
@@ -122,6 +123,10 @@ def xenium(
122123
`False` and use the `xenium_aligned_image` function directly.
123124
cells_table
124125
Whether to read the cell annotations in the `AnnData` table.
126+
n_jobs
127+
.. deprecated::
128+
``n_jobs`` is not used anymore and will be removed in a future release. The reading time of shapes is now
129+
greatly improved and does not require parallelization.
125130
gex_only
126131
Whether to load only the "Gene Expression" feature type.
127132
imread_kwargs
@@ -154,6 +159,13 @@ def xenium(
154159
... )
155160
>>> sdata.write("path/to/data.zarr")
156161
"""
162+
if n_jobs is not None:
163+
warnings.warn(
164+
"The `n_jobs` parameter is deprecated and will be removed in a future release. "
165+
"The reading time of shapes is now greatly improved and does not require parallelization.",
166+
DeprecationWarning,
167+
stacklevel=2,
168+
)
157169
image_models_kwargs, labels_models_kwargs = _initialize_raster_models_kwargs(
158170
image_models_kwargs, labels_models_kwargs
159171
)

0 commit comments

Comments
 (0)