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

MAINT: add 3.11 test #861

Closed
wants to merge 18 commits into from
Closed

MAINT: add 3.11 test #861

wants to merge 18 commits into from

Conversation

homosapien-lcy
Copy link
Contributor

@homosapien-lcy homosapien-lcy commented Mar 16, 2023

With new python tests, we also want to test and make sure all examples can work in 3.11. Since 3.11 is not available in EDM, pypi is tested. closes #860

@homosapien-lcy homosapien-lcy changed the title MAINT: add 3.11 test [WIP] MAINT: add 3.11 test Mar 16, 2023
@homosapien-lcy homosapien-lcy changed the title [WIP] MAINT: add 3.11 test MAINT: add 3.11 test Mar 17, 2023
@homosapien-lcy
Copy link
Contributor Author

homosapien-lcy commented Mar 17, 2023

An error happened when running on python 3.6 which is similar to what happened in SciMath (enthought/scimath#170)

Problem description:
If python 3.6 is added to the pypi test, it will generate a "The version '3.6' with architecture 'x64' was not found for Ubuntu 22.04." error.

Reproduction steps:
Add 3.6 to .github/workflows/test-with-pypi.yml.

Expected behavior:
Pass the github workflows test.

OS: Ubuntu 22.04

Python version: 3.6

The tests with other python versions are past though

matrix:
os: ['ubuntu-latest']
toolkit: ['pyside6']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mdickinson any preference on which versions to test? Do really want all or should we use 3.8 and 3.11 only?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'd keep all of them here; this is only testing on Ubuntu with a single toolkit, so we don't have a combinatorial explosion of jobs in the matrix.

We definitely want the extremes (3.7 and 3.11), along with the versions that we care about for EDM (so 3.8). At that point, we could drop 3.9 and 3.10, but I think we should have at least one workflow that exercises the test suite on 3.9 and 3.10, and this one doesn't look like a bad target for that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropping 3.7 from the workflow would be reasonable if we're also dropping 3.7 support for Chaco in general. If that's what we want to do then that seems fine to me - 3.7 EOL is June this year.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dpinte Ah, sorry; I did miss that there was a second job below that also goes through all combinations. As a compromise, I'd suggest testing on all 5 versions on Ubuntu, but limiting ourselves to 3.8 and 3.11 on Windows and macOS.

matrix:
os: ['macos-latest', 'windows-latest']
toolkit: ['pyside6']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest dropping down to just 3.8 and 3.11 for this job.


jobs:

# Test against PyPI packages
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the rationale for splitting this into two separate jobs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean why separate into ubuntu and others? I think the installation command is different (sudo apt-get install), also we might want to test with different python versions on different platforms.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's what I meant. There are trade-offs here; on one hand, having two separate jobs that do the same thing is a bit of a violation of DRY. On the other hand, it may make sense if there are sufficient differences. I leave it to you.

For the apt-get instructions, it's easy to make that step conditional so that it only runs on Ubuntu systems.

@homosapien-lcy
Copy link
Contributor Author

homosapien-lcy commented Mar 24, 2023

testing procedure:
1 env setup:
python3.11 -m venv --clear ~/.venvs/p311 && source ~/.venvs/p311/bin/activate
2 clone
git clone git@github.com:enthought/chaco.git
3 install dependencies
brew install portaudio (for mac)
pip install configobj
pip install pygments
pip install pyaudio
pip install traitsui
pip install pyparsing
pip install pyside6
pip install scikit-learn
4 install package
python3.11 -m pip install -e .

chaco/examples/demo/:
depth: NotImplementedError: the 'null' toolkit does not implement this method
domain_limits: NotImplementedError: the 'null' toolkit does not implement this method
financial_plot_dates: NotImplementedError: the 'null' toolkit does not implement this method
aspect_ratio: NotImplementedError: the 'null' toolkit does not implement this method
multiaxis: NotImplementedError: the 'null' toolkit does not implement this method
multiaxis_using_Plot: NotImplementedError: the 'null' toolkit does not implement this method
logo: SUCCESS
financial_plot: NotImplementedError: the 'null' toolkit does not implement this method
multi_line_plot: NotImplementedError: the 'null' toolkit does not implement this method
noninteractive: SUCCESS (image generated)
world_map: urllib.error.HTTPError: HTTP Error 404: Not Found

chaco/examples/tutorials/:
tutor: ModuleNotFoundError: No module named 'configobj'
tutorial1: SUCCESS (image generated)
tutorial2: NotImplementedError: the 'null' toolkit does not implement this method
tutorial2_ipython: NotImplementedError: the 'null' toolkit does not implement this method
tutorial3: NotImplementedError: the 'null' toolkit does not implement this method
tutorial4: NotImplementedError: the 'null' toolkit does not implement this method
tutorial5: NotImplementedError: the 'null' toolkit does not implement this method
tutorial6: NotImplementedError: the 'null' toolkit does not implement this method
tutorial7: NotImplementedError: the 'null' toolkit does not implement this method
tutorial8: NotImplementedError: the 'null' toolkit does not implement this method
tutorial9: NotImplementedError: the 'null' toolkit does not implement this method
tutorial9b: NotImplementedError: the 'null' toolkit does not implement this method
tutorial10: NotImplementedError: the 'null' toolkit does not implement this method
tutorial10b: NotImplementedError: the 'null' toolkit does not implement this method
tutorial11: NotImplementedError: the 'null' toolkit does not implement this method

chaco/examples/user_guide/:
h_plot_container_add_multiple_times: NotImplementedError: the 'null' toolkit does not implement this method
grid_plot_container: NotImplementedError: the 'null' toolkit does not implement this method
h_plot_container: NotImplementedError: the 'null' toolkit does not implement this method
power_function_example: NotImplementedError: the 'null' toolkit does not implement this method
h_plot_container_colorbar: NotImplementedError: the 'null' toolkit does not implement this method
overlay_container_inset: NotImplementedError: the 'null' toolkit does not implement this method

@homosapien-lcy
Copy link
Contributor Author

@corranwebster
Copy link
Contributor

python3.11 -m pip install -e .

You probably should be doing python3.11 -m pip install -e ".[examples]" or something similar to bring in pandas and scipy example dependencies.

@homosapien-lcy
Copy link
Contributor Author

python3.11 -m pip install -e .

You probably should be doing python3.11 -m pip install -e ".[examples]" or something similar to bring in pandas and scipy example dependencies.

Hi Corran: thanks for the advice. Could you give an example of what should be in the ".[examples]"? This repositery for instance

@homosapien-lcy
Copy link
Contributor Author

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the release of PySide 6.5, this will need this as well:

          sudo apt-get install libxcb-cursor0

@corranwebster
Copy link
Contributor

Closing in favour of #891

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Verify all examples work with Python 3.11
4 participants