Skip to content

Fix PyPI README rendering metadata#1341

Open
marko1olo wants to merge 1 commit into
quantumlib:mainfrom
marko1olo:fix-pypi-logo-rendering
Open

Fix PyPI README rendering metadata#1341
marko1olo wants to merge 1 commit into
quantumlib:mainfrom
marko1olo:fix-pypi-logo-rendering

Conversation

@marko1olo
Copy link
Copy Markdown

Fixes #1317.

This fixes the PyPI README rendering metadata and uses the canonical raw GitHub URL for the Quantum AI logo image.

Changes:

  • Declares long_description_content_type='text/markdown' so PyPI renders the README as Markdown/HTML instead of plain text.
  • Replaces the refs/heads/main raw image URL with the canonical /main/ raw URL.

Validation:

  • python -m build --sdist --wheel from isolated venv C:\hades\oss\.venvs\openfermion-1317
  • python -m twine check dist\*
  • Verified generated metadata includes Description-Content-Type: text/markdown

Note: build emitted an existing setuptools license-classifier deprecation warning unrelated to this change.

@google-cla
Copy link
Copy Markdown

google-cla Bot commented Jun 5, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates an image source URL in README.md and specifies the long description content type as markdown in setup.py. The reviewer pointed out that setting the content type to markdown causes a duplicate title rendering on PyPI due to a prepended RST-style header in setup.py, and suggested reading the README file directly without prepending the redundant header.

Comment thread setup.py
maintainer_email='quantum-oss-maintainers@google.com',
description=('The electronic structure package for quantum computers.'),
long_description=long_description,
long_description_content_type='text/markdown',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

Setting long_description_content_type to 'text/markdown' causes the prepended RST-style header on lines 23-25 (long_description = '===========\n' + 'OpenFermion\n' + '===========\n\n') to be parsed as a Markdown H1 header. Since README.md already contains a # OpenFermion header, this results in a duplicate title rendering on PyPI.

To fix this, please update lines 23-25 to read the file directly without prepending the redundant header:

with open('README.md', 'r', encoding='utf-8') as readme:
    long_description = readme.read()

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.

Broken logo on PyPI page for OpenFermion

1 participant