Skip to content

assure the upload will work #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 21, 2021
Merged

assure the upload will work #5

merged 3 commits into from
Jun 21, 2021

Conversation

Richardk2n
Copy link
Member

I had issues uploading to pypi and wanted to prevent that.

@Richardk2n
Copy link
Member Author

Would you like to have a look at this @haplo?

@haplo
Copy link

haplo commented May 19, 2021

Would you like to have a look at this @haplo?

Sure thing, I will take a look.

Can you share more details on what went wrong?

@Richardk2n
Copy link
Member Author

When the Readme file is not correctly formatted pypi refuses the upload with a error message:
HTTPError: 400 Bad Request from https://upload.pypi.org/legacy/
The description failed to render in the default format of reStructuredText. See https://pypi.org/help/#description-content-type for more information.
This regularly causes me commit stuff like this: 906a3dd
To prevent that I want to run a check beforehand.

@haplo
Copy link

haplo commented May 20, 2021

@haplo
Copy link

haplo commented May 20, 2021

@Richardk2n Let's also add this pre-commit hook that validates rst files with the same linter as PyPI's.

There is also this rstcheck hook, that seems very comprehensive, but I don't know whether it's 100% compatible with PyPI's syntax.

@Richardk2n
Copy link
Member Author

I put both checks in (one as a pre-commit check, one as a Github action check". While doing so I made two mistakes. One was caught by one of the checks, the other by the other. So, they are not perfect, but i think, they are good enough.

@Richardk2n Richardk2n merged commit 302df62 into master Jun 21, 2021
@Richardk2n Richardk2n deleted the enforece-uploadability branch June 21, 2021 17:31
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