Skip to content

Commit 0c79f41

Browse files
committed
Merge branch 'main' into load_data_in_thread
2 parents ca326da + 802b812 commit 0c79f41

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+3083
-1060
lines changed

.github/workflows/test.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
fail-fast: false
2525
matrix:
2626
platform: [ubuntu-latest, macos-latest] # [ubuntu-latest, windows-latest, macos-latest]
27-
python-version: ["3.9", "3.11"]
27+
python-version: ["3.10", "3.12"]
2828

2929
steps:
3030
- uses: actions/checkout@v4
@@ -62,7 +62,7 @@ jobs:
6262
PLATFORM: ${{ matrix.platform }}
6363

6464
- name: Coverage
65-
uses: codecov/codecov-action@v4
65+
uses: codecov/codecov-action@v5
6666

6767
- name: Archive figures generated during testing
6868
if: always()
@@ -87,6 +87,11 @@ jobs:
8787
python-version: 3.11
8888
cache-dependency-path: pyproject.toml
8989

90+
- name: Install dependencies with 'pre' extras (since the above doesn't check pre-releases)
91+
run: |
92+
python -m pip install --upgrade pip
93+
pip install .[pre]
94+
9095
- uses: tlambert03/setup-qt-libs@v1
9196

9297
- uses: octokit/request-action@v2.x

.mypy.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[mypy]
22
mypy_path = napari-spatialdata
3-
python_version = 3.9
3+
python_version = 3.10
44
plugins = numpy.typing.mypy_plugin
55

66
ignore_errors = False

.pre-commit-config.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ fail_fast: false
22
default_language_version:
33
python: python3
44
default_stages:
5-
- commit
6-
- push
5+
- pre-commit
6+
- pre-push
77
minimum_pre_commit_version: 2.9.3
88
repos:
99
- repo: https://github.com/pre-commit/mirrors-mypy
10-
rev: v1.11.1
10+
rev: v1.13.0
1111
hooks:
1212
- id: mypy
1313
additional_dependencies: [numpy>=1.23]
1414
exclude: docs
1515
- repo: https://github.com/psf/black
16-
rev: 24.8.0
16+
rev: 24.10.0
1717
hooks:
1818
- id: black
1919
additional_dependencies: [toml]
@@ -22,7 +22,7 @@ repos:
2222
hooks:
2323
- id: prettier
2424
- repo: https://github.com/pre-commit/pre-commit-hooks
25-
rev: v4.6.0
25+
rev: v5.0.0
2626
hooks:
2727
- id: detect-private-key
2828
- id: check-merge-conflict
@@ -45,11 +45,11 @@ repos:
4545
- id: check-toml
4646
- id: requirements-txt-fixer
4747
- repo: https://github.com/asottile/blacken-docs
48-
rev: 1.18.0
48+
rev: 1.19.1
4949
hooks:
5050
- id: blacken-docs
5151
- repo: https://github.com/astral-sh/ruff-pre-commit
52-
rev: v0.5.7
52+
rev: v0.8.3
5353
hooks:
5454
- id: ruff
5555
args: [--fix, --exit-non-zero-on-fix]

CHANGELOG.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,24 @@ and this project adheres to [Semantic Versioning][].
88
[keep a changelog]: https://keepachangelog.com/en/1.0.0/
99
[semantic versioning]: https://semver.org/spec/v2.0.0.html
1010

11+
## [0.5.4] - 2024-11-26
12+
13+
### Changed
14+
15+
- Support for `xarray.DataTree` (which moved from `datatree.DataTree`)
16+
17+
### Added
18+
19+
- CLI interface from spatialdata branch
20+
- New function to get layer by name #315 @minhtien-trinh
21+
- New annotation function to display text near polygons #315 @minhtien-trinh
22+
23+
### Fixed
24+
25+
- Bug wrong radii transformed circles (e.g. with Visium lowres) #318
26+
- Bugs: instance id shifted by 1; obsm visualization; background color for labels #320
27+
- Bug adjusting contrast limit for RGB data #276
28+
1129
## [0.5.3] - 2024-09-25
1230

1331
### Fixed
@@ -16,6 +34,25 @@ and this project adheres to [Semantic Versioning][].
1634
- Bug when changing channel for a multichannel image #301 #302
1735
- Bug when plotting catgorical annotations on points #304
1836

37+
## [0.5.3] - 2024-08-
38+
39+
### Added
40+
41+
- New Scatter Widget based on PyQtGraph, replacing the previous Matplotlib-based widget.
42+
- New Features:
43+
- Separate color controls for continuous and discrete data:
44+
- Continuous: Histogram of values, LUT adjustment, contrast control.
45+
- Discrete: Scrollable legend, class color modification.
46+
- Pseudohistogram plot for single-axis data.
47+
- Highlight nearby data points under the cursor with dynamic status display.
48+
- Expanded ROI annotations (lasso and rectangle tools)
49+
- Multiple disjointed ROIs with modifiable options.
50+
- Annotation name dialog for saving annotations.
51+
52+
### Updated
53+
54+
Documentation: Notebooks updated with the new Scatter Widget information and screenshots.
55+
1956
## [0.5.2] - 2024-08-16
2057

2158
### Minor

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari-spatialdata)](https://napari-hub.org/plugins/napari-spatialdata)
1212
[![DOI](https://zenodo.org/badge/477021400.svg)](https://zenodo.org/badge/latestdoi/477021400)
1313

14-
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/).
14+
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/).
1515

1616
## Installation
1717

benchmarks/benchmark_qt_widget.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from napari import Viewer
33
from napari.layers import Image
44
from napari.utils.events import EventedList
5+
56
from napari_spatialdata._sdata_widgets import SdataWidget
67

78

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

1819
def time_layer_added(self) -> None:
1920
self.viewer.add_layer(self.image)
21+
22+
def teardown(self) -> None:
23+
self.viewer.close()

docs/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
api.md
1010
cli.md
1111
contributing.md
12+
limitations.md
1213
references.md
1314
```
1415

@@ -22,4 +23,5 @@ cli.md
2223
notebooks/nanostring_analysis
2324
notebooks/mibitof_analysis
2425
notebooks/scatterwidget
26+
notebooks/scatterwidget_annotation
2527
```

docs/limitations.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Limitations
2+
3+
Contributions are welcomed!
4+
5+
- On macOS, the maximum point size is constrained ([details in the Vispy issue tracker](https://github.com/vispy/vispy/issues/2078));
6+
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).
7+
- 3D data representation is supported in `spatialdata`; 3D data visualization is supported in `napari`.
8+
Still, in `napari-spatialdata` we currently don't support 3D data visualization.

docs/notebooks/mibitof_analysis.ipynb

Lines changed: 62 additions & 135 deletions
Large diffs are not rendered by default.

docs/notebooks/nanostring_analysis.ipynb

Lines changed: 113 additions & 190 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)