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

COMP: Add support for Python 3.12 #510

Merged
merged 15 commits into from
Dec 21, 2023
Merged

COMP: Add support for Python 3.12 #510

merged 15 commits into from
Dec 21, 2023

Conversation

ravnoor
Copy link
Contributor

@ravnoor ravnoor commented Oct 11, 2023

All tests passing and building successfully:

  • wheels (linux_aarch64 and macos_arm64)
  • docker (linux_aarch64 and linux_amd64)

Wheels (and detailed logs) can be found here: https://cirrus-ci.com/build/5424545834729472

I haven't tested the amd64 wheels for Windows/Linux/MacOS due to concurrency limits on Cirrus CI, but GitHub Actions should fill in the gap.

@ravnoor
Copy link
Contributor Author

ravnoor commented Oct 11, 2023

@cookpa @stnava @ntustison I have left py37 in the GitHub CI workflow for now, but it probably should be removed since it's been EOL for 4 months now. Besides, cibuildwheel==2.16.2 requires py38 or higher

@ntustison
Copy link
Member

Awesome. Thanks for this. Currently away so I'll defer to @cookpa or @stnava for merging.

@cookpa
Copy link
Member

cookpa commented Dec 6, 2023

Hi, sorry for the delay in getting to this. I'm happy to remove Python 3.7

@ravnoor
Copy link
Contributor Author

ravnoor commented Dec 20, 2023

Hi, sorry for the delay in getting to this. I'm happy to remove Python 3.7

Done, and all checks passing

@cookpa
Copy link
Member

cookpa commented Dec 20, 2023

Thanks for doing this @ravnoor - I'm re-running the failed windows build now. It randomly fails sometimes and I have not been able to figure out why

@stnava
Copy link
Member

stnava commented Dec 20, 2023

apologies - but can you guys remind me what's needed for getting wheels on pypi ? I think last time I just downloaded them from GitHub then pushed them to pypi .... I am happy to add whoever to pypi "management" team if you have accounts there.

@cookpa
Copy link
Member

cookpa commented Dec 20, 2023

Oh yes I should look into PyPI. I got a bunch of errors about that last time I ran a release action. I think it authenticated but couldn't find the wheels, possibly a simple fix. I think it just needs to point to the individual wheel subdirs

Notice: Using a user-provided API token for authentication against https://upload.pypi.org/legacy/
Warning: Trusted Publishers allows publishing packages to PyPI from automated environments like GitHub Actions without needing to use username/password combinations or API tokens to authenticate with PyPI. Read more: https://docs.pypi.org/trusted-publishers
Warning:  It looks like there are no Python distribution packages to publish in the directory './wheelhouse/'. Please verify that they are in place should you face this problem.
Showing hash values of files to be uploaded:
Traceback (most recent call last):
/github/workspace/wheelhouse/cp37-manylinux_x86_64

  File "/app/print-hash.py", line 17, in <module>
    content = file_object.read_bytes()
              ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/pathlib.py", line 1050, in read_bytes
    with self.open(mode='rb') as f:
         ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/pathlib.py", line 1044, in open
    return io.open(self, mode, buffering, encoding, errors, newline)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
IsADirectoryError: [Errno 21] Is a directory: '/github/workspace/wheelhouse/cp37-manylinux_x86_64'

@stnava stnava merged commit 49a6bc0 into ANTsX:master Dec 21, 2023
15 checks passed
@ravnoor
Copy link
Contributor Author

ravnoor commented Dec 23, 2023

Thanks for doing this @ravnoor - I'm re-running the failed windows build now. It randomly fails sometimes and I have not been able to figure out why

I have seen GHA jobs randomly fail for no apparent reason. This failure seems like one of those. Tests all passed OK, so I counted it as a pass.

@ravnoor
Copy link
Contributor Author

ravnoor commented Dec 23, 2023

apologies - but can you guys remind me what's needed for getting wheels on pypi ? I think last time I just downloaded them from GitHub then pushed them to pypi .... I am happy to add whoever to pypi "management" team if you have accounts there.

@stnava @cookpa I can take a more in-depth look at this. I was able to get TestPyPI to work to the point where everything but the upload worked since I don't have access to the project on test.pypi.org. If you can generate an API token or delegate access, I can test it end-to-end, and then push the same changes for PyPI.

@stnava
Copy link
Member

stnava commented Dec 23, 2023

I invited @ravnoor as a manager on pypi

@ravnoor
Copy link
Contributor Author

ravnoor commented Dec 23, 2023

@ravnoor was already taken, unfortunately. I'm @RVNR on PyPI

@ravnoor
Copy link
Contributor Author

ravnoor commented Dec 23, 2023

Looks like I've the PyPI uploads figured out. I'll clean it up and make a new PR.

In past conversations, I recall discussing the limit for uploading packages to PyPI. What is it exactly? This may limit how many builds across platforms (linux,macosx,win) and architectures (x86_64,arm64) and python versions (py38-py312) we could upload.

To accommodate all, we would need 6700 MB [5 python versions x 1340] per version/release.

Based on the most recent build, here's a break down of the build sizes:

os_arch size (MB)
macosx_x86_64 310
macosx_arm64 194
manylinux_x86_64 330
manylinux_aarch64 329
win_amd64 177
TOTAL 1340 MB

Is there a consensus on what to include/exclude? @stnava @ntustison @cookpa

From the CI perspective, a simple regex can enforce the upload inclusions/exclusion.

@stnava
Copy link
Member

stnava commented Dec 23, 2023

these is the current information from pypi:

  • Current Project size: 5.7 GiB
  • Project upload limit: 400.0 MiB (request an increase)
  • Project total size limit: Default (10.0 GiB) (request an increase)

@stnava
Copy link
Member

stnava commented Dec 23, 2023

I think based on your numbers, we could request increases for pypi quotas for both total project size and upload limit.

@ravnoor
Copy link
Contributor Author

ravnoor commented Dec 24, 2023

Yes, an increase would make sense to future-proof against hitting any quota limits

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.

4 participants