Skip to content

ci: generate README-PYPI.md before aligning azure/gcp versions#537

Merged
Nelson-PROIA merged 1 commit into
mainfrom
ci/align-version-prepare-readme
May 21, 2026
Merged

ci: generate README-PYPI.md before aligning azure/gcp versions#537
Nelson-PROIA merged 1 commit into
mainfrom
ci/align-version-prepare-readme

Conversation

@Nelson-PROIA
Copy link
Copy Markdown
Contributor

Summary

The azure and gcp gen workflows fail at the align-version step because uv version <new> triggers a hatchling editable build that validates pyproject.toml. Both packages declare readme = "README-PYPI.md" but that file is generated at publish time by scripts/prepare_readme.py and not committed.

On fresh CI checkouts the file is missing, so hatchling raises:

OSError: Readme file does not exist: README-PYPI.md

before the version bump can complete.

Fix

Run scripts/prepare_readme.py before uv version in both workflows, mirroring what publish.sh already does at release time.

Validation

Reproduced the failure locally on packages/azure with the pinned hatchling: uv version 2.0.1 failed with the exact same traceback. With the fix applied (running prepare_readme.py first), uv version succeeds.

This is a no-op on existing repo state — the workflow change only affects future gen runs.

Copy link
Copy Markdown
Contributor

@louis-sanna-dev louis-sanna-dev left a comment

Choose a reason for hiding this comment

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

🚀

@Nelson-PROIA Nelson-PROIA force-pushed the ci/align-version-prepare-readme branch from aa542ea to 9ed2f14 Compare May 21, 2026 13:57
uv version <new> triggers a hatchling editable build which validates
pyproject.toml. The azure and gcp packages declare readme = "README-PYPI.md"
but the file is generated at publish time by scripts/prepare_readme.py and
not committed. On fresh CI checkouts hatchling raises OSError: Readme file
does not exist: README-PYPI.md before the version is bumped.

Run prepare_readme.py before uv version so the file exists for validation,
mirroring what publish.sh already does at release time.
@Nelson-PROIA Nelson-PROIA force-pushed the ci/align-version-prepare-readme branch from 9ed2f14 to b2bdef6 Compare May 21, 2026 14:00
@Nelson-PROIA Nelson-PROIA merged commit a2fd94d into main May 21, 2026
10 checks passed
@Nelson-PROIA Nelson-PROIA deleted the ci/align-version-prepare-readme branch May 21, 2026 14:02
Nelson-PROIA added a commit that referenced this pull request May 21, 2026
The mistralai-{azure,gcp} pyproject.toml files reference README-PYPI.md
which is generated by scripts/prepare_readme.py from the regular README.md
with relative links rewritten to absolute GitHub URLs.

Until now, the file was gitignored per package and only generated at
publish time. This caused align-version to fail in CI because uv version
triggers a hatchling editable build which validates pyproject.toml, and
hatchling refuses to validate a non-existent readme file.

The root mistralai package already commits its README-PYPI.md (added in
#518) and works fine. Apply the same pattern to azure and gcp:

- Remove README-PYPI.md from each package's .gitignore
- Commit the generated file
- Drop the prepare_readme step from gen workflows (added in #537)
  since the file is now always present on disk

prepare_readme.py is still called by publish.sh and the publish workflow
to refresh the file at release time, so it stays accurate.
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.

2 participants