Skip to content

Conversation

@rwjblue-glean
Copy link
Member

@rwjblue-glean rwjblue-glean commented May 28, 2025

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.

@rwjblue-glean rwjblue-glean marked this pull request as draft May 28, 2025 16:09
@rwjblue-glean rwjblue-glean force-pushed the rwjblue/push-tvslsquluzxs branch from 1c482c4 to 71dcc20 Compare May 28, 2025 16:44
@rwjblue-glean rwjblue-glean changed the title fix(config): fix invalid readme reference in pyproject.toml fix: update prepare_readme.py to support local development workflow May 28, 2025
@rwjblue-glean rwjblue-glean changed the title fix: update prepare_readme.py to support local development workflow fix: update prepare_readme.py to support local development workflow May 28, 2025
@rwjblue-glean rwjblue-glean marked this pull request as ready for review May 28, 2025 16:52
@rwjblue-glean rwjblue-glean force-pushed the rwjblue/push-tvslsquluzxs branch from 71dcc20 to ab71abf Compare May 28, 2025 16:52
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.

Choose a reason for hiding this comment

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

Suggested change
Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.

Two things:

  1. I presume this warning no longer makes sense since we're forking from the generated code.
  2. Are we at risk of this script getting overwritten by speakeasy? If not, why not?

Copy link
Member Author

Choose a reason for hiding this comment

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

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

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.
@rwjblue-glean rwjblue-glean force-pushed the rwjblue/push-tvslsquluzxs branch from ab71abf to 61c24c8 Compare May 28, 2025 18:33
@rwjblue-glean rwjblue-glean merged commit 67d772d into main May 28, 2025
@rwjblue-glean rwjblue-glean deleted the rwjblue/push-tvslsquluzxs branch May 28, 2025 18:38
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.

3 participants