Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
f58c94d
Squash: combined commits 9c8ebec..3591d1d0
Oct 24, 2025
cda713a
Merge branch '358-python-api-metadata'
Oct 27, 2025
966689e
Merge branch '358-python-api-metadata2'
Oct 27, 2025
159e818
bump version to 0.8.3 in pyproject.toml
Oct 27, 2025
d33cc7a
Update version to 0.8.4 and enhance metadata gathering in CMake
Oct 27, 2025
6f88c39
Update version to 0.8.5, add ALP version handling in CMake, and enhan…
Oct 27, 2025
040ee57
Enhance setup.py to support multiple prebuilt backend modules and upd…
Oct 28, 2025
7ed4574
Enable OMP and nonblocking backends conditionally for Linux runners i…
Oct 28, 2025
9ca4457
Add py::module_local() to Matrix and Vector class bindings for improv…
Oct 28, 2025
598843e
Enhance backend discovery and selection in __init__.py; add smoke tes…
Oct 28, 2025
b6ea295
Bump version to 0.8.12 in pyproject.toml; update backend import error…
Oct 28, 2025
2e23718
Add scripts for inspecting installed pyalp package and running backen…
Oct 28, 2025
4f76026
Update pyalp version to 0.8.14 and include numpy in dependencies for …
Oct 28, 2025
fd8789e
Add wait_for_testpypi_release.sh script and update pyalp version to 0…
Oct 28, 2025
e1cc599
Make wait_for_testpypi_release.sh executable
Oct 28, 2025
13ce446
Update wait_for_testpypi_release.sh to improve response handling and …
Oct 28, 2025
d2f2899
Add promote-to-pypi workflow and update pyalp version to 0.8.18; enha…
Oct 29, 2025
472ecc6
Update promote-to-pypi workflow permissions and bump pyalp version to…
Oct 29, 2025
f1e0da5
Update publish-to-pypi job permissions and bump version to 0.8.20 in …
Oct 29, 2025
8b5a525
Bump version to 0.8.21 in pyproject.toml and disable publish-to-pypi …
Oct 29, 2025
020a00e
Update promote-to-pypi workflow to accept tags from push events and b…
Oct 29, 2025
b55113e
Update download release assets step in promote-to-pypi workflow and b…
Oct 29, 2025
cd04f5c
Update promote-to-pypi workflow to include diagnostic step for packag…
Oct 29, 2025
a69c327
Update package version to 0.8.25 in pyproject.toml and adjust diagnos…
Oct 29, 2025
32e1ec1
Rename package from pyalp to alp-graphblas and bump version to 0.8.26…
Oct 29, 2025
e68deae
Remove deprecated pyalp-publish workflow and update README for packag…
Oct 29, 2025
4dbc570
Bump package version to 0.8.28 in pyproject.toml
Oct 29, 2025
eb45f6b
Bump package version to 0.8.29 in pyproject.toml; update promote-to-p…
Oct 29, 2025
de02f0d
Bump package version to 0.8.30 in pyproject.toml; update promote-to-p…
Oct 29, 2025
a926e4b
Bump package version to 0.8.31 in pyproject.toml; update promote-to-p…
Oct 29, 2025
74cfd52
Remove compatibility shim module `pyalp_ref` as it is no longer needed.
Oct 30, 2025
ccba46d
Remove wait_for_testpypi_release script and simplify TestPyPI propaga…
Oct 30, 2025
518b440
pyalp: squash all local changes since github/358-python-api into sing…
Nov 4, 2025
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
23 changes: 23 additions & 0 deletions .github/scripts/inspect_installed_pyalp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env python3
"""Print basic information about the installed `pyalp` package.

This script is intended to be invoked from CI after installing the package
from TestPyPI. It prints the package file, available binary modules, and
the runtime build metadata exposed by the package.
"""
import pkgutil
import sys

try:
import pyalp
except Exception:
print('ERROR: failed to import pyalp', file=sys.stderr)
raise

print('pyalp package:', getattr(pyalp, '__file__', None))
print('available modules in package:', [m.name for m in pkgutil.iter_modules(pyalp.__path__)])
try:
print('build metadata:', pyalp.get_build_metadata())
except Exception as e:
print('metadata error:', e)
print('listed backends via helper:', pyalp.list_backends())
36 changes: 36 additions & 0 deletions .github/scripts/run_backend_smoke_installed.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/usr/bin/env python3
"""Run the repo's backend smoke runner against an installed pyalp package.

This script is intended to be invoked from CI after installing pyalp from
TestPyPI. It accepts a single argument (backend name) and will skip if that
backend is not present in the installed package.
"""
import sys
import subprocess

try:
import pyalp
except Exception:
print('ERROR: failed to import pyalp', file=sys.stderr)
raise


def main(argv):
if len(argv) < 2:
print('Usage: run_backend_smoke_installed.py <backend_name>', file=sys.stderr)
return 2
backend = argv[1]
backends = pyalp.list_backends()
print('discovered backends:', backends)
if backend not in backends:
print(f'backend {backend} not present in installed package, skipping')
return 0

rc = subprocess.call([sys.executable, 'tests/python/backend_smoke_runner.py', backend])
if rc != 0:
print(f'backend {backend} smoke runner failed with exit {rc}', file=sys.stderr)
return rc


if __name__ == '__main__':
sys.exit(main(sys.argv))
73 changes: 73 additions & 0 deletions .github/workflows/promote-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Promote release to PyPI

on:
workflow_dispatch:
inputs:
tag:
description: 'Git tag / release to promote (e.g. pyalp.v0.8.14)'
required: true
push:
tags:
- 'pyalp.v*'

# Request OIDC id-token permissions at workflow level so actions can use
# the GitHub Actions OIDC provider. The pypa publish action requires this
# for trusted publisher flow when using repository-provided credentials.
permissions:
id-token: write
contents: read

jobs:
promote:
runs-on: ubuntu-latest
# Require approval from the `production` environment before the job can
# access environment-scoped secrets (e.g. the PyPI API token). Create the
# environment in the repository settings and add the secret `PYPI_API_TOKEN`.
environment: production
# Also explicitly request id-token at the job level to be extra clear.
permissions:
id-token: write
contents: read
steps:
- name: Checkout (for local scripts)
uses: actions/checkout@v4

- name: Download release assets (via GitHub API)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
TAG: ${{ github.event.inputs.tag || github.ref_name }}
run: |
set -euo pipefail
echo "Downloading release assets for ${REPO} tag ${TAG}"
mkdir -p release_assets
# Fetch release metadata for the tag
release_json=$(curl -sSf -H "Authorization: Bearer ${GITHUB_TOKEN}" "https://api.github.com/repos/${REPO}/releases/tags/${TAG}")
if [ -z "${release_json}" ]; then
echo "No release metadata found for tag ${TAG}" >&2
exit 1
fi

# Iterate assets and download each one using the assets API (requires Accept header)
echo "$release_json" | jq -r '.assets[] | [.id, .name] | @tsv' | while IFS=$'\t' read -r id name; do
echo "Downloading asset: ${name} (id ${id})"
curl -sSfL -H "Authorization: Bearer ${GITHUB_TOKEN}" -H "Accept: application/octet-stream" "https://api.github.com/repos/${REPO}/releases/assets/${id}" -o "release_assets/${name}"
done
echo "Downloaded files:" && ls -la release_assets || true

- name: List downloaded assets
run: |
echo "Assets in release_assets:"
ls -la release_assets || true

- name: Show package name and version (diagnostic)
run: |
python -c "import importlib,importlib.util,sys,pathlib; spec=importlib.util.find_spec('tomllib') or importlib.util.find_spec('tomli'); name=spec.name if spec else sys.exit(print('No TOML parser available (tomllib/tomli), skipping')); toml=importlib.import_module(name); p=pathlib.Path('pyalp/pyproject.toml'); (sys.exit(print('pyalp/pyproject.toml not found at', p)) if not p.exists() else None); data=toml.loads(p.read_text()); proj=data.get('project',{}); print('project.name =', proj.get('name')); print('project.version =', proj.get('version'))"

- name: Publish to PyPI (alp-graphblas)
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: release_assets/
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
Loading
Loading