Skip to content
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

The image and gif files shown on PyPI need to be corrected. #1558

Closed
milochen0418 opened this issue Aug 9, 2023 · 1 comment · Fixed by #1559
Closed

The image and gif files shown on PyPI need to be corrected. #1558

milochen0418 opened this issue Aug 9, 2023 · 1 comment · Fixed by #1559

Comments

@milochen0418
Copy link
Contributor

Describe the bug
A clear and concise description of what the bug is.

The image and gif files shown on PyPI need to be corrected.

Screenshot 2023-08-10 at 6 03 45 AM Screenshot 2023-08-10 at 6 04 13 AM

To Reproduce
Steps to reproduce the behavior:

  • Code/Link to Repo:

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Specifics (please complete the following information):

  • Python Version:
  • Reflex Version:
  • OS:
  • Browser (Optional):

Additional context
Add any other context about the problem here.

@milochen0418
Copy link
Contributor Author

milochen0418 commented Aug 9, 2023

From the following research, we have the simple way to solve this issue.

Research

I find examples that can show images and .gif on PyPI correctly.

Case of showing the image

FastAPI
FastAPI on PyPI -> https://pypi.org/project/fastapi/
FastAPI README.md on GitHub -> https://github.com/milochen0418/fastapi/blob/master/README.md?plain=1

Case of showing the .gif

streamlit-keyup
streamlit-keyup on PyPI -> https://pypi.org/project/streamlit-keyup/
streamlit-keyup README.md on GitHub -> https://github.com/blackary/streamlit-keyup/blob/main/README.md?plain=1

Conclusion:
From the observation, the way to fix this issue is to put the full-path hyperlink on README.md

But How to solve it?
We can find the out answer here.
pypi/warehouse#5246
When you have the path,
https://github.com/kirankotari/shconfparser/blob/master/asserts/img/sh_run.png
You can use the following to replace it.
https://github.com/kirankotari/shconfparser/raw/master/asserts/img/sh_run.png
All you need to do is replace blob into raw and you can get the raw full-path hyperlink.
Then put it into your README.md

For example, the following is the such solution
shconfparser on PyPI -> https://pypi.org/project/shconfparser/
shconfparser README.md on GitHub -> https://github.com/network-tools/shconfparser/blob/master/README.md?plain=1

smackesey added a commit to dagster-io/dagster that referenced this issue Jan 4, 2024
## Summary & Motivation

Currently there are several images missing on our PyPI page:


![image](https://github.com/dagster-io/dagster/assets/1531373/183a6af0-30a7-4b7e-a22f-aae8a7bf195d)

The PyPI page is derived from the Dagster README, which gets copied into
the `long_description` field of the PyPI package. `img` elements in the
README with relative URLs then can't be resolved.

This PR replaces the all relative URLs in `img` tags with full URLs to
github master.

## How I Tested These Changes

Not sure how to directly test PyPI without releasing, but:

- You can see the README still renders on this branch.
- These people had the same problem/solution:
reflex-dev/reflex#1558
danielgafni pushed a commit to danielgafni/dagster that referenced this issue Jan 6, 2024
## Summary & Motivation

Currently there are several images missing on our PyPI page:


![image](https://github.com/dagster-io/dagster/assets/1531373/183a6af0-30a7-4b7e-a22f-aae8a7bf195d)

The PyPI page is derived from the Dagster README, which gets copied into
the `long_description` field of the PyPI package. `img` elements in the
README with relative URLs then can't be resolved.

This PR replaces the all relative URLs in `img` tags with full URLs to
github master.

## How I Tested These Changes

Not sure how to directly test PyPI without releasing, but:

- You can see the README still renders on this branch.
- These people had the same problem/solution:
reflex-dev/reflex#1558
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant