Skip to content

Commit

Permalink
Merge branch 'main' into textual
Browse files Browse the repository at this point in the history
  • Loading branch information
tlambert03 authored Feb 8, 2024
2 parents 690ba0a + 94c8a3b commit 2d2290f
Show file tree
Hide file tree
Showing 77 changed files with 964 additions and 532 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- run: |
Expand Down
40 changes: 20 additions & 20 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: tlambert03/setup-qt-libs@v1.5
- uses: tlambert03/setup-qt-libs@v1.7
- name: Install dependencies
run: python -m pip install --upgrade hatch

- name: Test
uses: aganders3/headless-gui@v1
uses: aganders3/headless-gui@v2
with:
run: hatch -v run +backend=${{ matrix.backend }} test:run

Expand All @@ -65,19 +65,19 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"

- uses: tlambert03/setup-qt-libs@v1.5
- uses: tlambert03/setup-qt-libs@v1.7

- name: Install dependencies
run: |
python -m pip install -e .
python -m pip install pytest 'pydantic<2' attrs pytest-cov pyqt6
- name: Test
uses: aganders3/headless-gui@v1
uses: aganders3/headless-gui@v2
with:
run: pytest tests/test_ui_field.py -v --color=yes --cov=magicgui --cov-report=xml

Expand All @@ -92,18 +92,18 @@ jobs:
with:
repository: napari/napari
path: napari-from-github
- uses: tlambert03/setup-qt-libs@v1.5
- uses: actions/setup-python@v4
- uses: tlambert03/setup-qt-libs@v1.7
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade pip pytest-pretty
python -m pip install -e .[testing]
python -m pip install -e ./napari-from-github[pyqt5]
- name: Test napari magicgui
uses: aganders3/headless-gui@v1
uses: aganders3/headless-gui@v2
with:
working-directory: napari-from-github
run: pytest -W ignore napari/_tests/test_magicgui.py -v --color=yes
Expand All @@ -117,8 +117,8 @@ jobs:
with:
repository: hanjinliu/magic-class
path: magic-class
- uses: tlambert03/setup-qt-libs@v1.5
- uses: actions/setup-python@v4
- uses: tlambert03/setup-qt-libs@v1.7
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install
Expand All @@ -128,7 +128,7 @@ jobs:
python -m pip install ./magic-class[testing]
- name: Test magicclass
uses: aganders3/headless-gui@v1
uses: aganders3/headless-gui@v2
# magicclass is still in development, don't fail the whole build
# this makes this much less useful... but it's better than nothing?
continue-on-error: true
Expand All @@ -145,8 +145,8 @@ jobs:
with:
repository: stardist/stardist-napari
path: stardist-napari
- uses: tlambert03/setup-qt-libs@v1.5
- uses: actions/setup-python@v4
- uses: tlambert03/setup-qt-libs@v1.7
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install
Expand All @@ -156,7 +156,7 @@ jobs:
python -m pip install ./stardist-napari[test]
- name: Run stardist tests
uses: aganders3/headless-gui@v1
uses: aganders3/headless-gui@v2
with:
working-directory: stardist-napari
run: python -m pytest -v --color=yes -W ignore stardist_napari
Expand All @@ -173,8 +173,8 @@ jobs:
with:
repository: 4DNucleome/PartSeg
path: PartSeg
- uses: tlambert03/setup-qt-libs@v1.5
- uses: actions/setup-python@v4
- uses: tlambert03/setup-qt-libs@v1.7
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install
Expand All @@ -183,7 +183,7 @@ jobs:
python -m pip install ./PartSeg[test,pyqt5]
- name: Run PartSeg tests
uses: aganders3/headless-gui@v1
uses: aganders3/headless-gui@v2
with:
working-directory: PartSeg
run: python -m pytest -v --color=yes -W ignore package/tests/test_PartSeg/test_napari_widgets.py
Expand All @@ -197,7 +197,7 @@ jobs:
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install dependencies
Expand Down
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,31 @@ ci:
repos:

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-docstring-first
- id: end-of-file-fixer
- id: trailing-whitespace


- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.292
rev: v0.2.0
hooks:
- id: ruff
args: ["--fix"]

- repo: https://github.com/psf/black
rev: 23.9.1
rev: 24.1.1
hooks:
- id: black

- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.14
rev: v0.16
hooks:
- id: validate-pyproject

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
rev: v1.8.0
hooks:
- id: mypy
files: "^src/"
Expand Down
72 changes: 67 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,67 @@
# Changelog

## [v0.8.1](https://github.com/pyapp-kit/magicgui/tree/v0.8.1) (2023-12-06)

[Full Changelog](https://github.com/pyapp-kit/magicgui/compare/v0.8.0...v0.8.1)

**Implemented enhancements:**

- feat: add `Table.delete_row` method [\#610](https://github.com/pyapp-kit/magicgui/pull/610) ([tlambert03](https://github.com/tlambert03))
- feat: add toolbar widget [\#597](https://github.com/pyapp-kit/magicgui/pull/597) ([tlambert03](https://github.com/tlambert03))

**Fixed bugs:**

- Ensure QImage is ARGB32 before converting to numpy [\#618](https://github.com/pyapp-kit/magicgui/pull/618) ([aganders3](https://github.com/aganders3))
- fix: allow future annotations in ipywidgets backend [\#609](https://github.com/pyapp-kit/magicgui/pull/609) ([tlambert03](https://github.com/tlambert03))
- Make kwargs of container-like widgets consistent [\#606](https://github.com/pyapp-kit/magicgui/pull/606) ([hanjinliu](https://github.com/hanjinliu))

**Documentation:**

- docs: unpin pyside6 when building docs [\#614](https://github.com/pyapp-kit/magicgui/pull/614) ([tlambert03](https://github.com/tlambert03))

**Merged pull requests:**

- ci\(dependabot\): bump tlambert03/setup-qt-libs from 1.5 to 1.6 [\#615](https://github.com/pyapp-kit/magicgui/pull/615) ([dependabot[bot]](https://github.com/apps/dependabot))
- chore!: remove older deprecations [\#607](https://github.com/pyapp-kit/magicgui/pull/607) ([tlambert03](https://github.com/tlambert03))

## [v0.8.0](https://github.com/pyapp-kit/magicgui/tree/v0.8.0) (2023-10-20)

[Full Changelog](https://github.com/pyapp-kit/magicgui/compare/v0.7.3...v0.8.0)

**Implemented enhancements:**

- feat: add icons on buttons [\#598](https://github.com/pyapp-kit/magicgui/pull/598) ([tlambert03](https://github.com/tlambert03))
- feat: support python3.12 [\#590](https://github.com/pyapp-kit/magicgui/pull/590) ([tlambert03](https://github.com/tlambert03))

**Fixed bugs:**

- fix: Allow user to overwrite default widget opts [\#602](https://github.com/pyapp-kit/magicgui/pull/602) ([Czaki](https://github.com/Czaki))
- chore: preserve magicgui-decorated function parameter hints with ParamSpec [\#600](https://github.com/pyapp-kit/magicgui/pull/600) ([tlambert03](https://github.com/tlambert03))
- fix: Support Annotated types in list/tuple [\#588](https://github.com/pyapp-kit/magicgui/pull/588) ([hanjinliu](https://github.com/hanjinliu))
- fix: fix Literal with widget\_type [\#586](https://github.com/pyapp-kit/magicgui/pull/586) ([tlambert03](https://github.com/tlambert03))
- fix: Fix parent attribute to point to proper magicgui widget parent [\#583](https://github.com/pyapp-kit/magicgui/pull/583) ([tlambert03](https://github.com/tlambert03))
- fix: prevent dupe calls, alternative [\#546](https://github.com/pyapp-kit/magicgui/pull/546) ([Czaki](https://github.com/Czaki))

**Tests & CI:**

- test: try fix napari tests [\#591](https://github.com/pyapp-kit/magicgui/pull/591) ([tlambert03](https://github.com/tlambert03))

**Documentation:**

- docs: Fix docs warning [\#603](https://github.com/pyapp-kit/magicgui/pull/603) ([tlambert03](https://github.com/tlambert03))
- chore: Add python version to README.md [\#596](https://github.com/pyapp-kit/magicgui/pull/596) ([tlambert03](https://github.com/tlambert03))
- docs: Fix broken mkdocs links [\#587](https://github.com/pyapp-kit/magicgui/pull/587) ([GenevieveBuckley](https://github.com/GenevieveBuckley))
- docs: Example script for ineterminate progress bar with a long running computation [\#579](https://github.com/pyapp-kit/magicgui/pull/579) ([GenevieveBuckley](https://github.com/GenevieveBuckley))
- docs: Auto-generated examples gallery [\#571](https://github.com/pyapp-kit/magicgui/pull/571) ([GenevieveBuckley](https://github.com/GenevieveBuckley))

**Merged pull requests:**

- chore: changelog v0.8.0 [\#605](https://github.com/pyapp-kit/magicgui/pull/605) ([tlambert03](https://github.com/tlambert03))
- style: use `Unpack` for better kwargs typing [\#599](https://github.com/pyapp-kit/magicgui/pull/599) ([tlambert03](https://github.com/tlambert03))
- chore: remove setup.py [\#595](https://github.com/pyapp-kit/magicgui/pull/595) ([tlambert03](https://github.com/tlambert03))
- ci\(dependabot\): bump actions/checkout from 3 to 4 [\#578](https://github.com/pyapp-kit/magicgui/pull/578) ([dependabot[bot]](https://github.com/apps/dependabot))
- chore: Remove dangling \_version.py [\#576](https://github.com/pyapp-kit/magicgui/pull/576) ([Czaki](https://github.com/Czaki))

## [v0.7.3](https://github.com/pyapp-kit/magicgui/tree/v0.7.3) (2023-08-12)

[Full Changelog](https://github.com/pyapp-kit/magicgui/compare/v0.7.2...v0.7.3)
Expand Down Expand Up @@ -511,7 +573,7 @@

## [v0.2.9](https://github.com/pyapp-kit/magicgui/tree/v0.2.9) (2021-04-05)

[Full Changelog](https://github.com/pyapp-kit/magicgui/compare/v0.2.8...v0.2.9)
[Full Changelog](https://github.com/pyapp-kit/magicgui/compare/v0.2.8rc0...v0.2.9)

**Implemented enhancements:**

Expand All @@ -537,13 +599,13 @@

- \[pre-commit.ci\] pre-commit autoupdate [\#212](https://github.com/pyapp-kit/magicgui/pull/212) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))

## [v0.2.8](https://github.com/pyapp-kit/magicgui/tree/v0.2.8) (2021-03-24)
## [v0.2.8rc0](https://github.com/pyapp-kit/magicgui/tree/v0.2.8rc0) (2021-03-24)

[Full Changelog](https://github.com/pyapp-kit/magicgui/compare/v0.2.8rc0...v0.2.8)
[Full Changelog](https://github.com/pyapp-kit/magicgui/compare/v0.2.8...v0.2.8rc0)

## [v0.2.8rc0](https://github.com/pyapp-kit/magicgui/tree/v0.2.8rc0) (2021-03-24)
## [v0.2.8](https://github.com/pyapp-kit/magicgui/tree/v0.2.8) (2021-03-24)

[Full Changelog](https://github.com/pyapp-kit/magicgui/compare/v0.2.7...v0.2.8rc0)
[Full Changelog](https://github.com/pyapp-kit/magicgui/compare/v0.2.7...v0.2.8)

**Implemented enhancements:**

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
<a href="https://anaconda.org/conda-forge/magicgui">
<img src="https://img.shields.io/conda/vn/conda-forge/magicgui" alt="magicgui on conda-forge" />
</a>
<a href="https://python.org">
<img src="https://img.shields.io/pypi/pyversions/magicgui.svg?color=green" alt="magicgui python version support" />
</a>
</p>
<p align="center">
<a href="https://github.com/pyapp-kit/magicgui/actions/workflows/test_and_deploy.yml">
Expand Down
1 change: 1 addition & 0 deletions docs/examples/applications/callable.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
This example demonstrates handling callable functions with magicgui.
"""

from magicgui import magicgui


Expand Down
1 change: 1 addition & 0 deletions docs/examples/applications/chaining.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
This example demonstrates chaining multiple functions together.
"""

from magicgui import magicgui, widgets


Expand Down
1 change: 1 addition & 0 deletions docs/examples/applications/hotdog.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Demo app to upload an image and classify if it's an hotdog or not.
"""

import pathlib
from enum import Enum

Expand Down
1 change: 1 addition & 0 deletions docs/examples/applications/pint_quantity.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from and to different units.
https://pint.readthedocs.io/en/stable/
"""

from pint import Quantity

from magicgui import magicgui
Expand Down
1 change: 1 addition & 0 deletions docs/examples/basic_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
A basic example using magicgui.
"""

from magicgui import magicgui


Expand Down
1 change: 1 addition & 0 deletions docs/examples/basic_widgets_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
This code demonstrates a few of the widget types that magicgui can create
based on the parameter types in your function.
"""

import datetime
from enum import Enum
from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions docs/examples/demo_widgets/change_label.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
An example showing how to create custom text labels for your widgets.
"""

from magicgui import magicgui


Expand Down
1 change: 1 addition & 0 deletions docs/examples/demo_widgets/choices.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Choices for dropdowns can be provided in a few different ways.
"""

from enum import Enum

from magicgui import magicgui, widgets
Expand Down
1 change: 1 addition & 0 deletions docs/examples/demo_widgets/file_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
A file dialog widget example.
"""

from pathlib import Path
from typing import Sequence

Expand Down
1 change: 1 addition & 0 deletions docs/examples/demo_widgets/log_slider.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
A logarithmic scale range slider widget.
"""

from magicgui import magicgui


Expand Down
1 change: 1 addition & 0 deletions docs/examples/demo_widgets/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
A password login field widget.
"""

from magicgui import magicgui


Expand Down
1 change: 1 addition & 0 deletions docs/examples/demo_widgets/optional.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Optional user input using a dropdown selection widget.
"""

from typing import Optional

from magicgui import magicgui
Expand Down
1 change: 1 addition & 0 deletions docs/examples/demo_widgets/range_slider.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
A double ended range slider widget.
"""

from typing import Tuple

from magicgui import magicgui
Expand Down
1 change: 1 addition & 0 deletions docs/examples/demo_widgets/selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
A selection widget allowing multiple selections by the user.
"""

from magicgui import magicgui


Expand Down
Loading

0 comments on commit 2d2290f

Please sign in to comment.