Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: matplotlib/napari-matplotlib
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.2.1
Choose a base ref
...
head repository: matplotlib/napari-matplotlib
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.0.0
Choose a head ref
Loading
Showing with 1,617 additions and 467 deletions.
  1. +58 −0 .github/workflows/docs.yml
  2. +2 −2 .github/workflows/napari_hub_preview.yml
  3. +28 −12 .github/workflows/test_and_deploy.yml
  4. +4 −0 .gitignore
  5. +0 −92 .napari/DESCRIPTION.md
  6. +8 −0 .napari/config.yml
  7. +19 −25 .pre-commit-config.yaml
  8. +15 −0 .readthedocs.yaml
  9. +0 −12 CHANGELOG.rst
  10. +1 −0 MANIFEST.in
  11. +7 −7 README.md
  12. +6 −1 docs/Makefile
  13. BIN docs/_static/hist.png
  14. BIN docs/_static/logo.png
  15. +0 −19 docs/api/napari_matplotlib.HistogramWidget.rst
  16. +43 −0 docs/changelog.rst
  17. +39 −1 docs/conf.py
  18. +13 −18 docs/index.rst
  19. +3 −0 docs/make.bat
  20. +51 −0 docs/third_party.rst
  21. +49 −0 docs/user_guide.rst
  22. +2 −2 examples/README.rst
  23. +7 −1 examples/features_scatter.py
  24. +57 −1 pyproject.toml
  25. +9 −6 setup.cfg
  26. +237 −81 src/napari_matplotlib/base.py
  27. +14 −13 src/napari_matplotlib/histogram.py
  28. BIN src/napari_matplotlib/icons/black/Back.png
  29. BIN src/napari_matplotlib/icons/black/Customize.png
  30. BIN src/napari_matplotlib/icons/black/Forward.png
  31. BIN src/napari_matplotlib/icons/black/Home.png
  32. BIN src/napari_matplotlib/icons/black/Pan.png
  33. BIN src/napari_matplotlib/icons/black/Pan_checked.png
  34. BIN src/napari_matplotlib/icons/black/Save.png
  35. BIN src/napari_matplotlib/icons/black/Subplots.png
  36. BIN src/napari_matplotlib/icons/black/Zoom.png
  37. BIN src/napari_matplotlib/icons/black/Zoom_checked.png
  38. BIN src/napari_matplotlib/icons/{ → white}/Back.png
  39. BIN src/napari_matplotlib/icons/{ → white}/Customize.png
  40. BIN src/napari_matplotlib/icons/{ → white}/Forward.png
  41. BIN src/napari_matplotlib/icons/{ → white}/Home.png
  42. BIN src/napari_matplotlib/icons/{ → white}/Pan.png
  43. BIN src/napari_matplotlib/icons/{ → white}/Pan_checked.png
  44. BIN src/napari_matplotlib/icons/{ → white}/Save.png
  45. BIN src/napari_matplotlib/icons/{ → white}/Subplots.png
  46. BIN src/napari_matplotlib/icons/{ → white}/Zoom.png
  47. BIN src/napari_matplotlib/icons/{ → white}/Zoom_checked.png
  48. +114 −108 src/napari_matplotlib/scatter.py
  49. +30 −27 src/napari_matplotlib/slice.py
  50. +3 −0 src/napari_matplotlib/styles/README.md
  51. +12 −0 src/napari_matplotlib/styles/dark.mplstyle
  52. +12 −0 src/napari_matplotlib/styles/light.mplstyle
  53. BIN src/napari_matplotlib/tests/baseline/test_custom_theme.png
  54. BIN src/napari_matplotlib/tests/baseline/test_histogram_2D.png
  55. BIN src/napari_matplotlib/tests/baseline/test_histogram_3D.png
  56. BIN src/napari_matplotlib/tests/baseline/test_no_theme_side_effects.png
  57. BIN src/napari_matplotlib/tests/baseline/test_slice_2D.png
  58. BIN src/napari_matplotlib/tests/baseline/test_slice_3D.png
  59. +47 −0 src/napari_matplotlib/tests/conftest.py
  60. +15 −0 src/napari_matplotlib/tests/data/test_theme.mplstyle
  61. +29 −0 src/napari_matplotlib/tests/helpers.py
  62. 0 src/napari_matplotlib/tests/scatter/__init__.py
  63. BIN src/napari_matplotlib/tests/scatter/baseline/test_features_scatter_widget_2D.png
  64. BIN src/napari_matplotlib/tests/scatter/baseline/test_scatter_2D.png
  65. BIN src/napari_matplotlib/tests/scatter/baseline/test_scatter_3D.png
  66. +57 −0 src/napari_matplotlib/tests/scatter/test_scatter.py
  67. +41 −24 src/napari_matplotlib/tests/{test_scatter.py → scatter/test_scatter_features.py}
  68. +26 −4 src/napari_matplotlib/tests/test_histogram.py
  69. +109 −0 src/napari_matplotlib/tests/test_layer_changes.py
  70. +25 −5 src/napari_matplotlib/tests/test_slice.py
  71. +190 −0 src/napari_matplotlib/tests/test_theme.py
  72. +49 −0 src/napari_matplotlib/tests/test_ui.py
  73. +66 −2 src/napari_matplotlib/tests/test_util.py
  74. +113 −2 src/napari_matplotlib/util.py
  75. +7 −2 tox.ini
58 changes: 58 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Build docs

on:
pull_request:
branches:
- main
push:
branches:
- main

jobs:
build-docs:
name: Build & Upload Artifact
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v3
with:
python-version: "3.10"

- uses: tlambert03/setup-qt-libs@v1

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install ".[docs]"
sudo apt install graphviz --yes
- name: Build Docs
uses: aganders3/headless-gui@v1
with:
run: make html
working-directory: ./docs

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: docs
path: docs/_build

upload-docs:
name: Upload docs to GitHub pages
runs-on: ubuntu-latest
needs: build-docs
if: contains(github.ref, 'tags')
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: docs

- name: Push to GitHub pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: html
ssh-key: ${{ secrets.DEPLOY_KEY }}
repository-name: napari-matplotlib/napari-matplotlib.github.io
4 changes: 2 additions & 2 deletions .github/workflows/napari_hub_preview.yml
Original file line number Diff line number Diff line change
@@ -13,9 +13,9 @@ jobs:

steps:
- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: napari hub Preview Page Builder
uses: chanzuckerberg/napari-hub-preview-action@v0.1.5
uses: chanzuckerberg/napari-hub-preview-action@v0.1
with:
hub-ref: main
40 changes: 28 additions & 12 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: tests

on:
@@ -13,14 +10,16 @@ on:
branches:
- main
workflow_dispatch:
merge_group:

jobs:
test:
name: ${{ matrix.platform }} py${{ matrix.python-version }}
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest]
platform: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.8', '3.9', '3.10']

steps:
@@ -50,8 +49,22 @@ jobs:
- name: Test with tox
run: python -m tox

- name: Upload pytest test results
uses: actions/upload-artifact@v3
with:
name: pytest-results-${{ matrix.platform }} py${{ matrix.python-version }}
path: reports/
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}

- name: Coverage
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
# Don't run coverage on merge queue CI to avoid duplicating reports
# to codecov. See https://github.com/matplotlib/napari-matplotlib/issues/155
if: github.event_name != 'merge_group'
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true

deploy:
# this will run when you have tagged a commit, starting with "v*"
@@ -60,21 +73,24 @@ jobs:
needs: [test]
runs-on: ubuntu-latest
if: contains(github.ref, 'tags')
environment: pypi-deploy
permissions:
id-token: write
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Install dependencies
- name: Install build
run: |
python -m pip install --upgrade pip
pip install -U setuptools setuptools_scm wheel twine build
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_API_KEY }}
python -m pip install --upgrade build
- name: Build package
run: |
git tag
python -m build .
twine upload dist/*
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -37,6 +37,7 @@ pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
report/
.coverage
.coverage.*
.cache
@@ -84,3 +85,6 @@ venv/

# written by setuptools_scm
**/_version.py

# Generated by test runs
reports
92 changes: 0 additions & 92 deletions .napari/DESCRIPTION.md

This file was deleted.

8 changes: 8 additions & 0 deletions .napari/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
labels:
ontology: EDAM-BIOIMAGING:alpha06
terms:
- 2D Image
- 3D Image
- Plotting
- Slice rendering
- Scientific visualisation
44 changes: 19 additions & 25 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,43 +1,37 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
rev: v4.4.0
hooks:
- id: check-docstring-first
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/asottile/setup-cfg-fmt
rev: v1.20.1
rev: v2.3.0
hooks:
- id: setup-cfg-fmt
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
hooks:
- id: flake8
additional_dependencies: [flake8-typing-imports>=1.9.0]
- repo: https://github.com/myint/autoflake
rev: v1.4
hooks:
- id: autoflake
args: ["--in-place", "--remove-all-unused-imports"]
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort

- repo: https://github.com/psf/black
rev: 22.3.0
rev: 23.3.0
hooks:
- id: black
- repo: https://github.com/asottile/pyupgrade
rev: v2.32.0
hooks:
- id: pyupgrade
args: [--py38-plus, --keep-runtime-typing]

- repo: https://github.com/tlambert03/napari-plugin-checks
rev: v0.2.0
rev: v0.3.0
hooks:
- id: napari-plugin-checks

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.910-1
rev: v1.4.1
hooks:
- id: mypy
args: ["--disallow-incomplete-defs", "--ignore-missing-imports"]
additional_dependencies: [numpy, matplotlib]

- repo: https://github.com/charliermarsh/ruff-pre-commit
# Ruff version.
rev: 'v0.0.275'
hooks:
- id: ruff

ci:
autofix_prs: false
15 changes: 15 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2

python:
install:
- method: pip
path: .
extra_requirements:
- docs

build:
os: ubuntu-22.04
tools:
python: "3.10"
apt_packages:
- xvfb
12 changes: 0 additions & 12 deletions CHANGELOG.rst

This file was deleted.

1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
include LICENSE
include README.md
recursive-include * *.mplstyle

recursive-exclude * __pycache__
recursive-exclude * *.py[co]
Loading