Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
2351fdc
feat: migrate pyalps bindings to nanobind
skilledwolf Jul 22, 2026
5e4401f
build: retire legacy Python CMake paths
skilledwolf Jul 22, 2026
8b1fb3a
build: relocate pyalps project metadata
skilledwolf Jul 22, 2026
94b6208
build: retain macos 26 wheel coverage
skilledwolf Jul 22, 2026
440bff8
fix: modernize pyalps Python compatibility
skilledwolf Jul 22, 2026
687253f
fix: resolve wheel ALPS_DIR via $(pwd) in cibuildwheel env
skilledwolf Jul 22, 2026
6a4104b
fix: build pyalps musllinux wheels via libtirpc XDR
skilledwolf Jul 22, 2026
07e93d7
fix: restore pyalea mcanalyze bindings
skilledwolf Aug 18, 2026
c1a4a26
fix: bundle ALPS xml library in pyalps packages
skilledwolf Aug 18, 2026
cabdd87
test: cover restored mcanalyze surface and packaged xml
skilledwolf Aug 18, 2026
72b1c5b
fix: restore params parameter-file constructor
skilledwolf Aug 18, 2026
f8eb934
build: drive the wheel SDK build through a CMake preset
skilledwolf Aug 18, 2026
60d040d
build: move static cibuildwheel config into pyproject
skilledwolf Aug 18, 2026
bb72c65
ci: smoke test packaged artifacts before upload
skilledwolf Aug 18, 2026
2d3a480
ci: bump actions/cache to v6
skilledwolf Aug 18, 2026
31e623d
fix(pyalps): address nanobind-migration audit findings
skilledwolf Aug 18, 2026
b344bb2
test(pyalps): make the Python suite assert instead of print
skilledwolf Aug 18, 2026
d428723
refactor: drop the legacy Boost.Python binding tree
skilledwolf Aug 18, 2026
0a46a3d
docs(pyalps): record the free-threading and stable-ABI policy
skilledwolf Aug 18, 2026
c065b9b
fix(pyalps): apply pre-push audit findings
skilledwolf Aug 18, 2026
76504b9
fix(pyalps): address post-audit HDF5 regressions
skilledwolf Aug 19, 2026
c217c6f
fix(pyalps): complete nanobind compatibility migration
skilledwolf Aug 19, 2026
89079f9
test(pyalps): surface downstream exporter failures
skilledwolf Aug 19, 2026
e140800
fix(pyalps): share wheel runtime with downstream modules
skilledwolf Aug 19, 2026
3da11b8
chore(cmake): add license header to PyALPS helper
skilledwolf Aug 19, 2026
f97a496
docs(pyalps): remove standalone migration guide
skilledwolf Aug 19, 2026
2b42608
fix(pyalps): resolve relocated Linux libraries
skilledwolf Aug 19, 2026
cc92ee2
fix(pyalps): resolve transitive wheel libraries
skilledwolf Aug 19, 2026
439f85c
fix(pyalps): preserve downstream mcbase identity
skilledwolf Aug 19, 2026
eb0e14c
fix(pyalps): close remaining audit gaps
skilledwolf Aug 19, 2026
eb91780
fix(pyalps): restore Python signal handlers after CT-QMC
skilledwolf Aug 19, 2026
e9930d0
fix(pyalps): complete packaging and compatibility follow-ups
skilledwolf Aug 21, 2026
9c35382
fix(pyalps): close the archive save gap and revive the dead tests
skilledwolf Aug 21, 2026
d027608
fix(pyalps): keep the archive-savable marker honest downstream
skilledwolf Aug 21, 2026
400490b
perf(pyalps): hand NumPy the buffer C++ already owns
skilledwolf Aug 21, 2026
d2dd006
refactor(pyalps): drop the unreachable extension-import fallback
skilledwolf Aug 21, 2026
0ef02d7
build(pyalps): inherit the version from the repository
skilledwolf Aug 21, 2026
5bfa631
Merge master into nanobind migration and preserve release validation
skilledwolf Sep 18, 2026
5bf130b
Fix nanobind mapping lifetimes and replacement semantics
skilledwolf Sep 18, 2026
08ad15d
Test the requested Boost version in the compiler matrix
skilledwolf Sep 18, 2026
c2621b0
Preserve Python input conversions and validate vector construction
skilledwolf Sep 18, 2026
05f9fa4
Include utility before Boost Math 1.76 headers
skilledwolf Sep 18, 2026
5a2bf11
Support arbitrary-size MPI object receives
skilledwolf Sep 19, 2026
c1fb274
Preserve HDF5 value types and archive contexts
skilledwolf Sep 19, 2026
14e6315
Preserve mutable Python parameters across native calls and checkpoints
skilledwolf Sep 19, 2026
3e6df56
Restore safe result checkpoint loading and value operations
skilledwolf Sep 19, 2026
3b451b2
Preserve heterogeneous parameter conversion for native consumers
skilledwolf Sep 19, 2026
005b165
Resolve vector scalar arithmetic explicitly for older GCC
skilledwolf Sep 19, 2026
cb9cc3e
Preserve parameter list text and native checkpoint conversions
skilledwolf Sep 19, 2026
1d9d915
Fix rectangular HDF5 compatibility and preserve validation evidence
skilledwolf Sep 21, 2026
d590614
Preserve exact integers when stacking mixed HDF5 rows
skilledwolf Sep 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,25 @@ jobs:
CXX: ${{ matrix.plat.cxx_compiler }}-${{ matrix.plat.c_version }}
run: |
cmake -S $GITHUB_WORKSPACE -B build \
-DBoost_ROOT_DIR=`pwd`/boost_1_${{ matrix.plat.boost_version }}_0 \
-DBoost_SRC_DIR="$GITHUB_WORKSPACE/boost_1_${{ matrix.plat.boost_version }}_0" \
-DCMAKE_INSTALL_PREFIX="$GITHUB_WORKSPACE/build/install" \
-DCMAKE_CXX_STANDARD=${{ matrix.plat.cxx_standard || '17' }} \
-DCMAKE_CXX_FLAGS="-fpermissive -DBOOST_NO_AUTO_PTR -DBOOST_FILESYSTEM_NO_CXX20_ATOMIC_REF -DBOOST_TIMER_ENABLE_DEPRECATED"
cmake --build build -j 2
cmake --build build -j 2 -t test

# Compile the public exporter as a downstream project, rather than only
# checking that its compatibility header is present in the install.
- name: Smoke test downstream nanobind simulation extension
if: matrix.plat.os == 'ubuntu-24.04' && matrix.plat.c_compiler == 'gcc' && matrix.plat.c_version == 14 && matrix.plat.py_version == '3.14' && matrix.plat.boost_version == 91 && matrix.plat.cxx_standard == null
run: |
python -m pip install "nanobind>=2.10,<3"
cmake --install build
cmake -S tutorials/ngs/5_export_python -B downstream-export-build \
-DALPS_DIR="$PWD/build/install/share/alps" \
-DPython_EXECUTABLE="$(command -v python)"
cmake --build downstream-export-build -j 2

macos-build:
name: >-
ALPS / ${{ matrix.plat.os }} / ${{ matrix.plat.c_compiler }} /
Expand Down Expand Up @@ -170,7 +183,7 @@ jobs:
cmake -S $GITHUB_WORKSPACE -B build \
-DCMAKE_C_COMPILER=${{ matrix.plat.c_compiler }} \
-DCMAKE_CXX_COMPILER=${{ matrix.plat.cxx_compiler }} \
-DBoost_ROOT_DIR=`pwd`/boost_1_${{ matrix.plat.boost_version }}_0 \
-DBoost_SRC_DIR="$GITHUB_WORKSPACE/boost_1_${{ matrix.plat.boost_version }}_0" \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_CXX_FLAGS="${{ matrix.plat.cxx_stdlib }} -fpermissive -DBOOST_NO_AUTO_PTR -DBOOST_FILESYSTEM_NO_CXX20_ATOMIC_REF -DBOOST_TIMER_ENABLE_DEPRECATED" \
-DPython_ROOT_DIR=`$(brew --prefix)/bin/python${{ matrix.plat.py_version }} -c "import sys, os; print(os.path.dirname(os.path.dirname(str(sys.executable))));"` \
Expand Down
141 changes: 111 additions & 30 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- uses: actions/setup-python@v6
with:
python-version: '3.13'
- run: python -m pip install packaging pytest
- run: python -m pip install packaging pytest "scikit-build-core>=1.0"
- name: Test release validation
run: python -m pytest test/packaging -q
- name: Check package, SDK, and tag versions
Expand All @@ -36,42 +36,29 @@ jobs:
strategy:
matrix:
plat:
- { os: ubuntu-latest, target: "", arch: x86_64, homebrew: ''}
- { os: macos-15, target: "15.0" , arch: arm64, homebrew: '/opt/homebrew'}
- { os: macos-26, target: "26.0" , arch: arm64, homebrew: '/opt/homebrew'}
- { os: ubuntu-latest, target: "", arch: x86_64 }
- { os: macos-15, target: "15.0" , arch: arm64 }

steps:
- uses: actions/checkout@v7

# Install Fortran compiler based on OS
- name: Install dependencies
timeout-minutes: 20
run: |
if [ "${{ matrix.plat.os }}" = "ubuntu-latest" ]; then
printf 'Acquire::Retries "3";\nAcquire::http::Timeout "30";\nAcquire::https::Timeout "30";\n' \
| sudo tee /etc/apt/apt.conf.d/99ci-timeouts > /dev/null
sudo apt-get update
sudo apt-get install -y gfortran
else
brew update
brew install gfortran
fi
- name: Restore compiler cache
uses: actions/cache@v6
with:
path: _build/ccache
key: pyalps-ccache-${{ runner.os }}-${{ matrix.plat.arch }}-${{ hashFiles('src/**', 'bindings/python/**', 'applications/**', 'tool/maxent*') }}
restore-keys: pyalps-ccache-${{ runner.os }}-${{ matrix.plat.arch }}-

- name: Build wheels
uses: pypa/cibuildwheel@v4.2.0
with:
package-dir: bindings/python/pyalps
env:
CIBW_BUILD: cp39-* cp310-* cp311-* cp312-* cp313-* cp314-*
# The wheel build is configured in [tool.cibuildwheel] in
# bindings/python/pyalps/pyproject.toml and the wheel-deps preset in
# CMakePresets.json; only matrix-derived values live here.
CIBW_ARCHS: ${{ matrix.plat.arch }}
CIBW_ARCHS_MACOS: ${{ matrix.plat.arch }}

# Set Fortran compiler for all platforms
CIBW_ENVIRONMENT: "FC=gfortran"

# macOS-specific settings
CIBW_ENVIRONMENT_MACOS: >
Boost_ROOT_DIR=/Users/runner/work/ALPS/ALPS/boost_1_87_0
MACOSX_DEPLOYMENT_TARGET=${{ matrix.plat.target }}
CXXFLAGS="-stdlib=libc++"
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.plat.target }}

- uses: actions/upload-artifact@v7
with:
Expand All @@ -87,16 +74,110 @@ jobs:
- uses: actions/checkout@v7

- name: Build sdist
run: pipx run build --sdist
run: pipx run build --sdist --outdir dist bindings/python/pyalps

# The sdist must remain buildable outside the repository checkout:
# verify its metadata and that the vendored ALPS sources it needs
# (applications, tools, XML library) actually made it in.
- name: Smoke check sdist
run: |
pipx run twine check dist/*.tar.gz
tar -tzf dist/*.tar.gz > sdist-manifest.txt
for path in _vendor/lib/xml/ALPS.xsl _vendor/tool/maxent.cpp \
_vendor/applications/dmft/qmc \
LICENSE.txt src/pyalps/__init__.py; do
grep -q "$path" sdist-manifest.txt || { echo "missing $path in sdist"; exit 1; }
done

- uses: actions/upload-artifact@v7
with:
name: cibw-sdist
path: dist/*.tar.gz


# cibuildwheel already runs test/pyalps against every wheel inside the build
# environment; this job checks the artifacts as they would reach PyPI: the
# repaired, uploaded-and-downloaded wheel installed with pip on a clean
# runner, at the oldest and newest supported Python.
smoke_test:
name: Smoke test wheels on ${{ matrix.plat.os }} / py${{ matrix.python }}
needs: [build_wheels]
runs-on: ${{ matrix.plat.os }}
strategy:
fail-fast: false
matrix:
plat:
- { os: ubuntu-latest, artifact_os: ubuntu-latest }
- { os: macos-15, artifact_os: macos-15 }
# The macOS 15 deployment target is forward-compatible; test that
# wheel on the newest runner rather than publishing a second copy.
- { os: macos-26, artifact_os: macos-15 }
python: ["3.10", "3.14"]
steps:
- uses: actions/checkout@v7

- uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python }}

- uses: actions/download-artifact@v8
with:
pattern: cibw-wheels-${{ matrix.plat.artifact_os }}-*
path: wheelhouse
merge-multiple: true

- name: Install wheel from artifacts
run: |
pipx run twine check wheelhouse/*.whl
python -m pip install numpy scipy pytest
python -m pip install --no-index --find-links wheelhouse pyalps

- name: Import and run binding surface tests
run: |
python script/validate_pyalps.py --output _build/validation --wheelhouse wheelhouse

- name: Retain installed-wheel validation evidence
if: always()
uses: actions/upload-artifact@v7
with:
name: pyalps-validation-${{ matrix.plat.os }}-py${{ matrix.python }}
path: _build/validation

# The ordinary wheel tests deliberately keep mpi4py optional. This job
# installs one consistent Open MPI stack and verifies real inter-rank
# collectives, requests and point-to-point traffic through pyalps.mpi.
mpi_smoke:
name: Smoke test MPI adapter with two ranks
needs: [build_wheels]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7

- uses: actions/setup-python@v7
with:
python-version: "3.14"

- uses: actions/download-artifact@v8
with:
pattern: cibw-wheels-ubuntu-latest-*
path: wheelhouse
merge-multiple: true

- name: Install wheel and MPI runtime
timeout-minutes: 20
run: |
printf 'Acquire::Retries "3";\nAcquire::http::Timeout "30";\nAcquire::https::Timeout "30";\n' \
| sudo tee /etc/apt/apt.conf.d/99ci-timeouts > /dev/null
sudo apt-get update
sudo apt-get install -y libopenmpi-dev openmpi-bin
python -m pip install numpy scipy pytest mpi4py
python -m pip install --no-index --find-links wheelhouse pyalps

- name: Run two-rank compatibility surface
run: mpiexec -n 2 python -m pytest -q test/pyalps/test_binding_surface.py::test_mpi4py_compatibility_surface test/pyalps/test_mpi_requests.py

upload_pypi:
needs: [build_wheels, build_sdist]
needs: [build_wheels, build_sdist, smoke_test, mpi_smoke]
runs-on: ubuntu-latest
environment: pypi
permissions:
Expand Down
Loading
Loading