Skip to content

Commit ad86b38

Browse files
committed
Merge branch 'main' into add-feature-histogram
2 parents 20300a4 + 3a8261a commit ad86b38

27 files changed

+250
-93
lines changed

.github/workflows/docs.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
name: Build docs
22

33
on:
4+
45
pull_request:
56
branches:
67
- main
8+
push:
9+
branches:
10+
- main
11+
tags:
12+
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
713

814
jobs:
915
build-docs:
@@ -40,7 +46,7 @@ jobs:
4046
name: Upload docs to GitHub pages
4147
runs-on: ubuntu-latest
4248
needs: build-docs
43-
if: github.event_name == 'push' && github.ref_name == 'main'
49+
if: contains(github.ref, 'tags')
4450
steps:
4551
- uses: actions/checkout@v3
4652
- uses: actions/download-artifact@v3
@@ -52,4 +58,4 @@ jobs:
5258
with:
5359
folder: html
5460
ssh-key: ${{ secrets.DEPLOY_KEY }}
55-
repository-name: dstansby/napari-matplotlib-docs
61+
repository-name: napari-matplotlib/napari-matplotlib.github.io

.github/workflows/test_and_deploy.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,21 +73,24 @@ jobs:
7373
needs: [test]
7474
runs-on: ubuntu-latest
7575
if: contains(github.ref, 'tags')
76+
environment: pypi-deploy
77+
permissions:
78+
id-token: write
7679
steps:
7780
- uses: actions/checkout@v2
7881
- name: Set up Python
7982
uses: actions/setup-python@v2
8083
with:
8184
python-version: "3.x"
82-
- name: Install dependencies
85+
- name: Install build
8386
run: |
8487
python -m pip install --upgrade pip
85-
pip install -U setuptools setuptools_scm wheel twine build
86-
- name: Build and publish
87-
env:
88-
TWINE_USERNAME: __token__
89-
TWINE_PASSWORD: ${{ secrets.TWINE_API_KEY }}
88+
python -m pip install --upgrade build
89+
90+
- name: Build package
9091
run: |
9192
git tag
9293
python -m build .
93-
twine upload dist/*
94+
95+
- name: Publish package
96+
uses: pypa/gh-action-pypi-publish@release/v1

.pre-commit-config.yaml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,8 @@ repos:
66
- id: end-of-file-fixer
77
- id: trailing-whitespace
88

9-
- repo: https://github.com/asottile/setup-cfg-fmt
10-
rev: v2.3.0
11-
hooks:
12-
- id: setup-cfg-fmt
13-
149
- repo: https://github.com/psf/black
15-
rev: 23.3.0
10+
rev: 23.7.0
1611
hooks:
1712
- id: black
1813

@@ -22,14 +17,14 @@ repos:
2217
- id: napari-plugin-checks
2318

2419
- repo: https://github.com/pre-commit/mirrors-mypy
25-
rev: v1.3.0
20+
rev: v1.5.1
2621
hooks:
2722
- id: mypy
2823
additional_dependencies: [numpy, matplotlib]
2924

30-
- repo: https://github.com/charliermarsh/ruff-pre-commit
25+
- repo: https://github.com/astral-sh/ruff-pre-commit
3126
# Ruff version.
32-
rev: 'v0.0.272'
27+
rev: 'v0.0.285'
3328
hooks:
3429
- id: ruff
3530

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
[![Python Version](https://img.shields.io/pypi/pyversions/napari-matplotlib.svg?color=green)](https://python.org)
66
[![tests](https://github.com/matplotlib/napari-matplotlib/workflows/tests/badge.svg)](https://github.com/matplotlib/napari-matplotlib/actions)
77
[![codecov](https://codecov.io/gh/matplotlib/napari-matplotlib/branch/main/graph/badge.svg)](https://codecov.io/gh/matplotlib/napari-matplotlib)
8-
[![readthedocs](https://readthedocs.org/projects/napari-matplotlib/badge/?version=latest)](https://napari-matplotlib.readthedocs.io/en/latest/)
98
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/matplotlib/pytest-mpl/master.svg)](https://results.pre-commit.ci/latest/github/matplotlib/pytest-mpl/master)
109
[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari-matplotlib)](https://napari-hub.org/plugins/napari-matplotlib)
1110

docs/_static/hist.png

1.06 MB
Loading

docs/_static/logo.png

51.4 KB
Loading

docs/changelog.rst

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,40 @@
11
Changelog
22
=========
3+
1.0.3
4+
-----
5+
Changes
6+
~~~~~~~
7+
- The slice widget is now limited to slicing along the x/y dimensions. Support
8+
for slicing along z has been removed for now to make the code simpler.
9+
- The slice widget now uses a slider to select the slice value.
10+
11+
Bug fixes
12+
~~~~~~~~~
13+
- Fixed creating 1D slices of 2D images.
14+
- Removed the limitation that only the first 99 indices could be sliced using
15+
the slice widget.
16+
17+
1.0.2
18+
-----
19+
Bug fixes
20+
~~~~~~~~~
21+
- A full dataset is no longer read into memory when using ``HistogramWidget``.
22+
Only the current slice is loaded.
23+
- Fixed compatibility with napari 0.4.18.
24+
25+
Changes
26+
~~~~~~~
27+
- Histogram bin limits are now caclualted from the slice being histogrammed, and
28+
not the whole dataset. This is as a result of the above bug fix.
29+
30+
1.0.1
31+
-----
32+
Bug fixes
33+
~~~~~~~~~
34+
- Pinned that maximum version of `napari` to 0.4.17, since ``napari-matplotlib``
35+
does not yet work with ``napari`` 0.4.18.
336

4-
0.3.0
37+
1.0.0
538
-----
639

740
New features
@@ -15,6 +48,8 @@ Visual improvements
1548
~~~~~~~~~~~~~~~~~~~
1649
- The background of ``napari-matplotlib`` figures and axes is now transparent, and the text and axis colour respects the ``napari`` theme.
1750
- The icons in the Matplotlib toolbar are now the same size as icons in the napari window.
51+
- Custom style sheets can now be set to customise plots. See the user guide
52+
for more information.
1853

1954
Changes
2055
~~~~~~~

docs/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
# a list of builtin themes.
8888
#
8989
html_theme = "pydata_sphinx_theme"
90+
html_logo = "_static/logo.png"
9091

9192
# Add any paths that contain custom static files (such as style sheets) here,
9293
# relative to this directory. They are copied after the builtin static files,

docs/guide/index.rst

Lines changed: 0 additions & 8 deletions
This file was deleted.

docs/index.rst

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
11
napari-matplotlib
22
=================
3-
``napari-matplotlib`` is a `Napari <https://napari.org>`_ plugin for generating
3+
A `napari <https://napari.org>`_ plugin for generating
44
`Matplotlib <https://matplotlib.org/>`_ plots from one or more ``napari`` Layers.
55

6-
Design
7-
------
8-
``napari-matplotlib`` contains a number of different ``napari`` Widgets. Each
9-
widget is designed to map one or more ``napari`` Layers on to a ``matplotlib`` plot.
6+
This plugin provides a number of different ``napari`` Widgets. Each
7+
widget is designed to map one or more ``napari`` Layers on to a ``Matplotlib`` plot.
108
As an example, the `~.HistogramWidget` is used to
119
map one or more Image layers on to a 1D histogram plot.
1210

13-
.. toctree::
14-
:maxdepth: 1
15-
16-
guide/index
11+
.. image:: _static/hist.png
12+
:alt: Screenshot of the napari viewer showing the napari-matplotlib histogram widget on the right hand side of the screen.
1713

1814
.. toctree::
1915
:maxdepth: 1
20-
:caption: Reference
16+
:hidden:
2117

18+
user_guide
19+
auto_examples/index
20+
third_party
2221
api
2322
changelog

0 commit comments

Comments
 (0)