Skip to content

Commit 5c58d0b

Browse files
committed
build: bumpy pyqtgraph from 0.12.1 to 0.12.2
1 parent 9382736 commit 5c58d0b

File tree

3 files changed

+3
-34
lines changed

3 files changed

+3
-34
lines changed

CHANGELOG

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
- fix: correctly handle missing features on data export (#80)
33
- setup: bump dclab from 0.34.2 to 0.34.3 (set R_HOME)
44
- build: bumpy rpy2 from 3.4.2 to 3.4.5
5+
- build: bumpy pyqtgraph from 0.12.1 to 0.12.2 and remove
6+
colorbar export workarounds
57
2.6.6
68
- fix: false alarms about wrong pyqtgraph version on startup
79
(removed the responsible code, because there are now more regular

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"h5py>=2.8.0",
3030
"numpy>=1.9.0",
3131
"pyqt5",
32-
"pyqtgraph==0.12.1",
32+
"pyqtgraph==0.12.2",
3333
"requests",
3434
"scipy>=0.13.0"],
3535
python_requires='>=3.6, <4',

shapeout2/gui/widgets/so_colorbaritem.py

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,16 @@
1-
from distutils.version import LooseVersion
2-
import pathlib
3-
import warnings
4-
51
import pyqtgraph as pg
62

73

8-
if LooseVersion(pg.__version__) > "0.12.1":
9-
warnings.warn("New version of pyqtgraph detected! Please remove the "
10-
"imageAxisOrder workaround, remove this case structure and "
11-
"update setup.py with the new version.")
12-
else:
13-
# Temporary fix for https://github.com/pyqtgraph/pyqtgraph/issues/1866.
14-
# Only modifies the AxisItem code in-place. This means that the location
15-
# has to be writable. For frozen applications, it has to be run before
16-
# freezing (e.g. during tests).
17-
axis_item_path = pathlib.Path(pg.graphicsItems.AxisItem.__file__)
18-
if axis_item_path.suffix == ".py" and axis_item_path.exists():
19-
lines = axis_item_path.read_text(encoding="utf-8").split("\n")
20-
for ii, line in enumerate(lines):
21-
if (line.count("resolves some damn pixel ambiguity")
22-
and not line.strip().startswith("#")):
23-
lines[ii] = "# " + line
24-
try:
25-
axis_item_path.write_text("\n".join(lines),
26-
encoding="utf-8")
27-
except BaseException:
28-
warnings.warn("Could not patch AxisItem for ColorBarItem!")
29-
30-
314
class ShapeOutColorBarItem(pg.ColorBarItem):
325
def __init__(self, yoffset, height, label, *args, **kwargs):
336
"""pg.ColorBarItem modified for Shape-Out
347
35-
- Workaround for https://github.com/pyqtgraph/pyqtgraph/issues/1720
36-
which is not in pyqtgraph 0.12.1
378
- Added option to define height
389
- translate the colorbar so that it is aligned with the plot
3910
- show the label on the right-hand axis
4011
- increase the contents margins
4112
"""
42-
# workaround for pyqtgraph 0.12.1, which does not yet include
43-
# https://github.com/pyqtgraph/pyqtgraph/issues/1720
44-
pg.setConfigOption('imageAxisOrder', 'col-major')
4513
super(ShapeOutColorBarItem, self).__init__(*args, **kwargs)
46-
pg.setConfigOption('imageAxisOrder', 'row-major')
4714

4815
for key in ['left', 'top', 'bottom']:
4916
axis = self.getAxis(key)

0 commit comments

Comments
 (0)