release: v0.20.0

This commit is contained in:
github-actions[bot]
2026-08-25 18:49:00 +02:00
parent e4c400cd79
commit 93ad928510
22 changed files with 3080 additions and 456 deletions
+90 -4
View File
@@ -1,18 +1,36 @@
name: CI
# Verifies the published package layout on every push and PR: this repository
# ships the Python package, its docs and assets, and nothing else. Anything
# outside the expected set of file types is flagged so stray artefacts do not
# make it into a release.
# This file is DEPLOYED to the public mirror (manifoldbt/manifoldbt) by the
# release sync; it is authored here so the two cannot drift. It is not the
# engine's own CI (that is .github/workflows/ci.yml, which builds the Rust
# workspace and never leaves this repository).
#
# What it does, and why it is worth having:
#
# verify — the package-layout guard that was already here. Kept as-is.
# tests — installs the published wheel from PyPI and runs the mirrored test
# suite against it, on every supported Python version.
#
# The second job is the point. The suite shipped in this repository for months
# without anything running it, so "there are tests" was a claim a reader had to
# take on trust, and two of them could not have run at all if anyone had tried.
# Now every push executes them against exactly what `pip install manifoldbt`
# gives a user.
on:
push:
paths-ignore:
- "benchmarks/vs_vectorbt/results/**"
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
jobs:
verify:
name: Verify package layout
@@ -42,3 +60,71 @@ jobs:
exit 1
fi
echo "OK: package layout verified."
tests:
name: tests (Python ${{ matrix.python }})
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
# Every version this package claims to support in its classifiers. The
# wheels are cp39-abi3, so all five install the same binary; what the
# matrix actually exercises is the pure-Python layer on each interpreter,
# which is where a 3.9-incompatible line would land.
python: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
# The tests in this repository belong to the version in pyproject.toml, not
# to whatever is newest on PyPI. Installing unpinned would, right after a
# release, run new tests against the previous wheel and fail on features
# that simply are not in it yet.
- name: Resolve the version under test
id: version
run: |
set -e
VERSION="$(grep -m1 '^version = ' pyproject.toml | sed 's/.*"\(.*\)".*/\1/')"
if [ -z "$VERSION" ]; then
echo "::error::could not read version from pyproject.toml"; exit 1
fi
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "testing manifoldbt==$VERSION"
# A freshly published version takes a moment to become installable: the
# upload succeeds before the index serves it. Without this wait, the run
# immediately after a release fails on a package that does exist.
- name: Wait for PyPI to serve it
run: |
set -e
VERSION="${{ steps.version.outputs.version }}"
for attempt in $(seq 1 30); do
if curl -sf "https://pypi.org/pypi/manifoldbt/${VERSION}/json" > /dev/null; then
echo "manifoldbt ${VERSION} is being served"
exit 0
fi
echo "attempt ${attempt}: not on the index yet, waiting 20s"
sleep 20
done
echo "::error::manifoldbt ${VERSION} never appeared on PyPI"
exit 1
- name: Install the published wheel
run: |
set -e
python -m pip install --upgrade pip
python -m pip install "manifoldbt[dev]==${{ steps.version.outputs.version }}"
python -c "import manifoldbt as bt; print('installed', bt.__version__)"
# No licence is configured here, on purpose: this is the experience of
# someone who has just run `pip install manifoldbt`. Tests that need a
# paid feature skip themselves through their own markers, and the summary
# below prints what skipped so a reader can see the coverage honestly
# rather than reading a green tick and assuming everything ran.
- name: Run the mirrored test suite
run: python -m pytest python/tests -q -rs