-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Use Project-URL
metadata field to get a PyPI package's homepage URL
#33089
Use Project-URL
metadata field to get a PyPI package's homepage URL
#33089
Conversation
Still need to write some integration tests, but I tested this manually with a personal PyPI project that uses the Couple things:
Edit: BTW, here are some references I used:
|
Going to open this. I did modify an integration test to test for project URL metadata but the existing tests are dependent on each other which makes it harder to add more. Let me know if I should do something about this |
I understand the tests a tad more and was able to add the necessary coverage tests |
routers/api/packages/pypi/pypi.go
Outdated
// TODO: Home-page is a deprecated metadata field. Remove this form lookup once it's no longer apart of the spec. | ||
homepageURL := ctx.Req.FormValue("home_page") | ||
if len(homepageURL) == 0 { | ||
projectURLs := ctx.Req.Form["project_urls"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM
I think here it should use project_urls
before home_page
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how that got there.
Resolves #33085.