Skip to content

Commit

Permalink
Merge branch 'main' into py312
Browse files Browse the repository at this point in the history
  • Loading branch information
tlambert03 authored Sep 23, 2023
2 parents e344d0d + 409d19e commit 8222b35
Show file tree
Hide file tree
Showing 52 changed files with 2,694 additions and 354 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
labels: 'bug'
assignees: ''

---
Expand Down
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: Feature request
about: Request a new feature
title: ''
labels: 'enhancement'
assignees: ''
---
33 changes: 13 additions & 20 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Test

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
push:
branches:
Expand Down Expand Up @@ -47,14 +51,6 @@ jobs:
platform: ubuntu-latest
backend: pyqt6

# python 3.7
- python-version: 3.7
platform: macos-latest
backend: pyqt5
- python-version: 3.7
platform: windows-latest
backend: pyside2

# legacy Qt
- python-version: 3.8
platform: ubuntu-latest
Expand All @@ -67,12 +63,7 @@ jobs:
backend: "pyqt5==5.14.*"

steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
Expand Down Expand Up @@ -103,7 +94,7 @@ jobs:
name: qtpy minreq
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: tlambert03/[email protected]
- uses: actions/setup-python@v4
with:
Expand All @@ -113,7 +104,7 @@ jobs:
run: |
python -m pip install -U pip
python -m pip install -e .[test,pyqt5]
python -m pip install qtpy==1.1.0 typing-extensions==3.10.0.0
python -m pip install qtpy==1.1.0 typing-extensions==3.7.4.3
- name: Test
uses: aganders3/[email protected]
Expand All @@ -124,12 +115,12 @@ jobs:
name: napari tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
path: superqt

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: napari/napari
path: napari-repo
Expand All @@ -156,7 +147,7 @@ jobs:
name: Check Manifest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.x"
Expand All @@ -170,7 +161,9 @@ jobs:
if: ${{ github.repository == 'pyapp-kit/superqt' && contains(github.ref, 'tags') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ repos:
- id: black

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

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

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.4.1
rev: v1.5.1
hooks:
- id: mypy
exclude: tests|examples
Expand Down
50 changes: 50 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,55 @@
# Changelog

## [v0.5.4](https://github.com/pyapp-kit/superqt/tree/v0.5.4) (2023-08-31)

[Full Changelog](https://github.com/pyapp-kit/superqt/compare/v0.5.3...v0.5.4)

**Fixed bugs:**

- fix: fix mysterious segfault [\#192](https://github.com/pyapp-kit/superqt/pull/192) ([tlambert03](https://github.com/tlambert03))

## [v0.5.3](https://github.com/pyapp-kit/superqt/tree/v0.5.3) (2023-08-21)

[Full Changelog](https://github.com/pyapp-kit/superqt/compare/v0.5.2...v0.5.3)

**Implemented enhancements:**

- feat: add error `exceptions_as_dialog` context manager to catch and show Exceptions [\#191](https://github.com/pyapp-kit/superqt/pull/191) ([tlambert03](https://github.com/tlambert03))

**Fixed bugs:**

- fix: remove dupes/aliases in QEnumCombo [\#190](https://github.com/pyapp-kit/superqt/pull/190) ([tlambert03](https://github.com/tlambert03))

## [v0.5.2](https://github.com/pyapp-kit/superqt/tree/v0.5.2) (2023-08-18)

[Full Changelog](https://github.com/pyapp-kit/superqt/compare/v0.5.1...v0.5.2)

**Implemented enhancements:**

- feat: allow throttler/debouncer as method decorator [\#188](https://github.com/pyapp-kit/superqt/pull/188) ([Czaki](https://github.com/Czaki))

**Fixed bugs:**

- fix: Add descriptive exception when fail to add instance to weakref dictionary [\#189](https://github.com/pyapp-kit/superqt/pull/189) ([Czaki](https://github.com/Czaki))

## [v0.5.1](https://github.com/pyapp-kit/superqt/tree/v0.5.1) (2023-08-17)

[Full Changelog](https://github.com/pyapp-kit/superqt/compare/v0.5.0...v0.5.1)

**Fixed bugs:**

- fix: fix parameter inspection on ensure\_thread decorators \(alternate\) [\#185](https://github.com/pyapp-kit/superqt/pull/185) ([tlambert03](https://github.com/tlambert03))
- fix: fix callback of throttled/debounced decorated functions with mismatched args [\#184](https://github.com/pyapp-kit/superqt/pull/184) ([tlambert03](https://github.com/tlambert03))

**Documentation updates:**

- docs: document signals blocked [\#186](https://github.com/pyapp-kit/superqt/pull/186) ([tlambert03](https://github.com/tlambert03))

**Merged pull requests:**

- test: change wait pattern [\#187](https://github.com/pyapp-kit/superqt/pull/187) ([tlambert03](https://github.com/tlambert03))
- build: drop python3.7, misc updates to repo [\#180](https://github.com/pyapp-kit/superqt/pull/180) ([tlambert03](https://github.com/tlambert03))

## [v0.5.0](https://github.com/pyapp-kit/superqt/tree/v0.5.0) (2023-08-06)

[Full Changelog](https://github.com/pyapp-kit/superqt/compare/v0.4.1...v0.5.0)
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pytest

All widgets must be well-tested, and should work on:

- Python 3.7 and above
- Python 3.8 and above
- PyQt5 (5.11 and above) & PyQt6
- PySide2 (5.11 and above) & PySide6
- macOS, Windows, & Linux
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ that are not provided in the native QtWidgets module.
Components are tested on:

- macOS, Windows, & Linux
- Python 3.7 and above
- Python 3.8 and above
- PyQt5 (5.11 and above) & PyQt6
- PySide2 (5.11 and above) & PySide6

Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ QtWidgets module.
Components are tested on:

- macOS, Windows, & Linux
- Python 3.7 and above
- Python 3.8 and above
- PyQt5 (5.11 and above) & PyQt6
- PySide2 (5.11 and above) & PySide6

Expand All @@ -26,4 +26,4 @@ conda install -c conda-forge superqt

## Usage

See the [Widgets](./widgets/) and [Utilities](./utilities/) pages for features offered by superqt.
See the [Widgets](./widgets/index.md) and [Utilities](./utilities/index.md) pages for features offered by superqt.
12 changes: 12 additions & 0 deletions docs/utilities/cmap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Colormap utilities

See also:

- [`superqt.QColormapComboBox`](../widgets/qcolormap.md)
- [`superqt.cmap.CmapCatalogComboBox`](../widgets/colormap_catalog.md)

::: superqt.cmap.draw_colormap

::: superqt.cmap.QColormapLineEdit

::: superqt.cmap.QColormapItemDelegate
3 changes: 3 additions & 0 deletions docs/utilities/error_dialog_contexts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Error message context manager

::: superqt.utils.exceptions_as_dialog
67 changes: 45 additions & 22 deletions docs/utilities/fonticon.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,44 @@ app.exec()

## Font Icon plugins

Ready-made fonticon packs are available as plugins:
Ready-made fonticon packs are available as plugins.

### [Font Awesome 5](https://fontawesome.com/v5/search)
A great way to search across most available icons libraries from a single
search interface is to use glyphsearch: <https://glyphsearch.com/>

If a font library you'd like to use is unavailable as a superqt plugin,
please [open a feature request](https://github.com/pyapp-kit/superqt/issues/new/choose)


### Font Awesome 6

Browse available icons at <https://fontawesome.com/v6/search>

```bash
pip install fonticon-fontawesome6
```

### Font Awesome 5

Browse available icons at <https://fontawesome.com/v5/search>

```bash
pip install fonticon-fontawesome5
```

### [Font Awesome 6](https://fontawesome.com/v6/search)
### Material Design Icons 7

Browse available icons at <https://materialdesignicons.com/>

```bash
pip install fonticon-fontawesome6
pip install fonticon-materialdesignicons7
```

### [Material Design Icons](https://materialdesignicons.com/)
### Material Design Icons 6

Browse available icons at <https://materialdesignicons.com/>
(note that the search defaults to v7, see changes from v6 in [the
changelog](https://pictogrammers.com/docs/library/mdi/releases/changelog/))

```bash
pip install fonticon-materialdesignicons6
Expand All @@ -55,7 +78,7 @@ pip install fonticon-materialdesignicons6
- <https://github.com/tlambert03/fonticon-feather>

`superqt.fonticon` is a pluggable system, and font icon packs may use the `"superqt.fonticon"`
entry point to register themselves with superqt. See [`fonticon-cookiecutter`](https://github.com/tlambert03/fonticon-cookiecutter) for a template, or look through the following repos for examples:
entry point to register themselves with superqt. See [`fonticon-cookiecutter`](https://github.com/tlambert03/fonticon-cookiecutter) for a template, or look through the following repos for examples:

- <https://github.com/tlambert03/fonticon-fontawesome6>
- <https://github.com/tlambert03/fonticon-fontawesome5>
Expand All @@ -64,38 +87,38 @@ entry point to register themselves with superqt. See [`fonticon-cookiecutter`](
## API

::: superqt.fonticon.icon
options:
heading_level: 3
options:
heading_level: 3

::: superqt.fonticon.setTextIcon
options:
heading_level: 3
options:
heading_level: 3

::: superqt.fonticon.font
options:
heading_level: 3
options:
heading_level: 3

::: superqt.fonticon.IconOpts
options:
heading_level: 3
options:
heading_level: 3

::: superqt.fonticon.addFont
options:
heading_level: 3
options:
heading_level: 3

## Animations

the `animation` parameter to `icon()` accepts a subclass of
`Animation` that will be

::: superqt.fonticon.Animation
options:
heading_level: 3
options:
heading_level: 3

::: superqt.fonticon.pulse
options:
heading_level: 3
options:
heading_level: 3

::: superqt.fonticon.spin
options:
heading_level: 3
options:
heading_level: 3
1 change: 1 addition & 0 deletions docs/utilities/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@
| ----------- | --------------------- |
| [`QMessageHandler`](./qmessagehandler.md) | A context manager to intercept messages from Qt. |
| [`CodeSyntaxHighlight`](./code_syntax_highlight.md) | A `QSyntaxHighlighter` for code syntax highlighting. |
| [`draw_colormap`](./cmap.md) | Function that draws a colormap into any QPaintDevice. |
3 changes: 3 additions & 0 deletions docs/utilities/signal_utils.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Signal Utilities

::: superqt.utils.signals_blocked
35 changes: 35 additions & 0 deletions docs/widgets/colormap_catalog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# CmapCatalogComboBox

Searchable `QComboBox` variant that contains the
[entire cmap colormap catalog](https://cmap-docs.readthedocs.io/en/latest/catalog/)

!!! note "requires cmap"

This widget uses the [cmap](https://cmap-docs.readthedocs.io/) library
to provide colormaps. You can install it with:

```shell
# use the `cmap` extra to include colormap support
pip install superqt[cmap]
```

You can limit the colormaps shown by setting the `categories` or
`interpolation` keyword arguments.

```python
from qtpy.QtWidgets import QApplication

from superqt.cmap import CmapCatalogComboBox

app = QApplication([])

catalog_combo = CmapCatalogComboBox(interpolation="linear")
catalog_combo.setCurrentText("viridis")
catalog_combo.show()

app.exec()
```

{{ show_widget(130) }}

{{ show_members('superqt.cmap.CmapCatalogComboBox') }}
Loading

0 comments on commit 8222b35

Please sign in to comment.