mirror of
https://github.com/pyapp-kit/superqt.git
synced 2025-07-20 19:51:07 +02:00
rename to superqt (#3)
This commit is contained in:
2
.github/workflows/test_and_deploy.yml
vendored
2
.github/workflows/test_and_deploy.yml
vendored
@@ -134,7 +134,7 @@ jobs:
|
||||
# and requires that you have put your twine API key in your
|
||||
# github secrets (see readme for details)
|
||||
needs: [test]
|
||||
if: ${{ github.repository == 'napari/qwidgets' && contains(github.ref, 'tags') }}
|
||||
if: ${{ github.repository == 'napari/superqt' && contains(github.ref, 'tags') }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
@@ -9,8 +9,8 @@ To get started fork this repository, and clone your fork:
|
||||
|
||||
```bash
|
||||
# clone your fork
|
||||
git clone https://github.com/<your_organization>/qwidgets
|
||||
cd qwidgets
|
||||
git clone https://github.com/<your_organization>/superqt
|
||||
cd superqt
|
||||
|
||||
# install pre-commit hooks
|
||||
pre-commit install
|
||||
@@ -32,7 +32,7 @@ All widgets must be well-tested, and should work on:
|
||||
- macOS, Windows, & Linux
|
||||
|
||||
Until [qtpy](https://github.com/spyder-ide/qtpy) supports PyQt6/PySide6, imports
|
||||
should use (and modify if necessary) `qwidgets.qtcompat`.
|
||||
should use (and modify if necessary) `superqt.qtcompat`.
|
||||
|
||||
## Style Guide
|
||||
|
||||
|
2
LICENSE
2
LICENSE
@@ -12,7 +12,7 @@ modification, are permitted provided that the following conditions are met:
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of qwidgets nor the names of its
|
||||
* Neither the name of superqt nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
|
23
README.md
23
README.md
@@ -1,12 +1,12 @@
|
||||
#  extra-qt!
|
||||
#  superqt!
|
||||
|
||||
|
||||
[](https://github.com/napari/qwidgets/raw/master/LICENSE)
|
||||
[](https://pypi.org/project/qwidgets)
|
||||
[](https://github.com/napari/superqt/raw/master/LICENSE)
|
||||
[](https://pypi.org/project/superqt)
|
||||
[](https://python.org)
|
||||
[](https://github.com/napari/qwidgets/actions/workflows/test_and_deploy.yml)
|
||||
[](https://codecov.io/gh/napari/qwidgets)
|
||||
Version](https://img.shields.io/pypi/pyversions/superqt.svg?color=green)](https://python.org)
|
||||
[](https://github.com/napari/superqt/actions/workflows/test_and_deploy.yml)
|
||||
[](https://codecov.io/gh/napari/superqt)
|
||||
|
||||
### "missing" widgets and components for PyQt/PySide
|
||||
|
||||
@@ -20,7 +20,6 @@ Components are tested on:
|
||||
- PyQt5 (5.11 and above) & PyQt6
|
||||
- PySide2 (5.11 and above) & PySide6
|
||||
|
||||
|
||||
## Widgets
|
||||
|
||||
Widgets include:
|
||||
@@ -29,16 +28,16 @@ Widgets include:
|
||||
|
||||
- [Range Slider](docs/sliders.md#range-slider) (multi-handle slider)
|
||||
|
||||
<img src="https://raw.githubusercontent.com/napari/extra-qt/main/docs/images/demo_darwin10.png" alt="range sliders" width=680>
|
||||
<img src="https://raw.githubusercontent.com/napari/superqt/main/docs/images/demo_darwin10.png" alt="range sliders" width=680>
|
||||
|
||||
|
||||
- [Labeled Sliders](docs/sliders.md#labeled-sliders) (sliders with linked
|
||||
spinboxes)
|
||||
|
||||
<img src="https://raw.githubusercontent.com/napari/extra-qt/main/docs/images/labeled_qslider.png" alt="range sliders" width=680>
|
||||
|
||||
<img src="https://raw.githubusercontent.com/napari/extra-qt/main/docs/images/labeled_range.png" alt="range sliders" width=680>
|
||||
|
||||
<img src="https://raw.githubusercontent.com/napari/superqt/main/docs/images/labeled_qslider.png" alt="range sliders" width=680>
|
||||
|
||||
<img src="https://raw.githubusercontent.com/napari/superqt/main/docs/images/labeled_range.png" alt="range sliders" width=680>
|
||||
|
||||
- Unbound Integer SpinBox (backed by python `int`)
|
||||
|
||||
## Contributing
|
||||
|
@@ -1,6 +1,6 @@
|
||||
ignore:
|
||||
- qwidgets/_version.py
|
||||
- qwidgets/qtcompat/*
|
||||
- superqt/_version.py
|
||||
- superqt/qtcompat/*
|
||||
- '*_tests*'
|
||||
coverage:
|
||||
status:
|
||||
|
@@ -15,7 +15,7 @@
|
||||
## Range Slider
|
||||
|
||||
```python
|
||||
from qwidgets import QRangeSlider
|
||||
from superqt import QRangeSlider
|
||||
|
||||
# as usual:
|
||||
# you must create a QApplication before create a widget.
|
||||
@@ -172,7 +172,7 @@ This package also includes two "labeled" slider variants. One for `QRangeSlider`
|
||||

|
||||
|
||||
```python
|
||||
from qwidgets import QLabeledRangeSlider
|
||||
from superqt import QLabeledRangeSlider
|
||||
```
|
||||
|
||||
This has the same API as `QRangeSlider` with the following additional options:
|
||||
@@ -217,7 +217,7 @@ If you find that you need to fine tune the position of the handle labels:
|
||||

|
||||
|
||||
```python
|
||||
from qwidgets import QLabeledSlider
|
||||
from superqt import QLabeledSlider
|
||||
```
|
||||
|
||||
(no additional options at this point)
|
||||
@@ -227,12 +227,12 @@ from qwidgets import QLabeledSlider
|
||||
If you encounter any problems, please [file an issue] along with a detailed
|
||||
description.
|
||||
|
||||
[file an issue]: https://github.com/napari/qwidgets/issues
|
||||
[file an issue]: https://github.com/napari/superqt/issues
|
||||
|
||||
## Float Slider
|
||||
|
||||
just like QSlider, but supports float values
|
||||
|
||||
```python
|
||||
from qwidgets import QDoubleSlider
|
||||
from superqt import QDoubleSlider
|
||||
```
|
||||
|
@@ -1,6 +1,6 @@
|
||||
from qwidgets import QRangeSlider
|
||||
from qwidgets.qtcompat.QtCore import Qt
|
||||
from qwidgets.qtcompat.QtWidgets import QApplication
|
||||
from superqt import QRangeSlider
|
||||
from superqt.qtcompat.QtCore import Qt
|
||||
from superqt.qtcompat.QtWidgets import QApplication
|
||||
|
||||
app = QApplication([])
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
from qwidgets import QDoubleSlider
|
||||
from qwidgets.qtcompat.QtCore import Qt
|
||||
from qwidgets.qtcompat.QtWidgets import QApplication
|
||||
from superqt import QDoubleSlider
|
||||
from superqt.qtcompat.QtCore import Qt
|
||||
from superqt.qtcompat.QtWidgets import QApplication
|
||||
|
||||
app = QApplication([])
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
from qwidgets import QRangeSlider
|
||||
from qwidgets.qtcompat import QtCore
|
||||
from qwidgets.qtcompat import QtWidgets as QtW
|
||||
from superqt import QRangeSlider
|
||||
from superqt.qtcompat import QtCore
|
||||
from superqt.qtcompat import QtWidgets as QtW
|
||||
|
||||
QSS = """
|
||||
QSlider {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
from qwidgets import QDoubleRangeSlider, QDoubleSlider, QRangeSlider
|
||||
from qwidgets.qtcompat.QtCore import Qt
|
||||
from qwidgets.qtcompat.QtWidgets import QApplication, QVBoxLayout, QWidget
|
||||
from superqt import QDoubleRangeSlider, QDoubleSlider, QRangeSlider
|
||||
from superqt.qtcompat.QtCore import Qt
|
||||
from superqt.qtcompat.QtWidgets import QApplication, QVBoxLayout, QWidget
|
||||
|
||||
app = QApplication([])
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
from qwidgets import QDoubleSlider
|
||||
from qwidgets.qtcompat.QtCore import Qt
|
||||
from qwidgets.qtcompat.QtWidgets import QApplication
|
||||
from superqt import QDoubleSlider
|
||||
from superqt.qtcompat.QtCore import Qt
|
||||
from superqt.qtcompat.QtWidgets import QApplication
|
||||
|
||||
app = QApplication([])
|
||||
|
||||
|
@@ -1,11 +1,11 @@
|
||||
from qwidgets import (
|
||||
from superqt import (
|
||||
QLabeledDoubleRangeSlider,
|
||||
QLabeledDoubleSlider,
|
||||
QLabeledRangeSlider,
|
||||
QLabeledSlider,
|
||||
)
|
||||
from qwidgets.qtcompat.QtCore import Qt
|
||||
from qwidgets.qtcompat.QtWidgets import QApplication, QHBoxLayout, QVBoxLayout, QWidget
|
||||
from superqt.qtcompat.QtCore import Qt
|
||||
from superqt.qtcompat.QtWidgets import QApplication, QHBoxLayout, QVBoxLayout, QWidget
|
||||
|
||||
app = QApplication([])
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
from qwidgets import QRangeSlider
|
||||
from qwidgets.qtcompat.QtWidgets import QApplication
|
||||
from superqt import QRangeSlider
|
||||
from superqt.qtcompat.QtWidgets import QApplication
|
||||
|
||||
app = QApplication([])
|
||||
|
||||
|
10
setup.cfg
10
setup.cfg
@@ -1,9 +1,9 @@
|
||||
[metadata]
|
||||
name = qwidgets
|
||||
name = superqt
|
||||
description = Missing widgets for PyQt/PySide
|
||||
long_description = file: README.md
|
||||
long_description_content_type = text/markdown
|
||||
url = https://github.com/napari/qwidgets
|
||||
url = https://github.com/napari/superqt
|
||||
author = Talley Lambert
|
||||
author_email = talley.lambert@gmail.com
|
||||
license = BSD-3-Clause
|
||||
@@ -27,9 +27,9 @@ classifiers =
|
||||
Topic :: Software Development :: Widget Sets
|
||||
keywords = qt, range slider, widget
|
||||
project_urls =
|
||||
Source = https://github.com/napari/qwidgets
|
||||
Tracker = https://github.com/napari/qwidgets/issues
|
||||
Changelog = https://github.com/napari/qwidgets/blob/master/CHANGELOG.md
|
||||
Source = https://github.com/napari/superqt
|
||||
Tracker = https://github.com/napari/superqt/issues
|
||||
Changelog = https://github.com/napari/superqt/blob/master/CHANGELOG.md
|
||||
|
||||
[options]
|
||||
packages = find:
|
||||
|
2
setup.py
2
setup.py
@@ -1,6 +1,6 @@
|
||||
from setuptools import setup
|
||||
|
||||
setup(
|
||||
use_scm_version={"write_to": "qwidgets/_version.py"},
|
||||
use_scm_version={"write_to": "superqt/_version.py"},
|
||||
setup_requires=["setuptools_scm"],
|
||||
)
|
||||
|
@@ -1,4 +1,4 @@
|
||||
"""qwidgets is a collection of QtWidgets for python."""
|
||||
"""superqt is a collection of QtWidgets for python."""
|
||||
try:
|
||||
from ._version import version as __version__
|
||||
except ImportError:
|
@@ -146,7 +146,7 @@ if API in PYSIDE6_API:
|
||||
if API is None:
|
||||
raise PythonQtError(
|
||||
"No Qt bindings could be found.\nYou must install one of the following packages "
|
||||
"to use qwidgets: PyQt5, PyQt6, PySide2, or PySide6"
|
||||
"to use superqt: PyQt5, PyQt6, PySide2, or PySide6"
|
||||
)
|
||||
|
||||
# If a correct API name is passed to QT_API and it could not be found,
|
@@ -4,9 +4,9 @@ from platform import system
|
||||
|
||||
import pytest
|
||||
|
||||
from qwidgets.qtcompat import QT_VERSION
|
||||
from qwidgets.qtcompat.QtCore import QEvent, QPoint, QPointF, Qt
|
||||
from qwidgets.qtcompat.QtGui import QMouseEvent, QWheelEvent
|
||||
from superqt.qtcompat import QT_VERSION
|
||||
from superqt.qtcompat.QtCore import QEvent, QPoint, QPointF, Qt
|
||||
from superqt.qtcompat.QtGui import QMouseEvent, QWheelEvent
|
||||
|
||||
QT_VERSION = LooseVersion(QT_VERSION)
|
||||
|
@@ -2,13 +2,13 @@ import os
|
||||
|
||||
import pytest
|
||||
|
||||
from qwidgets import (
|
||||
from superqt import (
|
||||
QDoubleRangeSlider,
|
||||
QDoubleSlider,
|
||||
QLabeledDoubleRangeSlider,
|
||||
QLabeledDoubleSlider,
|
||||
)
|
||||
from qwidgets.qtcompat import API_NAME
|
||||
from superqt.qtcompat import API_NAME
|
||||
|
||||
range_types = {QDoubleRangeSlider, QLabeledDoubleRangeSlider}
|
||||
|
@@ -2,10 +2,10 @@ import math
|
||||
|
||||
import pytest
|
||||
|
||||
from qwidgets.qtcompat.QtCore import QEvent, QPoint, QPointF, Qt
|
||||
from qwidgets.qtcompat.QtGui import QHoverEvent
|
||||
from qwidgets.qtcompat.QtWidgets import QStyle, QStyleOptionSlider
|
||||
from qwidgets.sliders._generic_slider import _GenericSlider
|
||||
from superqt.qtcompat.QtCore import QEvent, QPoint, QPointF, Qt
|
||||
from superqt.qtcompat.QtGui import QHoverEvent
|
||||
from superqt.qtcompat.QtWidgets import QStyle, QStyleOptionSlider
|
||||
from superqt.sliders._generic_slider import _GenericSlider
|
||||
|
||||
from ._testutil import _linspace, _mouse_event, _wheel_event, skip_on_linux_qt6
|
||||
|
@@ -2,10 +2,10 @@ import math
|
||||
|
||||
import pytest
|
||||
|
||||
from qwidgets import QDoubleRangeSlider, QRangeSlider
|
||||
from qwidgets.qtcompat.QtCore import QEvent, QPoint, QPointF, Qt
|
||||
from qwidgets.qtcompat.QtGui import QHoverEvent
|
||||
from qwidgets.qtcompat.QtWidgets import QStyle, QStyleOptionSlider
|
||||
from superqt import QDoubleRangeSlider, QRangeSlider
|
||||
from superqt.qtcompat.QtCore import QEvent, QPoint, QPointF, Qt
|
||||
from superqt.qtcompat.QtGui import QHoverEvent
|
||||
from superqt.qtcompat.QtWidgets import QStyle, QStyleOptionSlider
|
||||
|
||||
from ._testutil import _linspace, _mouse_event, _wheel_event, skip_on_linux_qt6
|
||||
|
@@ -4,11 +4,11 @@ from distutils.version import LooseVersion
|
||||
|
||||
import pytest
|
||||
|
||||
from qwidgets import QDoubleSlider, QLabeledDoubleSlider, QLabeledSlider
|
||||
from qwidgets.qtcompat.QtCore import QEvent, QPoint, QPointF, Qt
|
||||
from qwidgets.qtcompat.QtGui import QHoverEvent
|
||||
from qwidgets.qtcompat.QtWidgets import QSlider, QStyle, QStyleOptionSlider
|
||||
from qwidgets.sliders._generic_slider import _GenericSlider
|
||||
from superqt import QDoubleSlider, QLabeledDoubleSlider, QLabeledSlider
|
||||
from superqt.qtcompat.QtCore import QEvent, QPoint, QPointF, Qt
|
||||
from superqt.qtcompat.QtGui import QHoverEvent
|
||||
from superqt.qtcompat.QtWidgets import QSlider, QStyle, QStyleOptionSlider
|
||||
from superqt.sliders._generic_slider import _GenericSlider
|
||||
|
||||
from ._testutil import (
|
||||
QT_VERSION,
|
@@ -2,10 +2,10 @@ import platform
|
||||
|
||||
import pytest
|
||||
|
||||
from qwidgets import QRangeSlider
|
||||
from qwidgets.qtcompat import API_NAME
|
||||
from qwidgets.qtcompat.QtCore import Qt
|
||||
from qwidgets.sliders._generic_range_slider import SC_BAR, SC_HANDLE, SC_NONE
|
||||
from superqt import QRangeSlider
|
||||
from superqt.qtcompat import API_NAME
|
||||
from superqt.qtcompat.QtCore import Qt
|
||||
from superqt.sliders._generic_range_slider import SC_BAR, SC_HANDLE, SC_NONE
|
||||
|
||||
NOT_LINUX = platform.system() != "Linux"
|
||||
NOT_PYSIDE2 = API_NAME != "PySide2"
|
@@ -1,5 +1,5 @@
|
||||
from qwidgets.qtcompat.QtCore import Qt
|
||||
from qwidgets.spinbox import QLargeIntSpinBox
|
||||
from superqt.qtcompat.QtCore import Qt
|
||||
from superqt.spinbox import QLargeIntSpinBox
|
||||
|
||||
|
||||
def test_large_spinbox(qtbot):
|
6
tox.ini
6
tox.ini
@@ -10,8 +10,8 @@ exclude_lines =
|
||||
except ImportError*
|
||||
raise NotImplementedError()
|
||||
omit =
|
||||
qwidgets/_version.py
|
||||
qwidgets/qtcompat/*
|
||||
superqt/_version.py
|
||||
superqt/qtcompat/*
|
||||
*_tests*
|
||||
|
||||
[gh-actions]
|
||||
@@ -56,4 +56,4 @@ extras =
|
||||
pyside6: pyside6
|
||||
commands_pre =
|
||||
pyqt6,pyside6: pip install -U pytest-qt@git+https://github.com/pytest-dev/pytest-qt.git
|
||||
commands = pytest --color=yes --cov=qwidgets --cov-report=xml {posargs}
|
||||
commands = pytest --color=yes --cov=superqt --cov-report=xml {posargs}
|
||||
|
Reference in New Issue
Block a user