Skip to content

[codex] Prepare Python SDK beta documentation and package metadata#24836

Merged
aibrahim-oai merged 4 commits into
mainfrom
dev/python-sdk-beta-docs
May 28, 2026
Merged

[codex] Prepare Python SDK beta documentation and package metadata#24836
aibrahim-oai merged 4 commits into
mainfrom
dev/python-sdk-beta-docs

Conversation

@aibrahim-oai
Copy link
Copy Markdown
Collaborator

@aibrahim-oai aibrahim-oai commented May 28, 2026

Why

The initial public openai-codex beta should read and install like a normal published Python package before a release tag is created. This follows merged PR #24828, which establishes the independent SDK beta release plumbing and exact runtime dependency.

What changed

  • Rewrote sdk/python/README.md as a compact PyPI-facing beta package page: published installation, one quickstart, short login examples, built-in help, and links to deeper guides.
  • Updated the getting-started guide, API reference, FAQ, and examples index to present the published beta consistently without repeating onboarding in the package landing page or reference page.
  • Made pip install openai-codex the primary install path while beta releases are the only published SDK releases, with --pre documented for opting into prereleases after a stable release exists.
  • Added curated help() / pydoc docstrings across the public API and generated public convenience methods through scripts/update_sdk_artifacts.py.
  • Declared the repository Apache-2.0 license expression and Documentation URL in package metadata, without introducing a duplicated SDK-local license file.
  • Kept the source distribution focused on installable package material (src/openai_codex, README.md, and pyproject.toml); the repository docs and runnable examples remain linked from the PyPI README.
  • Built release artifacts in an Alpine container on the Ubuntu runner, matching Python SDK CI and allowing type generation to install the published musllinux runtime wheel.
  • Added twine check --strict to the release workflow so malformed PyPI metadata or rendered README content fails before publishing.
  • Added focused SDK assertions for beta metadata, the exact runtime pin, source distribution contents, and the built-in Python documentation surface.

Validation

  • Ran uv run --frozen --extra dev ruff check scripts/update_sdk_artifacts.py src/openai_codex tests/test_public_api_signatures.py tests/test_artifact_workflow_and_binaries.py before the final README-only reductions and review-fix follow-ups.
  • Built openai_codex-0.1.0b1-py3-none-any.whl and openai_codex-0.1.0b1.tar.gz before the final README-only reductions and review-fix follow-ups.
  • Ran python -m twine check --strict on both built artifacts before the final README-only reductions and review-fix follow-ups.
  • Verified artifact metadata reports Apache-2.0 without a duplicated SDK-local license file.
  • Verified inspect.getdoc(...) resolves documentation for the package, Codex, CodexConfig, and key generated thread methods.
  • Rebased the documentation/readiness change onto merged PR [codex] Add independent beta release for the Python SDK #24828 without changing the intended SDK or workflow file contents.
  • Final verification is delegated to online CI for this PR.

Base automatically changed from dev/python-sdk-beta-release to main May 28, 2026 00:57
@aibrahim-oai aibrahim-oai marked this pull request as ready for review May 28, 2026 00:57
@aibrahim-oai aibrahim-oai force-pushed the dev/python-sdk-beta-docs branch from 92a660f to f3dce8d Compare May 28, 2026 01:01
@chatgpt-codex-connector
Copy link
Copy Markdown
Contributor

💡 Codex Review

https://github.com/openai/codex/blob/92a660f978e0fe7dbdee953d2f6eb2d43a07479a/.github/workflows/python-sdk-release.yml#L54
P1 Badge Release from a platform with compatible runtime wheels

This job runs on ubuntu-latest, but uv sync has to install openai-codex-cli-bin==0.132.0; the checked-in lock only lists macOS, Windows, and musllinux wheels for that package, with no source distribution or manylinux wheel. On a glibc Linux platform the same command fails in dry-run with “doesn't have a source distribution or wheel for the current platform,” so every python-v* release will stop here unless the runtime pin has a Linux-compatible wheel or this build runs where the pinned wheel is installable.


https://github.com/openai/codex/blob/92a660f978e0fe7dbdee953d2f6eb2d43a07479a/sdk/python/pyproject.toml#L55
P2 Badge Include _runtime_setup.py with packaged examples

Because the sdist now ships examples/**, anyone unpacking the source distribution and following the included examples gets scripts that import examples/_bootstrap.py, which immediately imports _runtime_setup from the SDK root. _runtime_setup.py is not included by this sdist allowlist, so those packaged examples fail with ModuleNotFoundError before they can run; include the helper alongside the examples or avoid shipping the examples in the sdist.

ℹ️ 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".

Copy link
Copy Markdown
Contributor

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

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: a8947ffe94

ℹ️ 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 sdk/python/README.md
cd sdk/python
uv sync
source .venv/bin/activate
pip install openai-codex
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge Avoid advertising an install path that fails on Linux

On glibc Linux environments, this documented command cannot satisfy the package's pinned openai-codex-cli-bin==0.132.0 dependency: the current lock/PyPI metadata for that runtime has macOS, Windows, and musllinux wheels but no manylinux wheel or sdist, and uv's resolver fails with that exact platform error from sdk/python. Because this README is now the PyPI-facing install path, Linux users will fail before they can import the SDK unless the release pins a runtime with manylinux wheels or the docs clearly limit/support an alternate install path for those platforms.

Useful? React with 👍 / 👎.

@aibrahim-oai aibrahim-oai merged commit eb1cc38 into main May 28, 2026
31 checks passed
@aibrahim-oai aibrahim-oai deleted the dev/python-sdk-beta-docs branch May 28, 2026 01:29
@github-actions github-actions Bot locked and limited conversation to collaborators May 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant