From 5763bc387d7745bc38316227d62cbd9cd4522bb1 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 18:06:45 +0000 Subject: [PATCH 1/6] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 24.8.0 → 24.10.0](https://github.com/psf/black/compare/24.8.0...24.10.0) - [github.com/asottile/blacken-docs: 1.18.0 → 1.19.1](https://github.com/asottile/blacken-docs/compare/1.18.0...1.19.1) - [github.com/pre-commit/mirrors-mypy: v1.11.2 → v1.14.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.11.2...v1.14.0) - [github.com/astral-sh/ruff-pre-commit: v0.6.4 → v0.8.4](https://github.com/astral-sh/ruff-pre-commit/compare/v0.6.4...v0.8.4) --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7bf20d66..20953e82 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ ci: skip: [] repos: - repo: https://github.com/psf/black - rev: 24.8.0 + rev: 24.10.0 hooks: - id: black - repo: https://github.com/pre-commit/mirrors-prettier @@ -17,17 +17,17 @@ repos: hooks: - id: prettier - repo: https://github.com/asottile/blacken-docs - rev: 1.18.0 + rev: 1.19.1 hooks: - id: blacken-docs - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.11.2 + rev: v1.14.0 hooks: - id: mypy additional_dependencies: [numpy, types-requests] exclude: tests/|docs/ - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.6.4 + rev: v0.8.4 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] From f4a3f70648f9feb89c35429fd46668fd823d651b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 18:09:53 +0000 Subject: [PATCH 2/6] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/spatialdata_plot/pl/basic.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/spatialdata_plot/pl/basic.py b/src/spatialdata_plot/pl/basic.py index d68f0db3..3cdf77fc 100644 --- a/src/spatialdata_plot/pl/basic.py +++ b/src/spatialdata_plot/pl/basic.py @@ -272,7 +272,7 @@ def render_shapes( scale=scale, table_name=table_name, method=method, - ds_reduction=kwargs.get("datashader_reduction", None), + ds_reduction=kwargs.get("datashader_reduction"), ) sdata = self._copy() @@ -296,7 +296,7 @@ def render_shapes( palette=param_values["palette"], outline_alpha=param_values["outline_alpha"], fill_alpha=param_values["fill_alpha"], - transfunc=kwargs.get("transfunc", None), + transfunc=kwargs.get("transfunc"), table_name=param_values["table_name"], zorder=n_steps, method=param_values["method"], @@ -403,7 +403,7 @@ def render_points( norm=norm, size=size, table_name=table_name, - ds_reduction=kwargs.get("datashader_reduction", None), + ds_reduction=kwargs.get("datashader_reduction"), ) if method is not None: @@ -430,7 +430,7 @@ def render_points( cmap_params=cmap_params, palette=param_values["palette"], alpha=param_values["alpha"], - transfunc=kwargs.get("transfunc", None), + transfunc=kwargs.get("transfunc"), size=param_values["size"], table_name=param_values["table_name"], zorder=n_steps, @@ -675,7 +675,7 @@ def render_labels( palette=param_values["palette"], outline_alpha=param_values["outline_alpha"], fill_alpha=param_values["fill_alpha"], - transfunc=kwargs.get("transfunc", None), + transfunc=kwargs.get("transfunc"), scale=param_values["scale"], table_name=param_values["table_name"], zorder=n_steps, From 15cb29a02d0fed5289c411a113a1cca6c0a6125f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 26 Dec 2024 17:58:45 +0000 Subject: [PATCH 3/6] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- CHANGELOG.md | 128 +++++++++++++++++++++++++-------------------------- 1 file changed, 64 insertions(+), 64 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 19393061..f2bb14e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,169 +12,169 @@ and this project adheres to [Semantic Versioning][]. ### Fixed -- Transformations of Points and Shapes are now applied before rendering with datashader (#378) -- Fix bug due to `sc.get.obs_df()` returning a different type (#393) -- Allowing instance mismatch between shapes and tables (#396) -- Fix bug when plotting categorical points with datashader (#395) +- Transformations of Points and Shapes are now applied before rendering with datashader (#378) +- Fix bug due to `sc.get.obs_df()` returning a different type (#393) +- Allowing instance mismatch between shapes and tables (#396) +- Fix bug when plotting categorical points with datashader (#395) ## [0.2.8] - 2024-11-26 ### Changed -- Support for `xarray.DataTree` (which moved from `datatree.DataTree`) (#380) +- Support for `xarray.DataTree` (which moved from `datatree.DataTree`) (#380) ## [0.2.7] - 2024-10-24 ### Added -- The user can now specify `datashader_reduction` to control the rendering behavior (#309) -- Rendering outlines of shapes with datashader works now (#309) +- The user can now specify `datashader_reduction` to control the rendering behavior (#309) +- Rendering outlines of shapes with datashader works now (#309) ### Fixed -- datashader now uses canvas size = image size which speeds up the rendering (#309) -- datashader now uses the `linear` as interpolation method for colormaps instead of the default `eq_hist` to make it equivalent to matplotlib (#309) -- point sizes of datashader now agree with matplotlib also when dpi != 100 (#309) -- Giving a custom colormap when rendering a multiscale image now works (#586) +- datashader now uses canvas size = image size which speeds up the rendering (#309) +- datashader now uses the `linear` as interpolation method for colormaps instead of the default `eq_hist` to make it equivalent to matplotlib (#309) +- point sizes of datashader now agree with matplotlib also when dpi != 100 (#309) +- Giving a custom colormap when rendering a multiscale image now works (#586) ## [0.2.6] - 2024-09-04 ### Changed -- Lowered RMSE-threshold for plot-based tests from 45 to 15 (#344) -- When subsetting to `groups`, `NA` isn't automatically added to legend (#344) -- When rendering a single image channel, a colorbar is now shown (#346) -- Removed `percentiles_for_norm` parameter (#346) -- Changed `norm` to no longer accept bools, only `mpl.colors.Normalise` or `None` (#346) +- Lowered RMSE-threshold for plot-based tests from 45 to 15 (#344) +- When subsetting to `groups`, `NA` isn't automatically added to legend (#344) +- When rendering a single image channel, a colorbar is now shown (#346) +- Removed `percentiles_for_norm` parameter (#346) +- Changed `norm` to no longer accept bools, only `mpl.colors.Normalise` or `None` (#346) ### Fixed -- Filtering with `groups` now preserves original cmap (#344) -- Non-selected `groups` are now not shown in `na_color` (#344) -- Several issues associated with `norm` and `colorbar` (#346) +- Filtering with `groups` now preserves original cmap (#344) +- Non-selected `groups` are now not shown in `na_color` (#344) +- Several issues associated with `norm` and `colorbar` (#346) ## [0.2.5] - 2024-08-23 ### Changed -- Replaced `outline` parameter in `render_labels` with alpha-based logic (#323) -- Lowered RMSE-threshold for plot-based tests from 60 to 45 (#323) -- Removed `preprocessing` (.pp) accessor (#329) +- Replaced `outline` parameter in `render_labels` with alpha-based logic (#323) +- Lowered RMSE-threshold for plot-based tests from 60 to 45 (#323) +- Removed `preprocessing` (.pp) accessor (#329) ### Fixed -- Minor fixes for several tests as a result of the threshold change (#323) +- Minor fixes for several tests as a result of the threshold change (#323) ## [0.2.4] - 2024-08-07 ### Added -- Added utils function for 0-transparent cmaps (#302) +- Added utils function for 0-transparent cmaps (#302) ### Fixed -- Took RNG out of categorical label test (#306) -- Performance bug when plotting shapes (#298) -- scale parameter was ignored for single-scale images (#301) -- Changes to support for dask-expr (#283) -- Added error handling for non-existent elements (#305) -- Specifying vmin and vmax properly clips image data (#307) -- import bug `get_cmap()` (8fd969c) +- Took RNG out of categorical label test (#306) +- Performance bug when plotting shapes (#298) +- scale parameter was ignored for single-scale images (#301) +- Changes to support for dask-expr (#283) +- Added error handling for non-existent elements (#305) +- Specifying vmin and vmax properly clips image data (#307) +- import bug `get_cmap()` (8fd969c) ## [0.2.3] - 2024-07-03 ### Added -- Datashader support for points and shapes (#244) +- Datashader support for points and shapes (#244) ### Changed -- All parameters are now provided for a single element (#272) +- All parameters are now provided for a single element (#272) ### Fixed -- Fix color assignment for NaN values (#257) -- Zorder of rendering now strictly follows the order of the render_x calls (#244) +- Fix color assignment for NaN values (#257) +- Zorder of rendering now strictly follows the order of the render_x calls (#244) ## [0.2.2] - 2024-05-02 ### Fixed -- Fixed `fill_alpha` ignoring `alpha` channel from custom cmap (#236) -- Fix channel str support (#221) +- Fixed `fill_alpha` ignoring `alpha` channel from custom cmap (#236) +- Fix channel str support (#221) ## [0.2.1] - 2024-03-26 ### Minor -- Adjusted GitHub worklows +- Adjusted GitHub worklows ## [0.2.0] - 2024-03-24 ### Added -- Support for plotting multiple tables @melonora +- Support for plotting multiple tables @melonora ### Fixed -- Several bugfixes, especially for colors and palettes @melonora +- Several bugfixes, especially for colors and palettes @melonora ## [0.1.0] - 2024-01-17 ### Added -- Multiscale image handling: user can specify a scale, else the best scale is selected automatically given the figure size and dpi (#164) -- Large images are automatically rasterized to speed up performance (#164) -- Added better error message for mismatch in cs and ax number (#185) -- Beter test coverage for correct plotting of elements after transformation (#198) -- Can now stack render commands (#190, #192) -- The `color` argument in render_shapes/points now accepts actual colors as well (#199) -- Input arguments are now evaulated for their types in basic.py (#199) +- Multiscale image handling: user can specify a scale, else the best scale is selected automatically given the figure size and dpi (#164) +- Large images are automatically rasterized to speed up performance (#164) +- Added better error message for mismatch in cs and ax number (#185) +- Beter test coverage for correct plotting of elements after transformation (#198) +- Can now stack render commands (#190, #192) +- The `color` argument in render_shapes/points now accepts actual colors as well (#199) +- Input arguments are now evaulated for their types in basic.py (#199) ### Fixed -- Now dropping index when plotting shapes after spatial query (#177) -- Points are now being correctly rotated (#198) -- User can now pass Colormap objects to the cmap argument in render_images. When only one cmap is given for 3 channels, it is now applied to each channel (#188, #194) +- Now dropping index when plotting shapes after spatial query (#177) +- Points are now being correctly rotated (#198) +- User can now pass Colormap objects to the cmap argument in render_images. When only one cmap is given for 3 channels, it is now applied to each channel (#188, #194) ## [0.0.6] - 2023-11-06 ### Added -- Pushed `get_extent` functionality upstream to `spatialdata` (#162) +- Pushed `get_extent` functionality upstream to `spatialdata` (#162) ## [0.0.5] - 2023-10-02 ### Added -- Can now scale shapes (#152) -- Can now plot columns from GeoDataFrame (#149) +- Can now scale shapes (#152) +- Can now plot columns from GeoDataFrame (#149) ### Fixed -- Multipolygons are now handled correctly (#93) -- Legend order is now deterministic (#143) -- Images no longer normalised by default (#150) -- Filtering of shapes and points using the `groups` argument is now possible, coloring by palette and cmap arguments works for shapes and points (#153) -- Colorbar no longer autoscales to [0, 1] (#155) -- Plotting shapes after a spatial query is now possible (#163) +- Multipolygons are now handled correctly (#93) +- Legend order is now deterministic (#143) +- Images no longer normalised by default (#150) +- Filtering of shapes and points using the `groups` argument is now possible, coloring by palette and cmap arguments works for shapes and points (#153) +- Colorbar no longer autoscales to [0, 1] (#155) +- Plotting shapes after a spatial query is now possible (#163) ## [0.0.4] - 2023-08-11 ### Fixed -- Multi-scale images/labels are now correctly substituted and the action is logged (#131). -- Empty geometries among the shapes can be handeled (#133). -- `outline_width` parameter in render_shapes is now a float that actually determines the line width (#139). +- Multi-scale images/labels are now correctly substituted and the action is logged (#131). +- Empty geometries among the shapes can be handeled (#133). +- `outline_width` parameter in render_shapes is now a float that actually determines the line width (#139). ## [0.0.2] - 2023-06-25 ### Fixed -- Multiple bugfixes of which I didn't keep track of. +- Multiple bugfixes of which I didn't keep track of. ## [0.0.1] - 2023-04-04 ### Added -- Initial release of `spatialdata-plot` with support for `images`, `labels`, `points` and `shapes`. +- Initial release of `spatialdata-plot` with support for `images`, `labels`, `points` and `shapes`. From 5e124b2f4cbc229bd86e72b5d36a7c871e32bd92 Mon Sep 17 00:00:00 2001 From: Luca Marconato Date: Thu, 26 Dec 2024 19:27:15 +0100 Subject: [PATCH 4/6] fix mypy --- README.md | 4 ++-- docs/contributing.md | 28 ++++++++++++++-------------- src/spatialdata_plot/pl/render.py | 2 ++ 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index ba786da3..5dc823a5 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,8 @@ SpatialData’s plotting capabilities allow to quickly visualise all contained m For more information on the `spatialdata-plot` library, please refer to the [documentation](https://spatialdata.scverse.org/projects/plot/en/latest/index.html). In particular, the -- [API documentation][link-api]. -- [Example notebooks][link-notebooks] (section "Visiualizations") +- [API documentation][link-api]. +- [Example notebooks][link-notebooks] (section "Visiualizations") ## Installation diff --git a/docs/contributing.md b/docs/contributing.md index 35e59ac8..e96a3c8a 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -82,11 +82,11 @@ out to the developers of the dependency before the package is released to a wide Many tests will produce plots and check that they are correct by comparing them with a previously saved and serialized version of the same plots. The ground truth images are located in `tests/_images`. Different OS/versions may produce similar but not identical plots (for instance the ticks/padding could vary). To take into account for this please consider the following: -- you should not use locally generated plots as ground truth images, but you should commit images that have been generated by a GitHub Action. The recommended workflow is to go to the ["actions" page for the repo](https://github.com/scverse/spatialdata-plot/actions/workflows/test.yaml), download the artifacts, and upload them as ground truth (after having reviewed them). -- the ground truth images need to be updated when a new test is passing, or when a test starts producing a slightly different (but consistent) plot. -- please never replace the ground truth images without having manually reviewed them. -- if you run the tests locally in macOS or Windows they will likely fail because the ground truth images are generated using Ubuntu. To overcome this you can use `act`, which will generate a Docker reproducing the environment used in the GitHub Action. After the Docker container is generated you can use it within IDEs to run tests and debug code. -- in the case of PyCharm, it is easier to create a container from a `Dockerfile` instead of using `act`. Please in such case use the `Dockerfile` made availabel in the repository. If you encountering problems with `act` or `docker`, please [get in touch with the developers via Zulip](https://scverse.zulipchat.com/#narrow/channel/443514-spatialdata-dev) and we will help troubleshoot the issue. See also additional details [here](https://github.com/scverse/spatialdata-plot/pull/397). +- you should not use locally generated plots as ground truth images, but you should commit images that have been generated by a GitHub Action. The recommended workflow is to go to the ["actions" page for the repo](https://github.com/scverse/spatialdata-plot/actions/workflows/test.yaml), download the artifacts, and upload them as ground truth (after having reviewed them). +- the ground truth images need to be updated when a new test is passing, or when a test starts producing a slightly different (but consistent) plot. +- please never replace the ground truth images without having manually reviewed them. +- if you run the tests locally in macOS or Windows they will likely fail because the ground truth images are generated using Ubuntu. To overcome this you can use `act`, which will generate a Docker reproducing the environment used in the GitHub Action. After the Docker container is generated you can use it within IDEs to run tests and debug code. +- in the case of PyCharm, it is easier to create a container from a `Dockerfile` instead of using `act`. Please in such case use the `Dockerfile` made availabel in the repository. If you encountering problems with `act` or `docker`, please [get in touch with the developers via Zulip](https://scverse.zulipchat.com/#narrow/channel/443514-spatialdata-dev) and we will help troubleshoot the issue. See also additional details [here](https://github.com/scverse/spatialdata-plot/pull/397). ## Publishing a release @@ -109,11 +109,11 @@ Specify `vX.X.X` as a tag name and create a release. For more information, see [ Please write documentation for new or changed features and use-cases. This project uses [sphinx][] with the following features: -- the [myst][] extension allows to write documentation in markdown/Markedly Structured Text -- [Numpy-style docstrings][numpydoc] (through the [napoloen][numpydoc-napoleon] extension). -- Jupyter notebooks as tutorials through [myst-nb][] (See [Tutorials with myst-nb](#tutorials-with-myst-nb-and-jupyter-notebooks)) -- [Sphinx autodoc typehints][], to automatically reference annotated input and output types -- Citations (like {cite:p}`Virshup_2023`) can be included with [sphinxcontrib-bibtex](https://sphinxcontrib-bibtex.readthedocs.io/) +- the [myst][] extension allows to write documentation in markdown/Markedly Structured Text +- [Numpy-style docstrings][numpydoc] (through the [napoloen][numpydoc-napoleon] extension). +- Jupyter notebooks as tutorials through [myst-nb][] (See [Tutorials with myst-nb](#tutorials-with-myst-nb-and-jupyter-notebooks)) +- [Sphinx autodoc typehints][], to automatically reference annotated input and output types +- Citations (like {cite:p}`Virshup_2023`) can be included with [sphinxcontrib-bibtex](https://sphinxcontrib-bibtex.readthedocs.io/) See the [scanpy developer docs](https://scanpy.readthedocs.io/en/latest/dev/documentation.html) for more information on how to write documentation. @@ -130,10 +130,10 @@ repository. #### Hints -- If you refer to objects from other packages, please add an entry to `intersphinx_mapping` in `docs/conf.py`. Only - if you do so can sphinx automatically create a link to the external documentation. -- If building the documentation fails because of a missing link that is outside your control, you can add an entry to - the `nitpick_ignore` list in `docs/conf.py` +- If you refer to objects from other packages, please add an entry to `intersphinx_mapping` in `docs/conf.py`. Only + if you do so can sphinx automatically create a link to the external documentation. +- If building the documentation fails because of a missing link that is outside your control, you can add an entry to + the `nitpick_ignore` list in `docs/conf.py` #### Building the docs locally diff --git a/src/spatialdata_plot/pl/render.py b/src/spatialdata_plot/pl/render.py index e85dfca1..1d13d444 100644 --- a/src/spatialdata_plot/pl/render.py +++ b/src/spatialdata_plot/pl/render.py @@ -719,6 +719,8 @@ def _render_images( channels = img.coords["c"].values if render_params.channel is None else render_params.channel + # the channel parameter has been previously validated, so when not None, render_params.channel is a list + assert isinstance(channels, list) n_channels = len(channels) # True if user gave n cmaps for n channels From f242e6ce6d0cd05d0b56417e5dea338a585e561e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 26 Dec 2024 18:27:42 +0000 Subject: [PATCH 5/6] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- README.md | 4 ++-- docs/contributing.md | 28 ++++++++++++++-------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 5dc823a5..ba786da3 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,8 @@ SpatialData’s plotting capabilities allow to quickly visualise all contained m For more information on the `spatialdata-plot` library, please refer to the [documentation](https://spatialdata.scverse.org/projects/plot/en/latest/index.html). In particular, the -- [API documentation][link-api]. -- [Example notebooks][link-notebooks] (section "Visiualizations") +- [API documentation][link-api]. +- [Example notebooks][link-notebooks] (section "Visiualizations") ## Installation diff --git a/docs/contributing.md b/docs/contributing.md index e96a3c8a..35e59ac8 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -82,11 +82,11 @@ out to the developers of the dependency before the package is released to a wide Many tests will produce plots and check that they are correct by comparing them with a previously saved and serialized version of the same plots. The ground truth images are located in `tests/_images`. Different OS/versions may produce similar but not identical plots (for instance the ticks/padding could vary). To take into account for this please consider the following: -- you should not use locally generated plots as ground truth images, but you should commit images that have been generated by a GitHub Action. The recommended workflow is to go to the ["actions" page for the repo](https://github.com/scverse/spatialdata-plot/actions/workflows/test.yaml), download the artifacts, and upload them as ground truth (after having reviewed them). -- the ground truth images need to be updated when a new test is passing, or when a test starts producing a slightly different (but consistent) plot. -- please never replace the ground truth images without having manually reviewed them. -- if you run the tests locally in macOS or Windows they will likely fail because the ground truth images are generated using Ubuntu. To overcome this you can use `act`, which will generate a Docker reproducing the environment used in the GitHub Action. After the Docker container is generated you can use it within IDEs to run tests and debug code. -- in the case of PyCharm, it is easier to create a container from a `Dockerfile` instead of using `act`. Please in such case use the `Dockerfile` made availabel in the repository. If you encountering problems with `act` or `docker`, please [get in touch with the developers via Zulip](https://scverse.zulipchat.com/#narrow/channel/443514-spatialdata-dev) and we will help troubleshoot the issue. See also additional details [here](https://github.com/scverse/spatialdata-plot/pull/397). +- you should not use locally generated plots as ground truth images, but you should commit images that have been generated by a GitHub Action. The recommended workflow is to go to the ["actions" page for the repo](https://github.com/scverse/spatialdata-plot/actions/workflows/test.yaml), download the artifacts, and upload them as ground truth (after having reviewed them). +- the ground truth images need to be updated when a new test is passing, or when a test starts producing a slightly different (but consistent) plot. +- please never replace the ground truth images without having manually reviewed them. +- if you run the tests locally in macOS or Windows they will likely fail because the ground truth images are generated using Ubuntu. To overcome this you can use `act`, which will generate a Docker reproducing the environment used in the GitHub Action. After the Docker container is generated you can use it within IDEs to run tests and debug code. +- in the case of PyCharm, it is easier to create a container from a `Dockerfile` instead of using `act`. Please in such case use the `Dockerfile` made availabel in the repository. If you encountering problems with `act` or `docker`, please [get in touch with the developers via Zulip](https://scverse.zulipchat.com/#narrow/channel/443514-spatialdata-dev) and we will help troubleshoot the issue. See also additional details [here](https://github.com/scverse/spatialdata-plot/pull/397). ## Publishing a release @@ -109,11 +109,11 @@ Specify `vX.X.X` as a tag name and create a release. For more information, see [ Please write documentation for new or changed features and use-cases. This project uses [sphinx][] with the following features: -- the [myst][] extension allows to write documentation in markdown/Markedly Structured Text -- [Numpy-style docstrings][numpydoc] (through the [napoloen][numpydoc-napoleon] extension). -- Jupyter notebooks as tutorials through [myst-nb][] (See [Tutorials with myst-nb](#tutorials-with-myst-nb-and-jupyter-notebooks)) -- [Sphinx autodoc typehints][], to automatically reference annotated input and output types -- Citations (like {cite:p}`Virshup_2023`) can be included with [sphinxcontrib-bibtex](https://sphinxcontrib-bibtex.readthedocs.io/) +- the [myst][] extension allows to write documentation in markdown/Markedly Structured Text +- [Numpy-style docstrings][numpydoc] (through the [napoloen][numpydoc-napoleon] extension). +- Jupyter notebooks as tutorials through [myst-nb][] (See [Tutorials with myst-nb](#tutorials-with-myst-nb-and-jupyter-notebooks)) +- [Sphinx autodoc typehints][], to automatically reference annotated input and output types +- Citations (like {cite:p}`Virshup_2023`) can be included with [sphinxcontrib-bibtex](https://sphinxcontrib-bibtex.readthedocs.io/) See the [scanpy developer docs](https://scanpy.readthedocs.io/en/latest/dev/documentation.html) for more information on how to write documentation. @@ -130,10 +130,10 @@ repository. #### Hints -- If you refer to objects from other packages, please add an entry to `intersphinx_mapping` in `docs/conf.py`. Only - if you do so can sphinx automatically create a link to the external documentation. -- If building the documentation fails because of a missing link that is outside your control, you can add an entry to - the `nitpick_ignore` list in `docs/conf.py` +- If you refer to objects from other packages, please add an entry to `intersphinx_mapping` in `docs/conf.py`. Only + if you do so can sphinx automatically create a link to the external documentation. +- If building the documentation fails because of a missing link that is outside your control, you can add an entry to + the `nitpick_ignore` list in `docs/conf.py` #### Building the docs locally From e2e67095d9c00604794cddfb29465ebc7f24de02 Mon Sep 17 00:00:00 2001 From: Luca Marconato Date: Thu, 26 Dec 2024 19:35:33 +0100 Subject: [PATCH 6/6] fix type channels --- src/spatialdata_plot/pl/render.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/spatialdata_plot/pl/render.py b/src/spatialdata_plot/pl/render.py index 1d13d444..8f392844 100644 --- a/src/spatialdata_plot/pl/render.py +++ b/src/spatialdata_plot/pl/render.py @@ -717,7 +717,7 @@ def _render_images( extent=extent, ) - channels = img.coords["c"].values if render_params.channel is None else render_params.channel + channels = img.coords["c"].values.tolist() if render_params.channel is None else render_params.channel # the channel parameter has been previously validated, so when not None, render_params.channel is a list assert isinstance(channels, list)