Skip to content

"plan/py314 phase-5: CI matrix (3.10-3.14) + modernize publish#215

Merged
kyocum merged 6 commits into
masterfrom
plan/py314/phase-5
Jun 25, 2026
Merged

"plan/py314 phase-5: CI matrix (3.10-3.14) + modernize publish#215
kyocum merged 6 commits into
masterfrom
plan/py314/phase-5

Conversation

@kyocum

@kyocum kyocum commented Jun 23, 2026

Copy link
Copy Markdown
Owner

Final phase of design_docs/plans/py-3.10-3.14-migration.plan.md

Ken Yocum and others added 2 commits June 23, 2026 15:47
Add .github/workflows/test.yml: uv-based matrix running the suite on Python
3.10-3.14 on push to master and on PRs (free on public repo, no secrets).
Sets MP_CONTEXT_TYPE=fork and dummy AWS creds for moto.

Modernize python-publish.yml: build with 'uv build' instead of the removed
'python setup.py sdist', drop the dead dockerizer two-pass (the referenced
disdat/infrastructure/dockerizer path no longer exists), upload via 'uvx
twine', and bump actions/checkout + setup to current majors (setup-uv).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6dd97d1304

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/python-publish.yml Outdated
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: '3.x'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use a concrete Python version for publish builds

For release/manual publish runs, astral-sh/setup-uv@v5 treats python-version as the value for UV_PYTHON rather than as the actions/setup-python alias syntax (see its action metadata: https://raw.githubusercontent.com/astral-sh/setup-uv/v5/action.yml). With this set to 3.x, the following uv build resolves Python as an executable named 3.x and fails before producing dist/*; remove this input or use an exact supported version such as 3.13.

Useful? React with 👍 / 👎.

Comment thread .github/workflows/test.yml Outdated
python-version: ${{ matrix.python-version }}

- name: Install project and dev dependencies
run: uv pip install --system -e ".[dev]"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Run tests through the uv-managed matrix interpreter

In this matrix workflow, setup-uv sets UV_PYTHON, but this --system install plus the later bare python -m pytest does not guarantee that dependencies are installed into, and tests are executed by, the same matrix interpreter; uv's GitHub Actions guidance installs with uv sync and runs commands with uv run for the selected Python (https://docs.astral.sh/uv/guides/integration/github/). On rows where ${{ matrix.python-version }} differs from the runner default, CI can either fail with missing packages or silently test the default Python instead of 3.10/3.11/3.13/3.14.

Useful? React with 👍 / 👎.

uv pip install --system fails on setup-uv's externally-managed interpreter
(PEP 668: 'The interpreter ... is externally managed'). Create a uv venv and
install/run there instead, matching CONTRIBUTING.md and local usage.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kyocum

kyocum commented Jun 24, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c745bf4eca

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/python-publish.yml Outdated
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: '3.x'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use a concrete Python version for publish

On release/manual publish runs, setup-uv@v5 treats python-version as the value for UV_PYTHON (and creates/activates that environment), and uv build --help shows the build interpreter comes from --python ... [env: UV_PYTHON]. The value 3.x is setup-python-style syntax rather than a valid uv interpreter request (uv python find 3.x looks for an executable named 3.x and fails), so the publish workflow will fail before uploading; omit this input or use a concrete version like 3.14.

Useful? React with 👍 / 👎.

Ken Yocum and others added 3 commits June 24, 2026 14:24
…dex review)

test.yml: setup-uv@v5 with python-version already creates+activates .venv, so
a bare 'uv venv' failed with "already exists". Use 'uv venv --clear' so the
matrix interpreter venv is (re)created deterministically; tests run via
.venv/bin/python, pinned to the matrix version.

python-publish.yml: setup-uv maps python-version to UV_PYTHON, so '3.x' made
'uv build' look for an interpreter literally named 3.x and fail (Codex P1).
Use a concrete '3.13'.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The suite assumed a pre-existing ~/.config/disdat (created once via 'dsdt
init'); it passed locally only because developer homes already have it. On a
fresh CI runner the config is absent, so every test errored at setup with
"Did not find Disdat configuration".

Add a session-scoped autouse fixture (tests/conftest.py) that runs
DisdatConfig.init() when the config dir is absent. Guarded on existence because
init() exits the process if the dir already exists, so existing developer
configs are left untouched. Makes 'pytest tests' self-contained for CI and
fresh clones.

Verified: full suite passes with a fresh HOME (simulating CI); existing config
left unmodified.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Split the publish workflow into two event-gated jobs:
- publish-pypi (release): build from the release tag (clean version), twine
  check, upload to PyPI.
- testpypi-dry-run (workflow_dispatch): build a dev version, twine check,
  upload to TestPyPI with --skip-existing. Real PyPI is never touched on a
  manual run.

Manual dispatch previously would have tried to publish a dev build with a
setuptools_scm local segment (+gHASH) that PyPI rejects. The dry-run job
strips the local segment via SETUPTOOLS_SCM_OVERRIDES_FOR_DISDAT so the dev
build is valid for TestPyPI. Also add `twine check` to both paths.

Requires a TEST_PYPI_API_TOKEN repository secret for the dry-run upload.

Verified locally: release build -> clean 1.1.5, dispatch build -> 1.1.5.dev8;
twine check passes and both wheel+sdist install in a clean venv.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kyocum kyocum merged commit 92cfd00 into master Jun 25, 2026
7 checks passed
@kyocum kyocum deleted the plan/py314/phase-5 branch June 25, 2026 23:37
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.

1 participant