Skip to content

Commit

Permalink
Merge pull request #376 from astrofrog/fix-pyqt6
Browse files Browse the repository at this point in the history
Fix compatibility with PyQt6 and fix volume rendering with VisPy 0.11+
  • Loading branch information
astrofrog authored Jan 12, 2023
2 parents 1854eaa + 3ba514a commit 3493997
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 21 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/ci_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,28 @@ jobs:
with:
display: true
coverage: codecov
# The Linux PyQt 5.15 installation requires apt-getting its xcb deps and headless X11 display
# Linux PyQt 5.15 and 6.x installations require apt-getting xcb and EGL deps
# and headless X11 display
libraries: |
apt:
- '^libxcb.*-dev'
- libxkbcommon-x11-dev
- libegl1-mesa
envs: |
# Standard tests
- linux: py37-test
- linux: py38-test
- linux: py39-test
- linux: py310-test-dev
- linux: py39-test-pyqt6
- linux: py310-test-dev-pyqt6
- macos: py38-test
- macos: py39-test-dev
- macos: py310-test
- macos: py310-test-pyqt6
- windows: py38-test
- windows: py39-test-dev
- windows: py310-test
- windows: py310-test-pyqt6
publish:
needs: tests
Expand Down
10 changes: 10 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
comment: off
coverage:
status:
project:
default:
target: auto
# adjust accordingly based on how flaky your tests are
# this allows a 0.001% drop from the previous base commit coverage
# basically just to prevent counting zero changes as negative
threshold: 0.001%
6 changes: 3 additions & 3 deletions glue_vispy_viewers/common/viewer_options.ui
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,14 @@
<item row="4" column="3" colspan="3">
<widget class="QComboBox" name="combosel_y_att">
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
<enum>QComboBox::AdjustToMinimumContentsLengthWithIcon</enum>
</property>
</widget>
</item>
<item row="7" column="3" colspan="3">
<widget class="QComboBox" name="combosel_z_att">
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
<enum>QComboBox::AdjustToMinimumContentsLengthWithIcon</enum>
</property>
</widget>
</item>
Expand Down Expand Up @@ -236,7 +236,7 @@
<item row="0" column="3" colspan="3">
<widget class="QComboBox" name="combosel_x_att">
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
<enum>QComboBox::AdjustToMinimumContentsLengthWithIcon</enum>
</property>
</widget>
</item>
Expand Down
2 changes: 1 addition & 1 deletion glue_vispy_viewers/isosurface/layer_style_widget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<item row="0" column="1" colspan="3">
<widget class="QComboBox" name="combosel_attribute">
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
<enum>QComboBox::AdjustToMinimumContentsLengthWithIcon</enum>
</property>
</widget>
</item>
Expand Down
18 changes: 9 additions & 9 deletions glue_vispy_viewers/scatter/layer_style_widget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
<item>
<widget class="QComboBox" name="combosel_size_attribute">
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
<enum>QComboBox::AdjustToMinimumContentsLengthWithIcon</enum>
</property>
</widget>
</item>
Expand Down Expand Up @@ -260,7 +260,7 @@
<item>
<widget class="QComboBox" name="combosel_cmap_attribute">
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
<enum>QComboBox::AdjustToMinimumContentsLengthWithIcon</enum>
</property>
</widget>
</item>
Expand Down Expand Up @@ -346,7 +346,7 @@
<item>
<widget class="QColormapCombo" name="combodata_cmap">
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
<enum>QComboBox::AdjustToMinimumContentsLengthWithIcon</enum>
</property>
</widget>
</item>
Expand Down Expand Up @@ -456,7 +456,7 @@
</rect>
</property>
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
<enum>QComboBox::AdjustToMinimumContentsLengthWithIcon</enum>
</property>
</widget>
<widget class="QLabel" name="label_6">
Expand Down Expand Up @@ -488,7 +488,7 @@
</rect>
</property>
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
<enum>QComboBox::AdjustToMinimumContentsLengthWithIcon</enum>
</property>
</widget>
<widget class="QLabel" name="label_7">
Expand Down Expand Up @@ -520,7 +520,7 @@
</rect>
</property>
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
<enum>QComboBox::AdjustToMinimumContentsLengthWithIcon</enum>
</property>
</widget>
<widget class="QCheckBox" name="bool_zerr_visible">
Expand Down Expand Up @@ -551,7 +551,7 @@
</rect>
</property>
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
<enum>QComboBox::AdjustToMinimumContentsLengthWithIcon</enum>
</property>
</widget>
<widget class="QLabel" name="label_vector_y">
Expand Down Expand Up @@ -586,7 +586,7 @@
</rect>
</property>
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
<enum>QComboBox::AdjustToMinimumContentsLengthWithIcon</enum>
</property>
</widget>
<widget class="QCheckBox" name="bool_vector_visible">
Expand Down Expand Up @@ -700,7 +700,7 @@
</rect>
</property>
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
<enum>QComboBox::AdjustToMinimumContentsLengthWithIcon</enum>
</property>
</widget>
<widget class="QLabel" name="label_11">
Expand Down
2 changes: 1 addition & 1 deletion glue_vispy_viewers/volume/layer_style_widget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
<item row="0" column="1" colspan="2">
<widget class="QComboBox" name="combosel_attribute">
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
<enum>QComboBox::AdjustToMinimumContentsLengthWithIcon</enum>
</property>
</widget>
</item>
Expand Down
2 changes: 2 additions & 0 deletions glue_vispy_viewers/volume/volume_visual.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ def __init__(self, n_volume_max=16, emulate_texture=False, bgcolor='white', reso
# Set initial background color
self.shared_program['u_bgcolor'] = Color(bgcolor).rgba

self._need_interpolation_update = False

# Prevent additional attributes from being added
try:
self.freeze()
Expand Down
5 changes: 3 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
envlist =
py{37,38,39,310}-{test}-{dev}
py{37,38,39,310}-{test}-{dev}{,-pyqt6}
codestyle
requires = pip >= 18.0
setuptools >= 30.3.0
Expand All @@ -12,7 +12,8 @@ passenv =
changedir =
test: .tmp/{envname}
deps =
PyQt5==5.15.*
!pyqt6: PyQt5==5.15.*
pyqt6: PyQt6==6.4.*
dev: glue-core @ git+https://github.com/glue-viz/glue
dev: vispy @ git+https://github.com/vispy/vispy
extras =
Expand Down

0 comments on commit 3493997

Please sign in to comment.