8000 Update build process with `cibuildwheel` by TheGupta2012 · Pull Request #88 · qBraid/pyqasm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Update build process with cibuildwheel #88

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

Merged
merged 24 commits into from
Nov 28, 2024
Merged

Update build process with cibuildwheel #88

merged 24 commits into from
Nov 28, 2024

Conversation

TheGupta2012
Copy link
Member
@TheGupta2012 TheGupta2012 commented Nov 25, 2024

Summary of changes

This PR helps set up a template for any future integrations with Cython in our build pipelines. Have added platform and arch specific builds for each supported OS. Wheels are now built with cibuildwheel tool.

Reference for yaml structure and scripts : Scikit Learn GitHub repo

CI/CD Workflow Updates:

  • .github/workflows/main.yml: Added support for multiple OS and Python versions, and introduced a new build_sdist job for source distribution. Added a code-coverage job to handle test coverage outside of Docker containers.
  • .github/workflows/release.yml: Added a build_wheels job similar to the main workflow, along with a build_sdist job. Updated the pypi-publish job to depend on these new jobs and download their artifacts.

Test Suite Improvements:

  • tests/cli/test_cli_commands.py: Introduced a normalize_output function to standardize test output by stripping whitespace and replacing multiple spaces with a single space. Updated existing tests to use this function. [1] [2] [3] [4]
  • tests/qasm3/test_entrypoint.py: Consolidated resource paths by defining QASM_RESOURCES_DIR and updating file paths accordingly.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

Copy link
Member
@ryanhill1 ryanhill1 left a comment

Choose a reason for hiding this comment

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

Why is it required we move to minimum Python 3.11? From what I found cibuildwheel supports Python 3.10: https://cibuildwheel.pypa.io/en/stable/

Right now qBraid-SDK supports Python 3.9, so incorporating PyQASM as a core dependency we're already having to bump SDK to minimum Python 3.10. This is ok because Python 3.9 EOL is October 31, 2025, which isn't too far away, so justifiable. But Python 3.10 EOL isn't until October 31, 2026. So I think we should definitely still provide support for Python 3.10.

Think about not just the qBraid-SDK, but other Python packages in the open-source ecosystem as well. If any of those packages want to use PyQASM as a dependency, they'll also have to bump their minimum Python requirement to match ours. Which could be a deal breaker for many.

@TheGupta2012
Copy link
Member Author

Why is it required we move to minimum Python 3.11? From what I found cibuildwheel supports Python 3.10: https://cibuildwheel.pypa.io/en/stable/

Right now qBraid-SDK supports Python 3.9, so incorporating PyQASM as a core dependency we're already having to bump SDK to minimum Python 3.10. This is ok because Python 3.9 EOL is October 31, 2025, which isn't too far away, so justifiable. But Python 3.10 EOL isn't until October 31, 2026. So I think we should definitely still provide support for Python 3.10.

Think about not just the qBraid-SDK, but other Python packages in the open-source ecosystem as well. If any of those packages want to use PyQASM as a dependency, they'll also have to bump their minimum Python requirement to match ours. Which could be a deal breaker for many.

Thanks pointing this out @ryanhill1 . I was wrongly thinking that the cibuildwheel version which we use will only support "builds" for Python 3.11 and greater. But, turns out, this python version is needed only for "running" cibuildwheel command and unrelated to the supported Python package versions.

The project specific wheels can still be built for any lower version supported by cibuildwheel (as you mentioned in the comment)

@TheGupta2012
Copy link
Member Author

@ryanhill1 I think all changes are done, thanks a ton for the review!

@TheGupta2012 TheGupta2012 merged commit 9b0c198 into main Nov 28, 2024
20 checks passed
@TheGupta2012 TheGupta2012 deleted the test-ci-builds branch December 3, 2024 12:00
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.

3 participants
0