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

Add project_urls to setup #13623

Merged
merged 1 commit into from
Apr 12, 2019
Merged

Conversation

jarrodmillman
Copy link
Contributor

These are used by PyPI and other services.

Reference Issues/PRs

What does this implement/fix? Explain your changes.

Any other comments?

@thomasjpfan
Copy link
Member

Just curious, how does pypi know which icon to use with the project_urls? For example:

https://pypi.org/project/Django/ and https://pypi.org/project/Flask/ have different keys for their bug tracker and source, but pypi is able to figure out which icon to use. Is pypi parsing the url?

Copy link
Member

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

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

Nitpick but LGTM

setup.py Outdated Show resolved Hide resolved
These are used by PyPI and other services.
@jarrodmillman
Copy link
Contributor Author

@thomasjpfan

Here is what Flask did:

    project_urls=OrderedDict((
        ('Documentation', 'http://flask.pocoo.org/docs/'),
        ('Code', 'https://github.com/pallets/flask'),
        ('Issue tracker', 'https://github.com/pallets/flask/issues'),
)),

Here is what Django did:

    project_urls={
        'Documentation': 'https://docs.djangoproject.com/',
        'Funding': 'https://www.djangoproject.com/fundraising/',
        'Source': 'https://github.com/django/django',
        'Tracker': 'https://code.djangoproject.com/',
},

According to the documentation (https://setuptools.readthedocs.io/en/latest/setuptools.html):

project_urls
    An arbitrary map of URL names to hyperlinks, allowing more extensible documentation
    of where various resources can be found than the simple url and download_url options
    provide.

Since I wasn't sure how well PyPI would be able to guess what I meant by a term I arbitrarily made up, I just copied the example in the documentation:

    project_urls={
        "Bug Tracker": "https://bugs.example.com/HelloWorld/",
        "Documentation": "https://docs.example.com/HelloWorld/",
        "Source Code": "https://code.example.com/HelloWorld/",
    }

@NicolasHug
Copy link
Member

@thomasjpfan I think PyPI has a hard coded logo for the bug tracker (since it's the same for Jango and Flask while they're using different platforms), and it recognizes github repos for the source as a special thing. Or it might just be using the favicon.

@TomDLT TomDLT merged commit a8f417e into scikit-learn:master Apr 12, 2019
@TomDLT
Copy link
Member

TomDLT commented Apr 12, 2019

Thanks @jarrodmillman !

jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request Apr 25, 2019
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
koenvandevelde pushed a commit to koenvandevelde/scikit-learn that referenced this pull request Jul 12, 2019
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.

5 participants