Skip to content

Conversation

@djelovina
Copy link
Collaborator

@djelovina djelovina commented Oct 27, 2025

The last force push closed and made PR 358 deactivated, therefore I am creating the new one.

Done so far

  • Migrate and harden the pyalp Python packaging so wheels are built from the top-level CMake project and packaged by the pyalp subpackage (pybind11 pinned as a submodule). Work focused on making cibuildwheel-based multi-platform wheel builds reliable.
  • Fix macOS-specific build problems (header search pollution, AppleClang template warning, libomp deployment target, PIC/LTO issues).
  • Add a CI-friendly “portable build” option to avoid over-optimizing wheels (-march, -flto, etc.) and ensure wheels are usable on other machines.
  • Add a generated, CMake-configured runtime metadata module for the Python package (algorithm vs build metadata).
  • Clean up leftover / intermediate scripts and top-level Python packaging artifacts that conflict with the new flow.
  • Rework CI workflows around cibuildwheel: macOS native support, libomp handling, removal of Windows builds in CI for now (and other tuning).
  • Several history operations: squashes/rebases, amended commits, tag deletions and force-pushes (some remote operations closed a PR and required restoration).

Summary of included commits:
3591d1d Denis Jelovina 2025-10-24 Squash: Combined changes from 9f634c7..HEAD — merge all temp commit
9f634c7 Denis Jelovina 2025-10-22 chore(pyalp): remove vendored pybind11 and unused CMake; add cibuildwheel workflow and config
0f9840c Denis Jelovina 2025-10-22 pyalp packaging and CI: bundle prebuilt bindings, setup pinned pybind11, and add wheel smoke-test
1e4cd6e Denis Jelovina 2025-10-22 Remove deprecated Python bindings and related files
a7c9900 Denis Jelovina 2025-10-22 Convert pybind11 to submodule pinned at 8d503e30be400ad431d3d140707803e87e75fad7
3b9e5b5 Petros Anastasiadis 2025-09-30 Removed numpy2alp older stuff - left .cpp ffr
1403a2a Petros Anastasiadis 2025-09-30 Added installation instructions for python part
95d51a8 Denis Jelovina 2025-06-02 Add doccumentation for test.py
58aae6a Denis Jelovina 2025-05-26 compile messages
6ba4c3e Denis Jelovina 2025-05-26 add submodule
03a00d4 Denis Jelovina 2025-05-26 disable pyalp by defualt
a471cdd Denis Jelovina 2025-05-26 add pybind11 submodule
8a4ade9 Denis Jelovina 2025-05-26 refactor code add support for multiple types
68dea3d Denis Jelovina 2025-05-23 add conjugate gradient
427594b Denis Jelovina 2025-05-23 add numpy to c++ examples
Diffstat:
 .github/workflows/pyalp-ci.yml                | 169 +++++++++++++++++++++++++
 .github/workflows/pyalp-publish.yml           | 175 ++++++++++++++++++++++++++
 .gitignore                                    |   3 +-
 .gitmodules                                   |   3 +
 CMakeLists.txt                                |  22 +++-
 cmake/CompileFlags.cmake                      |  20 ++-
 pyalp/CMakeLists.txt                          |   1 +
 pyalp/PINNED_PYBIND11                         |   1 +
 pyalp/extern/pybind11                         |   1 +
 pyalp/pyproject.toml                          |  30 +++++
 pyalp/setup.py                                | 114 +++++++++++++++++
 pyalp/src/CMakeLists.txt                      | 111 ++++++++++++++++
 pyalp/src/conjugate_gradient.hpp              | 109 ++++++++++++++++
 pyalp/src/matrix_wrappers.hpp                 | 115 +++++++++++++++++
 pyalp/src/numpy2alp.cpp                       |  57 +++++++++
 pyalp/src/pyalp.cpp                           |  84 +++++++++++++
 pyalp/src/pyalp.egg-info/PKG-INFO             |  65 ++++++++++
 pyalp/src/pyalp.egg-info/SOURCES.txt          |  12 ++
 pyalp/src/pyalp.egg-info/dependency_links.txt |   1 +
 pyalp/src/pyalp.egg-info/requires.txt         |   1 +
 pyalp/src/pyalp.egg-info/top_level.txt        |   1 +
 pyalp/src/pyalp/CMakeLists.txt                |  16 +++
 pyalp/src/pyalp/__init__.py                   |  41 ++++++
 pyalp/src/pyalp/bindings.cpp                  |  56 +++++++++
 pyalp/src/pyalp/your_module.py                |   4 +
 pyalp/src/python2alp.cpp                      |   9 ++
 pyalp/src/utils.hpp                           |  20 +++
 pyalp/src/vector_wrappers.hpp                 |  65 ++++++++++
 pyproject.toml                                |   4 +
 setup.py                                      |  10 ++
 tests/CMakeLists.txt                          |   4 +
 tests/python/CMakeLists.txt                   |  23 ++++
 tests/python/numpy_array_print.py             |   5 +
 tests/python/test.py                          |  65 ++++++++++
 tools/make_wheel_from_so.py                   | 109 ++++++++++++++++
 tools/smoke_test_pyalp.py                     |  66 ++++++++++
 36 files changed, 1589 insertions(+), 3 deletions(-)
@djelovina djelovina changed the title Squash: combined commits 9c8ebec..3591d1d0 358 python api Oct 27, 2025
- Bump version in pyproject.toml to 0.8.4
- Add Git metadata and README content handling in CMake for improved package metadata
Denis Jelovina added 14 commits October 28, 2025 10:01
…ate __init__.py to expose them for user access
…retry logic; bump version to 0.8.17 in pyproject.toml
Denis Jelovina added 4 commits October 29, 2025 11:38
…e name and version, and bump version to 0.8.24 in pyproject.toml
Denis Jelovina added 7 commits October 29, 2025 16:20
… in pyproject.toml; deprecate legacy workflow pyalp-publish.yml in favor of publish-to-testpypi.yml
…e installation; add numpy dependency in pyproject.toml
…ypi workflow to skip publish if no wheel assets are found
…ypi workflow to skip download if no release assets are found
…ypi workflow to handle missing release metadata
@djelovina
Copy link
Collaborator Author

Update

  • Build wheels from top-level CMake; package via pyalp (pybind11 submodule).
  • Use cibuildwheel for reproducible multi-ABI builds and add a portable-build mode (no -march/-flto).
  • Fix macOS-specific problems (header search pollution, template warning, libomp deployment target, PIC/LTO).
  • Generate runtime metadata from CMake (build & algorithm metadata available at runtime).
  • Clean up old packaging scripts/artifacts and add CI scripts for verification (TestPyPI publish + promote).
  • Rework CI matrix & workflow steps (macOS/libomp handling, omit Windows for now, diagnostics).
  • History hygiene: squashes/rebases, tag cleanup and force-pushes used to restore/shape the release flow.

@anyzelman
Copy link
Member

anyzelman commented Nov 2, 2025

Isn't a more "natural" name ALPy or Alpy (rather than PyALP)?

@djelovina
Copy link
Collaborator Author

Isn't a more "natural" name ALPy or Alpy (rather than PyALP)?

I don't find any well established naming convention, ie. there is PyTorch but also NumPy . Therefore I can still change the Python module name, I don't have any strong preference. What is hard to change is the PyPI project name, since most of the short names like pyalp and alpy are already taken, therefore, I would stick to the current alp-graphblas project name, and for the module name we can change it or have several aliases.

…le commit

Consolidated pybind11 bindings and removed legacy duplicate source files; added a single shared binding implementation under pyalp.
Packaging moved to top-level CMake with deterministic prebuilt discovery in setup.py and support for CMAKE_BUILD_DIR so wheels are built from the CMake artifacts (avoids needing pybind11 in isolated PEP517 build environment).
Enabled module-local pybind11 registrations by default to allow importing multiple backend extension modules into the same interpreter safely; made it configurable via CMake option for cases that need cross-module sharing.
Fixed an iterator instantiation issue in matrix_wrappers.hpp by iterating directly over M.cbegin()/M.cend().
Added an in-process smoke test test_bckds_inprocess.py to validate multiple-backend imports and object creation, and updated CI to install test wheels from TestPyPI with robust retry-and-verify logic.
Updated developer docs and CI workflows to reflect the new packaging, testing, and build flows.
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