-
Notifications
You must be signed in to change notification settings - Fork 1k
Document recommended keys for project_urls #5947
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
Comments
BTW I'm willing to write up the PR to document this if that's the way to go, I just need to be told where you would like it and what to standardize on (and the problem with the link I provided is that doesn't generically work for other project builders like flit). 😄 And I'm willing to kick off a discussion on this if that's the way people want to go. |
Here's the list of the most-used For example, the top 10 are:
And grouping some variants, we can see some popular choices:
And:
And:
|
Thanks for the analysis, @hugovk ! The popularity of the "Download" link is a bit interesting to have on PyPI. 😆 |
If this is reading the HTML on Warehouse, I'm pretty sure we surface the dedicated links for home page and download URLs in the metadata as a Project URL named Homepage and Download. So I suspect the popularity comes from the fact that those are dedicate keywords in python metadata (and IIRC distutils warns if you don't have it?). |
Yes, that data comes from the JSON API, and Homepage and Download are special cases: Aside: Here's a table of the 778 Download links and their projects: And just the sorted URLs: 299 are One package with "download_url": "UNKNOWN",
"home_page": "http://pypi.python.org/pypi/termcolor",
"project_urls": {
"Download": "UNKNOWN",
"Homepage": "http://pypi.python.org/pypi/termcolor"
}, Anyway, whether |
I found this while looking for such a specification myself. One thing I'd like to add to the conversation is that https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#urls provides an examples with specifically:
|
The sample PyPA project has a different set of URLs:
I ended up here while trying to work out whether my preferred "Issue Tracker" name for the issue tracker link would get the bug icon on PyPI (it will, but I only confirmed that by following the code link above), so one possible way to organise these docs would be to list the categories that PyPI defines, and the associated criteria for picking that category (with a general note that all string comparisons are case insensitive). Docs sketch based on translating the current icon selection code into English prose (I haven't kept the exact same order, so
Cloud services with known domains associated with specifically branded PyPI Project Link icons:
Continuous services with known domains associated with the PyPI Project Link "Tasks" category icon:
(actual docs would likely be able to include the FontAwesome icons themselves, but I couldn't see an obvious way to get them to appear inline in GitHub markdown) |
This is now resolved: https://docs.pypi.org/project_metadata/ |
What's the problem this feature will solve?
Help standardize on the names people use for
project_urls
while also helping to get more URLs with nice icons.Describe the solution you'd like
Document somewhere (maybe https://packaging.python.org/guides/distributing-packages-using-setuptools/#project-urls) the recommended URL labels projects should consider using.
Additional context
Since https://github.com/pypa/warehouse/blob/master/warehouse/templates/packaging/detail.html has special logic to add appropriate icons based on the label provided for these URLs, it might be nice to help guide people towards a set of labels. That way more people get the nice icons and it helps standardize the labels implicitly.
The text was updated successfully, but these errors were encountered: