From 39abb68570fc9e3fb626748b9172fe99e66be15d Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 1 Jun 2026 17:10:41 +0000 Subject: [PATCH 1/2] Add PyPI release workflow (Trusted Publishing); README leads with pip install Add .github/workflows/release.yml: on a published GitHub Release, run the test/lint/type-check suite, then in a dependent job build the package, smoke-test the wheel, and publish to PyPI via Trusted Publishing (OIDC). Only the publish job gets id-token: write and it runs in the `pypi` environment; there is no API token or stored secret. Publishes with `uv publish --trusted-publishing always` so a misconfigured OIDC fails loudly. Update the README Installation section to lead with `pip install framesmith`, keeping install-from-source as the fallback, and drop the "not yet on PyPI" phrasing. No src/, test, or pyproject.toml changes. https://claude.ai/code/session_01ApzgkWterEmziuPryenVny --- .github/workflows/release.yml | 45 +++++++++++++++++++++++++++++++++++ README.md | 6 ++++- 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..cd6bbc0 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,45 @@ +name: Release + +on: + release: + types: [published] + +jobs: + test: + name: Test, lint, type-check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install uv + uses: astral-sh/setup-uv@v5 + - name: Install dependencies + run: uv sync --group dev + - name: Run tests (including doctests) + run: uv run pytest + - name: Lint + run: uv run ruff check src/ tests/ + - name: Type-check + run: uv run mypy src/ + + publish: + name: Build and publish to PyPI + needs: test + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/project/framesmith/ + permissions: + id-token: write # required for PyPI Trusted Publishing (OIDC); no token needed + steps: + - uses: actions/checkout@v4 + - name: Install uv + uses: astral-sh/setup-uv@v5 + - name: Build sdist and wheel + run: uv build + - name: Smoke-test the built wheel + run: | + python3 -m venv /tmp/smoke + /tmp/smoke/bin/pip install --quiet dist/*.whl + /tmp/smoke/bin/python -c "import framesmith; assert hasattr(framesmith, 'compose_column'); print('wheel imports OK')" + - name: Publish to PyPI (Trusted Publishing) + run: uv publish --trusted-publishing always diff --git a/README.md b/README.md index 200728f..0101981 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,11 @@ df_snake = raw.with_columns( ## Installation -`framesmith` is not yet on PyPI — install from source: +```bash +pip install framesmith +``` + +Or install from source: ```bash git clone https://github.com/andrewjordan3/framesmith.git From dbd87f98051adf52c0a9732c3c526b87dc245925 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 1 Jun 2026 17:28:03 +0000 Subject: [PATCH 2/2] Add push/PR CI workflow and CI status badge MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add .github/workflows/ci.yml: runs on push to main and PRs targeting main, with a lint job (ruff + mypy) and a test job matrixed over Python 3.12 and 3.13 running pytest (including doctests). Both interpreters were verified to pass the suite locally (878 tests each) before committing the matrix. Top-level permissions are contents: read — no id-token, no secrets (publishing stays in release.yml). A concurrency group cancels in-flight runs on the same ref, and setup-uv caches downloads. Add a CI status badge to the README badge row; no other README change. No src/, test, release.yml, or pyproject.toml changes. https://claude.ai/code/session_01ApzgkWterEmziuPryenVny --- .github/workflows/ci.yml | 47 ++++++++++++++++++++++++++++++++++++++++ README.md | 1 + 2 files changed, 48 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..4088f5d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,47 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + lint: + name: Lint and type-check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install uv + uses: astral-sh/setup-uv@v5 + with: + enable-cache: true + - name: Install dependencies + run: uv sync --group dev + - name: Lint + run: uv run ruff check src/ tests/ + - name: Type-check + run: uv run mypy src/ + + test: + name: Test (Python ${{ matrix.python-version }}) + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ['3.12', '3.13'] + steps: + - uses: actions/checkout@v4 + - name: Install uv + uses: astral-sh/setup-uv@v5 + with: + enable-cache: true + - name: Run tests (including doctests) + run: uv run --python ${{ matrix.python-version }} --group dev pytest diff --git a/README.md b/README.md index 0101981..a4db3f0 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # framesmith +[![CI](https://github.com/andrewjordan3/framesmith/actions/workflows/ci.yml/badge.svg)](https://github.com/andrewjordan3/framesmith/actions/workflows/ci.yml) [![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Python](https://img.shields.io/badge/python-3.12%2B-blue.svg)](https://www.python.org/downloads/) [![Polars](https://img.shields.io/badge/polars-1.0%2B-CD792C.svg)](https://pola.rs)