Skip to content

Solve alleged twine warnings on pypi publishing #1778

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 4 commits into from
Aug 25, 2023

Conversation

echedey-ls
Copy link
Contributor

@echedey-ls echedey-ls commented Jun 18, 2023

  • [ ] Closes #xxxx
  • I am familiar with the contributing guidelines
  • [ ] Tests added
  • [ ] Updates entries in docs/sphinx/source/reference for API changes.
  • [ ] Adds description and name entries in the appropriate "what's new" file in docs/sphinx/source/whatsnew for all changes. Includes link to the GitHub Issue with :issue:`num` or this Pull Request with :pull:`num`. Includes contributor name and/or GitHub username (link with :ghuser:`user`).
  • [ ] New code is fully documented. Includes numpydoc compliant docstrings, examples, and comments where necessary.
  • Pull request is nearly complete and ready for detailed review.
  • Maintainer: Appropriate GitHub Labels (including remote-data) and Milestone are assigned to the Pull Request and linked Issue.

I'm pretty sure the following warnings are being raised in the publish action, since metadata verification is not disabled in the PyPI publishing action. Can't compare against last publication as the logs were deleted.
(I was playing with the sdist and installation procedures, in case you were wondering).
See comments below.

(venv) PS C:\...\pvlib-python> py -m twine check dist/*
Checking dist\pvlib-0.9.6.dev25+g763dd0a.d20230618-py3-none-any.whl:
PASSED with warnings WARNING  `long_description_content_type` missing. defaulting to `text/x-rst`.
Checking dist\pvlib-0.9.6.dev25+g763dd0a.d20230618.tar.gz:
PASSED with warnings WARNING  `long_description_content_type` missing. defaulting to `text/x-rst`.

This solves it. It currently does not have any impact but just in case.

(venv) PS C:\...\pvlib-python> py -m twine check dist/*
Checking dist\pvlib-0.9.6.dev25+g763dd0a.d20230618-py3-none-any.whl: PASSED with warnings
WARNING  `long_description_content_type` missing. defaulting to `text/x-rst`.
Checking dist\pvlib-0.9.6.dev25+g763dd0a.d20230618.tar.gz: PASSED with warnings
WARNING  `long_description_content_type` missing. defaulting to `text/x-rst`.
@echedey-ls
Copy link
Contributor Author

I'd keep this open until the warning can be confirmed on v0.10 release.

@echedey-ls
Copy link
Contributor Author

From last release logs, at Publish distribution to PyPi, lines 16 to 19:

Checking dist/pvlib-0.10.0-py3-none-any.whl: PASSED with warnings
WARNING  `long_description_content_type` missing. defaulting to `text/x-rst`.   
Checking dist/pvlib-0.10.0.tar.gz: PASSED with warnings
WARNING  `long_description_content_type` missing. defaulting to `text/x-rst`.

@echedey-ls echedey-ls marked this pull request as ready for review July 1, 2023 07:19
@kandersolar
Copy link
Member

Thanks @echedey-ls! Would it make sense to add python -m twine check dist/* to the CI build job (after this step) so that we can check for these types of warnings between releases?

@kandersolar kandersolar added this to the v0.10.2 milestone Jul 6, 2023
@kandersolar kandersolar added the build tools Pipelines, CI, GH actions label Jul 6, 2023
@echedey-ls
Copy link
Contributor Author

I don't really have the knowledge to say so. I believe the desired behaviour would be to report the warnings on the action status although I don't have a clue on how to do that or if GitHub automatically does. From linked action recommendation on metadata verification:

It is recommended that you run twine check just after producing your files, but this also runs twine check before upload. You can also disable the twine check with:

with:
     verify-metadata: false

So I'd say yes. I'll add that and revert if you think so later.

@echedey-ls
Copy link
Contributor Author

BTW, I don't have a clue on how to test this.

Co-Authored-By: Kevin Anderson <[email protected]>
@echedey-ls
Copy link
Contributor Author

It amazes me how you review everything with such depth. I wouldn't have spotted the text/plain rendering.

Copy link
Member

@kandersolar kandersolar left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @echedey-ls, it's great to have another person looking at the project's infrastructure like this!

@kandersolar
Copy link
Member

Whoops, looks like this one got forgotten. I'll go ahead and merge now. Thanks again @echedey-ls!

@kandersolar kandersolar merged commit 2d04aeb into pvlib:main Aug 25, 2023
@echedey-ls echedey-ls deleted the solve-twine-warnings branch August 25, 2023 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build tools Pipelines, CI, GH actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants