ci: commit README-PYPI.md for azure and gcp to match main package#543
Merged
Conversation
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.
This was referenced May 21, 2026
This was referenced May 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The fix in #537 (run prepare_readme.py before align-version) fails in CI because
uv run pythonsyncs the project before executing, which builds the package, which validates pyproject.toml, which requires README-PYPI.md to exist. Chicken-and-egg.The cleaner fix is the pattern the root mistralai package already uses: commit
README-PYPI.mddirectly. Root package has done this since #518 and align-version works fine there.Changes
README-PYPI.mdfrompackages/azure/.gitignoreandpackages/gcp/.gitignorepackages/azure/README-PYPI.mdandpackages/gcp/README-PYPI.md(produced by runningpython3 scripts/prepare_readme.pyin each package)sdk_generation_mistralai_{azure,gcp}_sdk.yaml(added in ci: generate README-PYPI.md before aligning azure/gcp versions #537) since the file is now always present on diskscripts/prepare_readme.pyis still called bypublish.shand the publish workflow to refresh the file at release time, so it stays accuratehttps://github.com/...URLs so PyPI renders correctlyWhy not use
python3 scripts/prepare_readme.py(plain) in the workflow instead?That would also work (the script is stdlib-only). But committing the file matches what the main package already does, is one less moving part in CI, and keeps the README-PYPI content visible in code review whenever it changes.
Validation
Failure reproduced on run 26233248070 and 26233250646 — same hatchling
OSError: Readme file does not existfromuv run. After this PR merges, neither will recur since the file is committed.