Skip to content

Commit

Permalink
Merge branch 'main' into interactive/feature
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaMarconato committed Oct 3, 2024
2 parents 5552e95 + 7d49c23 commit 1d08283
Show file tree
Hide file tree
Showing 28 changed files with 277 additions and 198 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ default_stages:
minimum_pre_commit_version: 2.9.3
repos:
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.1
rev: v1.11.2
hooks:
- id: mypy
additional_dependencies: [numpy>=1.23]
Expand Down Expand Up @@ -49,7 +49,7 @@ repos:
hooks:
- id: blacken-docs
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.7
rev: v0.6.8
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,19 @@ 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.x.x] - 2024-xx-xx
## [0.5.4] - 2024-xx-xx

### Fixed

- Bug wrong radii transformed circles (e.g. with Visium lowres)

## [0.5.3] - 2024-09-25

### Fixed

- Bug table was not reset after an element without table was added #317
- Bug when changing channel for a multichannel image #301 #302
- Bug when plotting catgorical annotations on points #304

## [0.5.2] - 2024-08-16

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari-spatialdata)](https://napari-hub.org/plugins/napari-spatialdata)
[![DOI](https://zenodo.org/badge/477021400.svg)](https://zenodo.org/badge/latestdoi/477021400)

This repository contains a napari plugin for interactively exploring and annotating SpatialData objects. `napari-spatialdata` is part of the `SpatialData` ecosystem. To learn more about SpatialData, please see the [documentation](https://spatialdata.scverse.org/).
This repository contains a napari plugin for interactively exploring and annotating SpatialData objects. Here you can find the [napari-spatialdata documentation](https://spatialdata.scverse.org/projects/napari/en/latest/notebooks/spatialdata.html). `napari-spatialdata` is part of the `SpatialData` ecosystem. To learn more about SpatialData, please see the [spatialdata documentation](https://spatialdata.scverse.org/).

## Installation

Expand Down
4 changes: 4 additions & 0 deletions benchmarks/benchmark_qt_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from napari import Viewer
from napari.layers import Image
from napari.utils.events import EventedList

from napari_spatialdata._sdata_widgets import SdataWidget


Expand All @@ -17,3 +18,6 @@ def time_create_widget(self) -> None:

def time_layer_added(self) -> None:
self.viewer.add_layer(self.image)

def teardown(self) -> None:
self.viewer.close()
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
api.md
cli.md
contributing.md
limitations.md
references.md
```

Expand Down
8 changes: 8 additions & 0 deletions docs/limitations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Limitations

Contributions are welcomed!

- On macOS, the maximum point size is constrained ([details in the Vispy issue tracker](https://github.com/vispy/vispy/issues/2078));
it is important to keep this in mind when zooming in on points to [explore the points property on mouse hover](https://github.com/scverse/napari-spatialdata/issues/35#issuecomment-2383792431).
- 3D data representation is supported in `spatialdata`; 3D data visualization is supported in `napari`.
Still, in `napari-spatialdata` we currently don't support 3D data visualization.
21 changes: 10 additions & 11 deletions docs/notebooks/mibitof_analysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,11 @@
"source": [
"%matplotlib inline\n",
"import matplotlib.pyplot as plt\n",
"from napari_spatialdata import Interactive\n",
"from spatialdata import SpatialData\n",
"import squidpy as sq\n",
"import scanpy as sc\n",
"\n",
"plt.rcParams['figure.figsize'] = (20, 20)"
"from napari_spatialdata import Interactive\n",
"\n",
"plt.rcParams[\"figure.figsize\"] = (20, 20)"
]
},
{
Expand Down Expand Up @@ -205,7 +204,7 @@
],
"source": [
"plt.imshow(interactive.screenshot())\n",
"plt.axis('off')"
"plt.axis(\"off\")"
]
},
{
Expand Down Expand Up @@ -254,7 +253,7 @@
],
"source": [
"plt.imshow(interactive.screenshot())\n",
"plt.axis('off')"
"plt.axis(\"off\")"
]
},
{
Expand Down Expand Up @@ -295,7 +294,7 @@
],
"source": [
"plt.imshow(interactive.screenshot())\n",
"plt.axis('off')"
"plt.axis(\"off\")"
]
},
{
Expand Down Expand Up @@ -347,7 +346,7 @@
],
"source": [
"plt.imshow(interactive.screenshot())\n",
"plt.axis('off')"
"plt.axis(\"off\")"
]
},
{
Expand Down Expand Up @@ -398,7 +397,7 @@
],
"source": [
"plt.imshow(interactive.screenshot())\n",
"plt.axis('off')"
"plt.axis(\"off\")"
]
},
{
Expand Down Expand Up @@ -439,7 +438,7 @@
],
"source": [
"plt.imshow(interactive.screenshot())\n",
"plt.axis('off')"
"plt.axis(\"off\")"
]
},
{
Expand Down Expand Up @@ -480,7 +479,7 @@
],
"source": [
"plt.imshow(interactive.screenshot())\n",
"plt.axis('off')"
"plt.axis(\"off\")"
]
}
],
Expand Down
22 changes: 11 additions & 11 deletions docs/notebooks/nanostring_analysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@
"source": [
"%matplotlib inline\n",
"import matplotlib.pyplot as plt\n",
"from napari_spatialdata import Interactive\n",
"from spatialdata import SpatialData\n",
"import squidpy as sq\n",
"import scanpy as sc\n",
"from spatialdata import SpatialData\n",
"\n",
"from napari_spatialdata import Interactive\n",
"\n",
"plt.rcParams['figure.figsize'] = (20, 20)"
"plt.rcParams[\"figure.figsize\"] = (20, 20)"
]
},
{
Expand Down Expand Up @@ -278,7 +278,7 @@
],
"source": [
"plt.imshow(interactive.screenshot())\n",
"plt.axis('off')"
"plt.axis(\"off\")"
]
},
{
Expand Down Expand Up @@ -327,7 +327,7 @@
],
"source": [
"plt.imshow(interactive.screenshot())\n",
"plt.axis('off')"
"plt.axis(\"off\")"
]
},
{
Expand Down Expand Up @@ -390,7 +390,7 @@
],
"source": [
"plt.imshow(interactive.screenshot())\n",
"plt.axis('off')"
"plt.axis(\"off\")"
]
},
{
Expand Down Expand Up @@ -431,7 +431,7 @@
],
"source": [
"plt.imshow(interactive.screenshot())\n",
"plt.axis('off')"
"plt.axis(\"off\")"
]
},
{
Expand Down Expand Up @@ -483,7 +483,7 @@
],
"source": [
"plt.imshow(interactive.screenshot())\n",
"plt.axis('off')"
"plt.axis(\"off\")"
]
},
{
Expand Down Expand Up @@ -572,7 +572,7 @@
],
"source": [
"plt.imshow(interactive.screenshot())\n",
"plt.axis('off')"
"plt.axis(\"off\")"
]
},
{
Expand Down Expand Up @@ -613,7 +613,7 @@
],
"source": [
"plt.imshow(interactive.screenshot())\n",
"plt.axis('off')"
"plt.axis(\"off\")"
]
}
],
Expand Down
39 changes: 20 additions & 19 deletions docs/notebooks/scatterwidget.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,13 @@
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
"from napari_spatialdata import QtAdataScatterWidget\n",
"import matplotlib.pyplot as plt\n",
"import squidpy as sq\n",
"import matplotlib.pyplot as plt"
],
"outputs": []
"\n",
"from napari_spatialdata import QtAdataScatterWidget"
]
},
{
"attachments": {},
Expand All @@ -60,10 +61,10 @@
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
"adata = sq.datasets.visium_hne_adata()"
],
"outputs": []
]
},
{
"attachments": {},
Expand All @@ -77,10 +78,10 @@
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
"%gui qt5"
],
"outputs": []
]
},
{
"attachments": {},
Expand All @@ -94,11 +95,11 @@
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [],
"source": [
"widget = QtAdataScatterWidget(adata)\n",
"widget.show()"
],
"outputs": []
]
},
{
"attachments": {},
Expand All @@ -112,11 +113,11 @@
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [],
"source": [
"plt.imshow(widget.screenshot())\n",
"plt.axis('off')"
],
"outputs": []
"plt.axis(\"off\")"
]
},
{
"attachments": {},
Expand All @@ -130,21 +131,21 @@
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [],
"source": [
"plt.imshow(widget.screenshot())\n",
"plt.axis('off')"
],
"outputs": []
"plt.axis(\"off\")"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [],
"source": [
"plt.imshow(widget.screenshot())\n",
"plt.axis('off')"
],
"outputs": []
"plt.axis(\"off\")"
]
}
],
"metadata": {
Expand Down
Loading

0 comments on commit 1d08283

Please sign in to comment.