Skip to content

Conversation

@yangxk1
Copy link
Contributor

@yangxk1 yangxk1 commented Dec 25, 2025

Reason for this PR

#804

What changes are included in this PR?

This PR provides an initial solution for automatically building Python wheels and publishing them to PyPI. The current build targets macOS and Linux.

Trigger conditions:

  1. When triggered by a PR, the workflow builds the packages but does not upload them to PyPI.
  2. On every commit pushed to main, the workflow uploads to TestPyPI only (it does not upload to PyPI).
  3. For an official release, the workflow can be triggered manually and will upload to PyPI.

Versioning:

  1. The version is updated automatically via .github/scripts/update_version.py.
  2. Only the TestPyPI version is updated to avoid version conflicts.
  3. For releases to PyPI, the version depends solely on the setting in python/pyproject.toml.

Possible improvements:

  1. A more appropriate versioning strategy.
  2. More suitable triggering cadence—for example, switching to daily/weekly runs when PR volume increases.
  3. Add support for Windows x86_64.

Are these changes tested?

yes

Are there any user-facing changes?

Yes, we can use pip install graphar from now on.

@codecov-commenter
Copy link

codecov-commenter commented Dec 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.19%. Comparing base (cf728bf) to head (7e6a79d).

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #813      +/-   ##
============================================
+ Coverage     77.10%   77.19%   +0.08%     
  Complexity      607      607              
============================================
  Files            84       85       +1     
  Lines          8912     8854      -58     
  Branches       1045     1043       -2     
============================================
- Hits           6872     6835      -37     
+ Misses         1800     1779      -21     
  Partials        240      240              
Flag Coverage Δ
cpp 71.52% <ø> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements automated Python wheel building and publishing infrastructure for GraphAr, enabling users to install the package via pip install graphar. The implementation targets macOS (arm64) and Linux (x86_64, aarch64) platforms with conditional publishing to TestPyPI (automatic on main branch commits) and PyPI (manual workflow dispatch).

Key changes:

  • Added GitHub Actions workflow for building wheels using cibuildwheel across multiple platforms
  • Implemented automatic version management for TestPyPI releases while preserving manual control for PyPI releases
  • Enhanced CMake build system to support bundled C++ sources for isolated Python wheel builds, with macOS-specific rpath handling for dependency resolution

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 15 comments.

Show a summary per file
File Description
.github/workflows/python-wheel-workflow.yml Workflow orchestrating sdist/wheel builds for multiple platforms with conditional PyPI/TestPyPI publishing
.github/scripts/update_version.py Script to automatically increment version numbers based on latest published releases
python/pyproject.toml Updated package metadata, dependencies, and sdist configuration to support wheel distribution
python/CMakeLists.txt Added support for bundled C++ sources and enhanced macOS rpath configuration for wheel builds
cpp/CMakeLists.txt Added MSVC compatibility for future Windows support and improved cross-platform build handling
python/README.md Added PyPI installation instructions
python/src/cli/README.md Added PyPI installation instructions for CLI tool

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor Author

@yangxk1 yangxk1 left a comment

Choose a reason for hiding this comment

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

Solved copilot comment

Copy link
Contributor

@lixueclaire lixueclaire left a comment

Choose a reason for hiding this comment

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

LGTM

@yangxk1 yangxk1 merged commit 31bab21 into apache:main Dec 25, 2025
12 checks passed
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