From 1f5db90398ed5cd7de8d70ad1b976a555b64293a Mon Sep 17 00:00:00 2001 From: Luca Marconato Date: Sat, 4 Jan 2025 01:14:47 +0100 Subject: [PATCH 1/5] fix --- docs/changelog.md | 5 +- docs/contributing.md | 169 ++----------------------------------------- 2 files changed, 9 insertions(+), 165 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index d9e79ba6..67904763 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,3 +1,4 @@ -```{include} ../CHANGELOG.md +# Changelog -``` +Please refer directly to the [Releases](https://github.com/scverse/spatialdata-plot/releases) section on GitHub, where you can find curated release notes for each release. +For developers, please consult the [contributing guide](https://github.com/scverse/spatialdata/blob/main/docs/contributing.md), which explains how to keep release notes are up-to-date at each release. diff --git a/docs/contributing.md b/docs/contributing.md index 35e59ac8..e2361673 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -1,170 +1,13 @@ # Contributing guide -Scanpy provides extensive [developer documentation][scanpy developer guide], most of which applies to this project, too. -This document will not reproduce the entire content from there. Instead, it aims at summarizing the most important -information to get you started on contributing. - -We assume that you are already familiar with git and with making pull requests on GitHub. If not, please refer -to the [scanpy developer guide][]. - -## Installing dev dependencies - -In addition to the packages needed to _use_ this package, you need additional python packages to _run tests_ and _build -the documentation_. It's easy to install them using `pip`: - -```bash -cd spatialdata-plot -pip install -e ".[dev,test,doc]" -``` - -## Code-style - -This package uses [pre-commit][] to enforce consistent code-styles. -On every commit, pre-commit checks will either automatically fix issues with the code, or raise an error message. - -To enable pre-commit locally, simply run - -```bash -pre-commit install -``` - -in the root of the repository. Pre-commit will automatically download all dependencies when it is run for the first time. - -Alternatively, you can rely on the [pre-commit.ci][] service enabled on GitHub. If you didn't run `pre-commit` before -pushing changes to GitHub it will automatically commit fixes to your pull request, or show an error message. - -If pre-commit.ci added a commit on a branch you still have been working on locally, simply use - -```bash -git pull --rebase -``` - -to integrate the changes into yours. -While the [pre-commit.ci][] is useful, we strongly encourage installing and running pre-commit locally first to understand its usage. - -Finally, most editors have an _autoformat on save_ feature. Consider enabling this option for [ruff][ruff-editors] -and [prettier][prettier-editors]. - -[ruff-editors]: https://docs.astral.sh/ruff/integrations/ -[prettier-editors]: https://prettier.io/docs/en/editors.html - -## Writing tests - -```{note} -Remember to first install the package with `pip install -e '.[dev,test]'` -``` - -This package uses the [pytest][] for automated testing. Please [write tests][scanpy-test-docs] for every function added -to the package. - -Most IDEs integrate with pytest and provide a GUI to run tests. Alternatively, you can run all tests from the -command line by executing - -```bash -pytest -``` - -in the root of the repository. - -### Continuous integration - -Continuous integration will automatically run the tests on all pull requests and test -against the minimum and maximum supported Python version. - -Additionally, there's a CI job that tests against pre-releases of all dependencies -(if there are any). The purpose of this check is to detect incompatibilities -of new package versions early on and gives you time to fix the issue or reach -out to the developers of the dependency before the package is released to a wider audience. - -[scanpy-test-docs]: https://scanpy.readthedocs.io/en/latest/dev/testing.html#writing-tests +Please refer to the [contribution guide from the `spatialdata` repository](https://github.com/scverse/spatialdata/blob/main/docs/contributing.md). ### Testing the correctness of the plots 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). - -## Publishing a release - -### Updating the version number - -Before making a release, you need to update the version number in the `pyproject.toml` file. Please adhere to [Semantic Versioning][semver], in brief - -> Given a version number MAJOR.MINOR.PATCH, increment the: -> -> 1. MAJOR version when you make incompatible API changes, -> 2. MINOR version when you add functionality in a backwards compatible manner, and -> 3. PATCH version when you make backwards compatible bug fixes. -> -> Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format. - -Once you are done, commit and push your changes and navigate to the "Releases" page of this project on GitHub. -Specify `vX.X.X` as a tag name and create a release. For more information, see [managing GitHub releases][]. This will automatically create a git tag and trigger a Github workflow that creates a release on PyPI. - -## Writing documentation - -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/) - -See the [scanpy developer docs](https://scanpy.readthedocs.io/en/latest/dev/documentation.html) for more information -on how to write documentation. - -### Tutorials with myst-nb and jupyter notebooks - -The documentation is set-up to render jupyter notebooks stored in the `docs/notebooks` directory using [myst-nb][]. -Currently, only notebooks in `.ipynb` format are supported that will be included with both their input and output cells. -It is your responsibility to update and re-run the notebook whenever necessary. - -If you are interested in automatically running notebooks as part of the continuous integration, please check -out [this feature request](https://github.com/scverse/cookiecutter-scverse/issues/40) in the `cookiecutter-scverse` -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` - -#### Building the docs locally - -```bash -cd docs -make html -open _build/html/index.html -``` - - - -[scanpy developer guide]: https://scanpy.readthedocs.io/en/latest/dev/index.html -[cookiecutter-scverse-instance]: https://cookiecutter-scverse-instance.readthedocs.io/en/latest/template_usage.html -[github quickstart guide]: https://docs.github.com/en/get-started/quickstart/create-a-repo?tool=webui -[codecov]: https://about.codecov.io/sign-up/ -[codecov docs]: https://docs.codecov.com/docs -[codecov bot]: https://docs.codecov.com/docs/team-bot -[codecov app]: https://github.com/apps/codecov -[pre-commit.ci]: https://pre-commit.ci/ -[readthedocs.org]: https://readthedocs.org/ -[myst-nb]: https://myst-nb.readthedocs.io/en/latest/ -[jupytext]: https://jupytext.readthedocs.io/en/latest/ -[pre-commit]: https://pre-commit.com/ -[anndata]: https://github.com/scverse/anndata -[mudata]: https://github.com/scverse/mudata -[pytest]: https://docs.pytest.org/ -[semver]: https://semver.org/ -[sphinx]: https://www.sphinx-doc.org/en/master/ -[myst]: https://myst-parser.readthedocs.io/en/latest/intro.html -[numpydoc-napoleon]: https://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html -[numpydoc]: https://numpydoc.readthedocs.io/en/latest/format.html -[sphinx autodoc typehints]: https://github.com/tox-dev/sphinx-autodoc-typehints -[pypi]: https://pypi.org/ -[managing GitHub releases]: https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository +- 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). From 0ac5b8c33bfa83857c8b50990c4997868d2a5b52 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 4 Jan 2025 00:16:01 +0000 Subject: [PATCH 2/5] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- docs/contributing.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/contributing.md b/docs/contributing.md index e2361673..10d0bd8b 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -6,8 +6,8 @@ Please refer to the [contribution guide from the `spatialdata` repository](https 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). From 92aa1e2d80979b43ca60d1ba28a8dfaac864c41f Mon Sep 17 00:00:00 2001 From: LucaMarconato <2664412+LucaMarconato@users.noreply.github.com> Date: Sun, 5 Jan 2025 21:04:38 +0100 Subject: [PATCH 3/5] removed build, bumped ga to python 3.12 --- .github/workflows/build.yaml | 23 --------------- .github/workflows/release.yaml | 52 +++++++++++++++++----------------- 2 files changed, 26 insertions(+), 49 deletions(-) delete mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml deleted file mode 100644 index 5979e0ec..00000000 --- a/.github/workflows/build.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: Check Build - -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - package: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.10 - uses: actions/setup-python@v2 - with: - python-version: "3.10" - - name: Install build dependencies - run: python -m pip install --upgrade pip wheel twine build - - name: Build package - run: python -m build - - name: Check package - run: twine check --strict dist/*.whl diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a76ae081..84d445e3 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,31 +1,31 @@ name: Release on: - release: - types: [published] + release: + types: [published] jobs: - release: - # requires that you have put your twine API key in your - # github secrets (see readme for details) - runs-on: ubuntu-latest - if: contains(github.ref, 'tags') - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Set up Python 3.10 - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - - name: Install hatch - run: pip install hatch - - - name: Build project for distribution - run: hatch build - - - name: Publish a Python distribution to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - password: ${{ secrets.PYPI_API_TOKEN }} + package_and_release: + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/v') + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.12 + uses: actions/setup-python@v4 + with: + python-version: "3.12" + cache: pip + - name: Install build dependencies + run: python -m pip install --upgrade pip wheel twine build + - name: Build package + run: python -m build + - name: Check package + run: twine check --strict dist/*.whl + - name: Install hatch + run: pip install hatch + - name: Build project for distribution + run: hatch build + - name: Publish a Python distribution to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file From 7830690ab8991a6015fcdf677bdfea63c5845208 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 5 Jan 2025 20:04:51 +0000 Subject: [PATCH 4/5] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .github/workflows/release.yaml | 52 +++++++++++++++++----------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 84d445e3..ebc1e49e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,31 +1,31 @@ name: Release on: - release: - types: [published] + release: + types: [published] jobs: - package_and_release: - runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/v') - steps: - - uses: actions/checkout@v3 - - name: Set up Python 3.12 - uses: actions/setup-python@v4 - with: - python-version: "3.12" - cache: pip - - name: Install build dependencies - run: python -m pip install --upgrade pip wheel twine build - - name: Build package - run: python -m build - - name: Check package - run: twine check --strict dist/*.whl - - name: Install hatch - run: pip install hatch - - name: Build project for distribution - run: hatch build - - name: Publish a Python distribution to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file + package_and_release: + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/v') + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.12 + uses: actions/setup-python@v4 + with: + python-version: "3.12" + cache: pip + - name: Install build dependencies + run: python -m pip install --upgrade pip wheel twine build + - name: Build package + run: python -m build + - name: Check package + run: twine check --strict dist/*.whl + - name: Install hatch + run: pip install hatch + - name: Build project for distribution + run: hatch build + - name: Publish a Python distribution to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }} From c693f6d8c67534208097f50d92f5d6225d539387 Mon Sep 17 00:00:00 2001 From: Luca Marconato Date: Sun, 5 Jan 2025 22:21:59 +0100 Subject: [PATCH 5/5] removed changelog --- .github/workflows/build.yaml | 23 ----- .github/workflows/release.yaml | 24 ++--- CHANGELOG.md | 180 --------------------------------- 3 files changed, 12 insertions(+), 215 deletions(-) delete mode 100644 .github/workflows/build.yaml delete mode 100644 CHANGELOG.md diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml deleted file mode 100644 index 5979e0ec..00000000 --- a/.github/workflows/build.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: Check Build - -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - package: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.10 - uses: actions/setup-python@v2 - with: - python-version: "3.10" - - name: Install build dependencies - run: python -m pip install --upgrade pip wheel twine build - - name: Build package - run: python -m build - - name: Check package - run: twine check --strict dist/*.whl diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a76ae081..ebc1e49e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -5,26 +5,26 @@ on: types: [published] jobs: - release: - # requires that you have put your twine API key in your - # github secrets (see readme for details) + package_and_release: runs-on: ubuntu-latest - if: contains(github.ref, 'tags') + if: startsWith(github.ref, 'refs/tags/v') steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Set up Python 3.10 + - uses: actions/checkout@v3 + - name: Set up Python 3.12 uses: actions/setup-python@v4 with: - python-version: "3.10" - + python-version: "3.12" + cache: pip + - name: Install build dependencies + run: python -m pip install --upgrade pip wheel twine build + - name: Build package + run: python -m build + - name: Check package + run: twine check --strict dist/*.whl - name: Install hatch run: pip install hatch - - name: Build project for distribution run: hatch build - - name: Publish a Python distribution to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index f2bb14e9..00000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,180 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog][], -and this project adheres to [Semantic Versioning][]. - -[keep a changelog]: https://keepachangelog.com/en/1.0.0/ -[semantic versioning]: https://semver.org/spec/v2.0.0.html - -## [0.2.9] - tbd - -### 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) - -## [0.2.8] - 2024-11-26 - -### Changed - -- 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) - -### 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) - -## [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) - -### 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) - -## [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) - -### Fixed - -- 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) - -### 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) - -## [0.2.3] - 2024-07-03 - -### Added - -- Datashader support for points and shapes (#244) - -### Changed - -- 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) - -## [0.2.2] - 2024-05-02 - -### Fixed - -- 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 - -## [0.2.0] - 2024-03-24 - -### Added - -- Support for plotting multiple tables @melonora - -### Fixed - -- 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) - -### 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) - -## [0.0.6] - 2023-11-06 - -### Added - -- 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) - -### 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) - -## [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). - -## [0.0.2] - 2023-06-25 - -### Fixed - -- 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`.