fix: update prepare_readme.py to support local development workflow #26
Merged
rwjblue-glean merged 1 commit intomainfrom May 28, 2025
Merged
fix: update prepare_readme.py to support local development workflow #26rwjblue-glean merged 1 commit intomainfrom
prepare_readme.py to support local development workflow #26rwjblue-glean merged 1 commit intomainfrom
Conversation
1c482c4 to
71dcc20
Compare
pyproject.tomlprepare_readme.py to support local development workflow
71dcc20 to
ab71abf
Compare
david-hamilton-glean
approved these changes
May 28, 2025
scripts/prepare_readme.py
Outdated
| is used for package publishing to ensure all documentation links function properly | ||
| on the PyPI package page. | ||
|
|
||
| Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. |
Member
There was a problem hiding this comment.
Suggested change
| Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. |
Two things:
- I presume this warning no longer makes sense since we're forking from the generated code.
- Are we at risk of this script getting overwritten by speakeasy? If not, why not?
Member
Author
There was a problem hiding this comment.
I presume this warning no longer makes sense since we're forking from the generated code.
Yes.
Are we at risk of this script getting overwritten by speakeasy? If not, why not?
I do not know, TBH. I'm inclined to land this and wait and see, if it does get clobbered by the next re-generation, then I'll include it in the automation that I'm setting up in #23.
Member
Author
There was a problem hiding this comment.
I did remove this line from the doc string though.
**Context:** The `scripts/prepare_readme.py` script converts `README.md` to `README-PYPI.md` for PyPI publication, replacing relative URLs with absolute GitHub URLs so documentation links work properly on the PyPI package page. **Problem:** Prior to these changes, `poetry install` would fail in local development with "Readme path does not exist" because `pyproject.toml` referenced `README-PYPI.md`, but this file was gitignored and only generated during the publishing process. **Fix:** Enhanced `scripts/prepare_readme.py` to automatically update `pyproject.toml` after generating `README-PYPI.md`, switching the `readme` reference from `README.md` to `README-PYPI.md`. This allows the script to handle the complete PyPI preparation workflow while ensuring local development setup works seamlessly.
ab71abf to
61c24c8
Compare
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.
Context: The
scripts/prepare_readme.pyscript convertsREADME.mdtoREADME-PYPI.mdfor PyPI publication, replacing relative URLs with absolute GitHub URLs so documentation links work properly on the PyPI package page.Problem: Prior to these changes,
poetry installwould fail in local development with "Readme path does not exist" becausepyproject.tomlreferencedREADME-PYPI.md, but this file was gitignored and only generated during the publishing process.Fix: Enhanced
scripts/prepare_readme.pyto automatically updatepyproject.tomlafter generatingREADME-PYPI.md, switching thereadmereference fromREADME.mdtoREADME-PYPI.md. This allows the script to handle the complete PyPI preparation workflow while ensuring local development setup works seamlessly.