Skip to content

Use uv in cd workflow#589

Open
davidt0x wants to merge 5 commits into
masterfrom
test-cd-uv
Open

Use uv in cd workflow#589
davidt0x wants to merge 5 commits into
masterfrom
test-cd-uv

Conversation

@davidt0x

@davidt0x davidt0x commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Update the CD workflow to match the uv-based CI setup.

Changes:

  • Install uv with astral-sh/setup-uv@v7 in the sdist, wheel, and conda jobs.
  • Build the sdist with uv build --sdist instead of pipx run build.
  • Run cibuildwheel through uvx cibuildwheel instead of installing it with pip.
  • Resolve the package version with uvx --from setuptools-scm python -m setuptools_scm.
  • Drop Python 3.9 from the conda build matrix because pyproject.toml now requires Python >=3.10.
  • GitHub has deprecated the macos-13 runner image and the jobs are now sitting queued. Replace the Intel macOS entries in the wheel and conda CD matrices with macos-15-intel while keeping macos-14/macos-latest for Apple Silicon coverage

davidt0x added 4 commits June 3, 2026 16:05
Add the MPICH library directory to the cibuildwheel Linux test environment so mpi4py can load libmpi during wheel tests.

Declare tf-keras in the conda runtime requirements because TensorFlow Probability matnormal tests import the tf_keras shim under conda.

Validation: git diff --check; uvx cibuildwheel --print-build-identifiers.
Replay any per-rank pytest report logs that were written before mpiexec times out, so CI exposes the underlying rank-level failure instead of only the wrapper timeout.

Also handle TimeoutExpired stdout/stderr consistently with subprocess.run(text=True), avoiding the misleading Windows decode AttributeError.

Verification: python3 -m py_compile tests/pytest_mpiexec_plugin.py; git diff --check; uvx flake8 --config tests/.flake8 tests/pytest_mpiexec_plugin.py
NumPy 2.4 rejects assigning a length-one array into a scalar element. The HTFA width posterior update indexed Kx1 arrays and assigned the resulting shape-(1,) value into global_posterior_, which caused the cp311 cibuildwheel test to fail in test_htfa.py::test_can_run.

Convert the width prior and variance entries to scalars before computing and assigning the posterior width updates.

Verification: python3 -m py_compile src/brainiak/factoranalysis/htfa.py tests/pytest_mpiexec_plugin.py; git diff --check; uvx flake8 --config .flake8 src/brainiak/factoranalysis/htfa.py; uvx flake8 --config tests/.flake8 tests/pytest_mpiexec_plugin.py; uvx --from numpy python scalar assignment check
GitHub has deprecated the macos-13 runner image and the jobs are now sitting queued. Replace the Intel macOS entries in the wheel and conda CD matrices with macos-15-intel while keeping macos-14/macos-latest for Apple Silicon coverage.

Checked the rest of .github/workflows and no other macos-13 labels remain.

Verification: rg -n 'macos-13|macos-15-intel|macos-latest|macos-14' .github/workflows; git diff --check; python3 workflow scan for macos-13
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.

2 participants