Skip to content

Add PyPI metadata + bump to miles-rl 0.0.2 - #1238

Closed
Shi-Dong wants to merge 1 commit into
shi/phase7-publish-pypifrom
shi/pypi-metadata-and-0.0.2
Closed

Add PyPI metadata + bump to miles-rl 0.0.2#1238
Shi-Dong wants to merge 1 commit into
shi/phase7-publish-pypifrom
shi/pypi-metadata-and-0.0.2

Conversation

@Shi-Dong

@Shi-Dong Shi-Dong commented May 28, 2026

Copy link
Copy Markdown
Contributor

ci-image-tag: dev-phase2-test-v2

Summary

  • Bump setup.py version to 0.0.2.
  • Fill in the previously-empty PyPI metadata fields: description, long_description (from README.md), long_description_content_type, url, project_urls (Source / Documentation / Issues), license="Apache-2.0" (with license_files=("LICENSE",)), author, author_email, keywords.
  • Defensively include README.md LICENSE in MANIFEST.in so they ship in both sdist and wheel.

Why

PyPI metadata is locked per uploaded version — it can't be edited after upload. miles-rl 0.0.1 went up with empty summary / description / home_page / license / etc., so https://pypi.org/project/miles-rl/ shows a near-empty project page. PyPI displays the latest release's metadata on the project page, so cutting 0.0.2 with full metadata fixes it going forward.

Test plan

  • python3 -m ast parses setup.py cleanly.
  • Trigger publish-pypi.yml workflow_dispatch with dry_run=false on this branch → uploads miles-rl==0.0.2 via OIDC, polls PyPI index, smoke-installs in a fresh venv.
  • After upload, https://pypi.org/project/miles-rl/ renders the README and shows all the metadata.

Stacked on

radixark/miles PR #1231 (Phase 7 publish workflow).

What this PR explicitly does NOT do

  • Doesn't change any code outside setup.py and MANIFEST.in.
  • Doesn't populate extras_require["gpu"] — that's separate work.
  • Doesn't modify the publish-pypi.yml workflow (only triggers it).

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request updates the package configuration by defensively including README.md and LICENSE in MANIFEST.in, and enriching the metadata in setup.py (including adding a long description read from README.md). A review comment suggests adding a fallback check for the existence of README.md in setup.py to prevent a FileNotFoundError during packaging in environments where the file might be missing.

Comment thread setup.py
Comment on lines +10 to +13
def _read_long_description():
"""Return the README contents so PyPI renders the project page."""
from pathlib import Path
return Path(__file__).parent.joinpath("README.md").read_text(encoding="utf-8")

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.

medium

If setup.py is executed in an environment where README.md is missing (for example, in some automated build/packaging pipelines or environments where only setup.py is parsed), Path.read_text() will raise a FileNotFoundError and crash the setup process. It is safer to check if the file exists and fallback to an empty string.

Suggested change
def _read_long_description():
"""Return the README contents so PyPI renders the project page."""
from pathlib import Path
return Path(__file__).parent.joinpath("README.md").read_text(encoding="utf-8")
def _read_long_description():
"""Return the README contents so PyPI renders the project page."""
from pathlib import Path
readme_path = Path(__file__).parent.joinpath("README.md")
return readme_path.read_text(encoding="utf-8") if readme_path.exists() else ""

@Shi-Dong
Shi-Dong force-pushed the shi/phase7-publish-pypi branch from 7aaf8d4 to 9a66871 Compare May 30, 2026 08:17
@Shi-Dong
Shi-Dong requested a review from yushengsu-thu as a code owner May 30, 2026 08:17
@Shi-Dong
Shi-Dong force-pushed the shi/pypi-metadata-and-0.0.2 branch from 1dae6b5 to a8d2453 Compare May 30, 2026 08:17
@Shi-Dong
Shi-Dong force-pushed the shi/phase7-publish-pypi branch from 9a66871 to 9ef42e9 Compare June 1, 2026 16:12
@Shi-Dong
Shi-Dong force-pushed the shi/pypi-metadata-and-0.0.2 branch 2 times, most recently from 1493b2e to eb4ba7c Compare June 2, 2026 04:40
@Shi-Dong
Shi-Dong force-pushed the shi/phase7-publish-pypi branch 2 times, most recently from 1e4511e to 335b60f Compare June 2, 2026 09:07
@Shi-Dong
Shi-Dong force-pushed the shi/pypi-metadata-and-0.0.2 branch 2 times, most recently from 177752c to aa7b3f5 Compare June 3, 2026 15:02
@Shi-Dong
Shi-Dong force-pushed the shi/phase7-publish-pypi branch from 335b60f to a0afd1f Compare June 3, 2026 15:02
PyPI metadata is locked per uploaded version. The 0.0.1 release had no summary, description, project URLs, license, or author email, so https://pypi.org/project/miles-rl/ was rendering a near-empty page. PyPI shows the LATEST releases metadata on the project page, so cutting 0.0.2 with full metadata fixes the project page going forward.

Changes to setup.py: add description, long_description (the existing README.md), long_description_content_type=text/markdown, url, project_urls (Source, Documentation, Issues), license=Apache-2.0 + license_files, author + author_email, keywords. Bump version 0.0.1 -> 0.0.2.

MANIFEST.in: defensively include README.md and LICENSE so they ship in both the sdist and the wheel (setuptools embeds long_description into the wheel METADATA already, but the explicit include is harmless and protects the sdist).
@Shi-Dong
Shi-Dong force-pushed the shi/pypi-metadata-and-0.0.2 branch from aa7b3f5 to d5499b6 Compare June 4, 2026 13:10
@Shi-Dong

Copy link
Copy Markdown
Contributor Author

Superseded. Replaced by a thin packaging slice cut fresh off current `main`:

This branch was 457 commits behind `main` and its submodule pin for sglang was 2831 commits stale and no longer an ancestor of `sglang-miles`. Rebasing it would also have resurrected the `examples/experimental/swe-agent` submodules that #1918 deliberately deleted. The branch is left in place; nothing is lost.

@Shi-Dong Shi-Dong closed this Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant