Skip to content
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

TraitsUI on Python 3.11 and PySide 6.4 #1994

Merged
merged 32 commits into from
Mar 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
47d9586
First cut at getting TraitsUI working on Python 3.11 and PySide 6.4
corranwebster Mar 17, 2023
0dca980
Rename linux install workflow
corranwebster Mar 17, 2023
86cf849
Flake8 fixes.
corranwebster Mar 17, 2023
5f56f32
Remove uses of setup.py; fix enum usage
corranwebster Mar 17, 2023
3735163
WIP test runners; update handling of __version__
corranwebster Mar 20, 2023
8afe91b
Fix up pyproject.toml dependencies.
corranwebster Mar 20, 2023
bc74325
Fix missing "on:" in CH workflows
corranwebster Mar 20, 2023
17b5565
Fix use of xvfb-run
corranwebster Mar 20, 2023
f7c6628
Fixes for etstool runners.
corranwebster Mar 20, 2023
b20a2b4
More messing with workflows.
corranwebster Mar 20, 2023
8b49a68
Fixes for workflows
corranwebster Mar 20, 2023
c884bfa
Fixes for video editor tests when Metal API not available.
corranwebster Mar 20, 2023
d6726bb
Go back to explicit cd.
corranwebster Mar 20, 2023
6779019
Test for metal APIs explicitly.
corranwebster Mar 20, 2023
53779b0
One more try at fixing worflows
corranwebster Mar 20, 2023
b991548
Prefer imports from pyface.ui.qt instead of pyface.ui.qt4
corranwebster Mar 20, 2023
2f15efe
Fix Wx font tests
corranwebster Mar 20, 2023
5bd2dfe
Drive-by cleanup of the Qt CodeEditor
corranwebster Mar 20, 2023
2f262d3
Merge branch 'main' into enh/remove-setup
corranwebster Mar 20, 2023
d373ecc
Fix signature of the wx FileEditor.show_file_dialog
corranwebster Mar 20, 2023
f70e2d3
Fixes to font string representation.
corranwebster Mar 20, 2023
94261ea
Remove WxPython from basic test set.
corranwebster Mar 21, 2023
cb9b0de
Add bleedign edge tests as PR tests because can't seem to run indepen…
corranwebster Mar 21, 2023
8d69a7a
Fix Pyface8 imports; two-stage creation of Pyface Widgets
corranwebster Mar 21, 2023
4ed62ea
Witch out conditions for running workflows; try to get full qt test r…
corranwebster Mar 21, 2023
dc1fad5
Turn off PR runs for full workflow.
corranwebster Mar 21, 2023
bc3ef5f
Merge branch 'main' into enh/remove-setup
corranwebster Mar 21, 2023
08b9e52
Update settings; break out Wx checks into separate workflow
corranwebster Mar 24, 2023
ca69e89
Accidentally added traitsui to wrong isort group - thought I was in p…
corranwebster Mar 24, 2023
3101dbd
run bleeding-edge tests to see if tests are fixed on main Pyface
corranwebster Mar 24, 2023
7649f90
Don't use process events, but properly invoke the event loop and stop…
corranwebster Mar 24, 2023
55d0181
Revert bleeding edge to not run on PRs.
corranwebster Mar 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
30 changes: 0 additions & 30 deletions .github/actions/apt-get-qt-deps/action.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Install Qt dependencies on Ubuntu
# Install Qt dependencies

This action calls `apt-get` to install packages required for running Qt on Ubuntu.

Expand All @@ -19,11 +19,9 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
toolkit: ['pyqt5']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Install Qt dependencies for Linux
uses: ./.github/actions/apt-get-qt-deps
if: startsWith(matrix.os, 'ubuntu')
- uses: actions/checkout@v3
- name: Install Qt dependencies
uses: ./.github/actions/install-qt-support
```
29 changes: 29 additions & 0 deletions .github/actions/install-qt-support/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: install-qt-support
description: 'Install supporting OS packages for Qt-using code'
runs:
using: composite
steps:
- name: Install Linux packages for Qt
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install qtbase5-dev
sudo apt-get install qtchooser
sudo apt-get install qt5-qmake
sudo apt-get install qtbase5-dev-tools
sudo apt-get install libegl1
sudo apt-get install libxkbcommon-x11-0
sudo apt-get install libxcb-icccm4
sudo apt-get install libxcb-image0
sudo apt-get install libxcb-keysyms1
sudo apt-get install libxcb-randr0
sudo apt-get install libxcb-render-util0
sudo apt-get install libxcb-xinerama0
sudo apt-get install libxcb-shape0
sudo apt-get install pulseaudio
sudo apt-get install libpulse-mainloop-glib0
# Needed to work around https://bugreports.qt.io/browse/PYSIDE-1547
sudo apt-get install libopengl0
# Needed for Qt6 video playback
sudo apt-get install libgstreamer-gl1.0-0
shell: bash
46 changes: 46 additions & 0 deletions .github/workflows/basic-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Run test suite for Qt and wxPython

on: [pull_request, workflow_dispatch]

env:
PYTHONUNBUFFERED: 1

jobs:
tests-qt:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.8', '3.11']
qt-api: ['pyqt5', 'pyside2', 'pyside6']
exclude:
- python-version: '3.11'
qt-api: 'pyside2'
fail-fast: false

env:
ETS_TOOLKIT: qt

runs-on: ${{ matrix.os }}
timeout-minutes: 20 # should be plenty, it's usually < 5

steps:
- name: Check out the target commit
uses: actions/checkout@v3
- name: Install Qt dependencies
uses: ./.github/actions/install-qt-support
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies and local packages
run: |
python -m pip install ".[${{ matrix.qt-api }},editors,examples,test]"
- name: Create clean test directory
run: |
mkdir testdir
- name: Run the test suite (Linux)
run: cd testdir && xvfb-run -a python -X faulthandler -m unittest discover -v traitsui
if: matrix.os == 'ubuntu-latest'
- name: Run the test suite (Windows/macOS)
run: cd testdir && python -X faulthandler -m unittest discover -v traitsui
if: matrix.os != 'ubuntu-latest'
79 changes: 79 additions & 0 deletions .github/workflows/bleeding-edge-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Run test suite for Qt on bleeding-edge dependencies weekly

on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
schedule:
- cron: '0 0 * * 4'

env:
PYTHONUNBUFFERED: 1

jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.11']
qt-api: ['pyside6']
fail-fast: false

env:
ETS_TOOLKIT: qt

runs-on: ${{ matrix.os }}
timeout-minutes: 20 # should be plenty, it's usually < 5

steps:
- name: Check out the target commit
uses: actions/checkout@v3
- name: Install Qt dependencies
uses: ./.github/actions/install-qt-support
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies and local packages
run: |
python -m pip install ".[${{ matrix.qt-api }},editors,examples,test]"
- name: Install source dependencies
run: |
python -m pip install --force-reinstall git+http://github.com/enthought/pyface.git#egg=pyface
python -m pip install --force-reinstall git+http://github.com/enthought/traits.git#egg=traits
- name: Create clean test directory
run: |
mkdir testdir
- name: Run the test suite (Linux)
run: cd testdir && xvfb-run -a python -X faulthandler -m unittest discover -v traitsui
if: matrix.os == 'ubuntu-latest'
- name: Run the test suite (Windows/macOS)
run: cd testdir && python -X faulthandler -m unittest discover -v traitsui
if: matrix.os != 'ubuntu-latest'

notify-on-failure:
needs: test
if: failure()
runs-on: ubuntu-latest
steps:
- name: Notify Slack channel on failure
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel_id: ${{ secrets.ETS_SLACK_CHANNEL_ID }}
status: FAILED
color: danger
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_ACTION_SECRET }}

notify-on-success:
needs: test
if: success()
runs-on: ubuntu-latest
steps:
- name: Notify Slack channel on success
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel_id: ${{ secrets.ETS_BOTS_SLACK_CHANNEL_ID }}
status: SUCCESS
color: good
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_ACTION_SECRET }}
74 changes: 0 additions & 74 deletions .github/workflows/bleeding-edge.yml

This file was deleted.

78 changes: 78 additions & 0 deletions .github/workflows/full-qt-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Run test suite for Qt across all supported versions and OS weekly

on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
schedule:
- cron: '0 0 * * 4'

env:
PYTHONUNBUFFERED: 1

jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
qt-api: ['pyqt5', 'pyside2', 'pyside6']
exclude:
- python-version: '3.11'
qt-api: 'pyside2'
fail-fast: false

env:
ETS_TOOLKIT: qt

runs-on: ${{ matrix.os }}
timeout-minutes: 20 # should be plenty, it's usually < 5

steps:
- name: Check out the target commit
uses: actions/checkout@v3
- name: Install Qt dependencies
uses: ./.github/actions/install-qt-support
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies and local packages
run: |
python -m pip install ".[${{ matrix.qt-api }},editors,examples,test]"
- name: Create clean test directory
run: |
mkdir testdir
- name: Run the test suite (Linux)
run: cd testdir && xvfb-run -a python -X faulthandler -m unittest discover -v traitsui
if: matrix.os == 'ubuntu-latest'
- name: Run the test suite (Windows/macOS)
run: cd testdir && python -X faulthandler -m unittest discover -v traitsui
if: matrix.os != 'ubuntu-latest'

notify-on-failure:
needs: test
if: failure()
runs-on: ubuntu-latest
steps:
- name: Notify Slack channel on failure
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel_id: ${{ secrets.ETS_SLACK_CHANNEL_ID }}
status: FAILED
color: danger
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_ACTION_SECRET }}

notify-on-success:
needs: test
if: success()
runs-on: ubuntu-latest
steps:
- name: Notify Slack channel on success
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel_id: ${{ secrets.ETS_BOTS_SLACK_CHANNEL_ID }}
status: SUCCESS
color: good
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_ACTION_SECRET }}
Loading