-
-
Notifications
You must be signed in to change notification settings - Fork 349
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
mods to enable python3.12 #1604
Conversation
Thanks, @mefuller! Too bad that Python 3.12 isn't available on the regular channels yet; it is definitely true that Python 3.12 needs to be covered by CI if we enable this. There is one option I see (if we truly want to live on the bleeding edge), which is to use a fedora-runner:
name: Fedora rawhide test
runs-on: ubuntu-latest
container:
image: fedora:rawhide
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
dnf -y install <all the cantera dependencies>
... Other than adding this to PPS: see #1608, which implements the idea for Ubuntu containers |
3.12 release candidates are usually available from the |
I agree that this would be better in the |
I have a container-based CI run |
@bryanwweber ... it's unfortunately not available yet, which is why I suggested the Fedora runner. This btw also relates to Cantera/enhancements#37. PS: just found one of your posts mentioning deadsnakes, which would be an alternative. |
@ischoegl is there any additional information you'd need from me on running the build in Fedora? I'm happy to help For reference, the RPM spec file (which generates the packaged binaries) is found at https://src.fedoraproject.org/rpms/cantera/blob/rawhide/f/cantera.spec That file has a complete list of packages required for building and the exact arguments passed to |
@ischoegl The docs definitely mention allowing pre-release versions: https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md (all the way at the bottom, sorry I'm on my phone so I can't directly link). This should be orthogonal to adding container-based actions, though |
If a PR is open for a branch, the merged commit (I believe this means "as though the PR branch was merged into the base branch") is available in the base repository without needing to specify the fork. I'd have to look up how to get that commit, though... 😕 |
Yes, it is orthogonal. @mefuller actually used the
@mefuller ... I believe easiest path forward for this PR is to add the option to the setup-python action above; once 3.12 is covered by CI, the PR itself is ready to merge. I still believe it would make sense to add a |
I don't think we should be testing any pre-release software as part of the Given the release schedule for Python 3.12 (planned for October 2), that either means moving this job to the other workflow, or waiting until then to merge this PR. In either case, I'm 👍 on adding a Rawhide container build to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @mefuller for the PR! While the changes themselves are thankfully modest, the main sticking point are tests that are currently failing.
While I am only speaking for myself, I'd like to see the newly added Python 3.12 support covered by some CI. As was pointed out, there are convincing arguments against testing pre-release versions of Python in main
GH actions.
This leaves tests of Python 3.12 in a rawhide container in the post-merge-tests
phase. As a workable template already exists in #1608, it would be great if a similar container-based CI test could be included here (it probably makes sense to wait until the other PR is reviewed/merged to avoid merge conflicts).
.github/workflows/main.yml
Outdated
@@ -65,7 +65,7 @@ jobs: | |||
timeout-minutes: 60 | |||
strategy: | |||
matrix: | |||
python-version: ['3.8', '3.10', '3.11'] | |||
python-version: ['3.8', '3.10', '3.11', '3.12'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per @speth's comment, please remove '3.12'
, unless you want to wait for a couple of months.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not duplicate this job into post-merge
with only 3.12? Then we could avoid changing Python version and OS in the same job, to better isolate build failures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤷♂️ ... either way. I believe @speth's point was that many dependencies will have to be compiled. The rawhide container should provide for those dependencies already. As both rawhide and 3.12 are pre-release, having post-merge-tests
fail is just a heads-up, where most failures are probably due to upstream issues and should wash out over time. Personally, I'm voting for the container, as it's testing Python (and everything else!) in the wild. It's probably the more informative test for the Fedora community. The fact that the current Fedora rawhide
failure is due to Python is imho just coincidental.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could add both in the post-merge tests. I'm not even sure which would be more likely to succeed. The logs in #1602 seem to indicate that the only reason that this doesn't work on Python 3.12 in that case is because Cantera is explicitly ignoring it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I was trying to suggest having both. Apologies that wasn't clear.
where most failures are probably due to upstream issues and should wash out over time.
I actually doubt this would be the case, I would be willing to bet there's a good amount of signal in those failures. I think the main point to have this in post-merge (which I agree with) is to avoid blocking a PR over failures in pre-release software.
@mefuller ... now that #1608 is merged, could you rebase? Running tests in a Fedora container, - As an aside, I had a look over the dependencies; you may want to consider the new/optional PS: I created a runner here: 81c1058 although I have not tested whether it works. Feel free to cherry-pick! |
@ischoegl I made the requested/suggested changes with the exception of HDF5 |
Thanks, @mefuller! This is almost there. I'd just have a few more requests:
This will allow us to review the output of the run on the Regarding HDF5, it presumably will compile on fedora? Testing this is a question that is likely separate from packaging decisions, but I'll leave this up to you. Fwiw, the HighFive package we're using is header only, so it is no longer needed once things are compiled. |
Thanks, @mefuller 🎉 … tests look great! While Python 3.12 adds some syntax warnings for raw strings in SConstruct, this is not preventing compilation from failing and may go beyond this PR. I’ll approve from my side once the last commit is dropped. |
@ischoegl test commit dropped |
@mefuller ... thanks again. Regarding hdf5, it looks like fedora actually packages |
@ischoegl exactly - I'm on it |
Changes proposed in this pull request
Closes #1602
Checklist
scons build
&scons test
) and unit tests address code coverage