enthought / scimath

Other
68 stars 16 forks source link

Investigate compatibility with Python 3.11 #163

Closed mdickinson closed 1 year ago

mdickinson commented 1 year ago

We need to check whether scimath is compatible with Python 3.11:

If all looks good on Python 3.11, it would be great to have a GitHub Actions workflow that runs the scimath test suite under Python 3.11. If not, we need to open issues and fixes for whatever turns up.

homosapien-lcy commented 1 year ago

The test is added to PR #168. I only added python 3.11 for the pypi test since the 3.6 version will give "The version '3.6' with architecture 'x64' was not found for Ubuntu 22.04." error

mdickinson commented 1 year ago

@homosapien-lcy Thank you! Next steps are:

mdickinson commented 1 year ago
  • Extend the GitHub Actions workflow to test on Python 3.11 as well as Python 3.6 and Python 3.8.

Note: this will require some reworking of the workflow to use a version of Python provided by GitHub Actions (via the setup-python action) instead of from EDM. It might be cleanest to create a new workflow that runs the SciMath test suite outside of the context of EDM, and doesn't use EDM at all.

Some other ETS packages already have such a workflow: examples are apptools, envisage and traits.

homosapien-lcy commented 1 year ago

Sure, will look into it

homosapien-lcy commented 1 year ago

@mdickinson Is it something like this in test-with-edm.yml? (just 3.11 instead?) Screen Shot 2023-03-15 at 6.03.43 PM.png (image from envisage)

mdickinson commented 1 year ago

@homosapien-lcy Yes, something along those lines.

By the way, it's not good practice to post screenshots of code - it obstructs search, and can make it difficult to follow what's going on on some devices. In this case, you can link to the relevant code instead. (See the GitHub documentation for how to do that if you need to.)

mdickinson commented 1 year ago

@homosapien-lcy Actually, what we're looking for is something more like this: https://github.com/enthought/envisage/blob/main/.github/workflows/test-with-pypi.yml

Note that in this workflow, we're not using EDM at all: we're testing directly using the GitHub Actions-provided Python versions. It would be great if you could put something together along these lines.

mdickinson commented 1 year ago

@homosapien-lcy Just a reminder from above:

Please could you open an issue for the unexpected test output?

homosapien-lcy commented 1 year ago

The version '3.6' with architecture 'x64' was not found for Ubuntu 22.04."

Thanks, I just added it to issue #170. I also opened a PR #169 to demonstrate the error. Is this a good way to show the unexpected behavior?

mdickinson commented 1 year ago

@homosapien-lcy Thanks for opening #170. I think it's fine to not support Python 3.6 for the new workflow.

mdickinson commented 1 year ago

@homosapien-lcy Just a reminder from above:

Please could you open an issue for the unexpected test output?

I've opened #171 for this.

mdickinson commented 1 year ago

@homosapien-lcy The discussion gets a bit confusing when you make substantial edits to a previous comment, as with https://github.com/enthought/scimath/issues/163#issuecomment-1455445909. In the original comment, you mentioned some unexpected test output, but the edited comment removes all mention of that, which makes the subsequent discussion a bit hard to follow. If there's new information, I'd recommend making a new comment with that new information instead.

homosapien-lcy commented 1 year ago

Thanks for the advice Marks! In the future I will avoid too much editting... Also, I found there might be an easy fix for issue #171, I mentioned that in the issue, do you want to take a look?