-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/qtpy #61
Feat/qtpy #61
Changes from all commits
81f8ed5
c08ec9e
c4d892e
86b96d8
cebd70f
204d38e
b85d112
7d87815
5307cc5
67c2bd2
81a142e
7b80509
78eaf7a
c31306d
8695c93
866aa6a
210c4fc
4145853
9cb7056
2775c88
2d1ebce
d6fd04b
52c5972
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ dependencies: | |
- matplotlib | ||
- appdirs | ||
- pyqt | ||
- qtpy | ||
- imageio>=2.5.0 | ||
- imageio-ffmpeg | ||
- colorcet | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,17 +1,14 @@ | ||||||
""" | ||||||
This module contains a basic Qt-compatible counter class. | ||||||
""" | ||||||
nicobako marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
from PyQt5.QtCore import QObject, pyqtSignal, pyqtSlot | ||||||
"""This module contains a basic Qt-compatible counter class.""" | ||||||
|
||||||
from qtpy.QtCore import QObject, Signal, Slot | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will immediately break any
And then in this file do:
Suggested change
And once we cut version 0.3, we can revert the But maybe this is overkill since There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If the core developers think there needs to be a deprecation period, then this would be a good solution. I'm open to this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think just going ahead without the depreciation works. Users can always downgrade to an older version, and adding in a depreciation is a bit of a pain. Plus, installing We can always give a more descriptive error on import if we wish, but it's a bit of extra work making it backwards compatible and adding a depreciation warning as well. |
||||||
|
||||||
|
||||||
class Counter(QObject): | ||||||
""" | ||||||
Counter class with Qt signal/slot. | ||||||
""" | ||||||
"""Counter class with Qt signal/slot.""" | ||||||
|
||||||
# pylint: disable=too-few-public-methods | ||||||
|
||||||
signal_finished = pyqtSignal() | ||||||
signal_finished = Signal() | ||||||
|
||||||
def __init__(self, count: int) -> None: | ||||||
"""Initialize the counter.""" | ||||||
|
@@ -25,7 +22,7 @@ def __init__(self, count: int) -> None: | |||||
else: | ||||||
raise ValueError("count is not strictly positive.") | ||||||
|
||||||
@pyqtSlot() | ||||||
@Slot() | ||||||
def decrease(self) -> None: | ||||||
nicobako marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
"""Decrease the count.""" | ||||||
self.count -= 1 | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ imageio-ffmpeg | |
colorcet | ||
cmocean | ||
meshio>=4.0.3, <5.0 | ||
qtpy | ||
PyQt5==5.11.3 | ||
pytest-sphinx | ||
Sphinx | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ pytest | |
pytest-cov | ||
pytest-memprof | ||
codecov | ||
qtpy | ||
PyQt5==5.11.3 | ||
pytest-qt | ||
imageio>=2.5.0 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the leading
>
? I would make this more compact like:The wording about being required or not should be adjusted based on whether or not there is actually going to be a deprecation period.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The leading > is because it's a quote from the qtpy docs... But I'm open to changing it to something that looks nicer.