-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TraitsUI on Python 3.11 and PySide 6.4 (#1994)
Currently seems to work with Pyface 7.x This PR does the following: - removes setup.py and moves to a pyproject.toml system (includes deprecating `traitsui.__version__`) - updates for Python 3.11 - updates for PySide 6.4 - updates for Pyface 8.0 - lots of messing around with the CI infrastructure - in particular adds a full set of tests on all supported platforms, Python versions and toolkit backends - adds some bleeding-edge tests - some drive-by fixes (eg. copy-paste issues with some Wx tests using Qt APIs) Currently skipping tests failures on Wx due to failures: see #1998 **Checklist** - [ ] Add a news fragment if this PR is news-worthy for end users. (see docs/releases/README.rst)
- Loading branch information
1 parent
c08f891
commit 2e224d6
Showing
43 changed files
with
524 additions
and
753 deletions.
There are no files selected for viewing
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
Oops, something went wrong.