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 ability to configure a redirect for documentation previously hosted by PyPI #3417

Open
ewdurbin opened this issue Mar 25, 2018 · 8 comments
Labels
CSS/SCSS requires change to CSS/SCSS files feature request help needed We'd love volunteers to advise on or help fix/implement this. HTML requires change to HTML files

Comments

@ewdurbin
Copy link
Member

ewdurbin commented Mar 25, 2018

#582 was closed by #3413, but only completes one half of the work.

we still should provide the ability for users to configure a redirect from files.pythonhosted.org/<project.name> to some new URL.

@icemac
Copy link

icemac commented Apr 18, 2018

I'd like to have the redirect, too, so older links to the documentation of a package do not get broken without the possibility to tell where the documentation is hosted nowadays.

@brainwane
Copy link
Contributor

I asked Eric Holscher @ericholscher for his comments:

It's something that will likely take work on my side, if we want to allow them to upload/redirect. We have pydoc.io, which we're still working on, but it would be an obvious home for docs people want to upload to pypi.

Think there's some more info here: #509 #582

I think the big thing to prioritize is some way to auth pypi users. We'd need to do Oauth or something similar to verify identity of pypi users in order for people to "claim" packages. I've thought about some janky method like confirming the email address in the setup.py, but I'd really like it to be Oauth.

@ewdurbin
Copy link
Member Author

pypi/conveyor#3 implements the necessary infrastructure to support this.

It reads/parses a redirects.txt from the root of the bucket which contains a \n joined set of JSON redirect configurations:

{"project_name": "clandestined", "include_path": false, "base_uri": "https://ernest.ly"}
{"project_name": "pypi-docs-proxy", "include_path": true, "base_uri": "https://ernest.ly"}

To implement this feature in Warehouse we will need to create a form that allows users with documentation hosted on pythonhosted.org to specify the above parameters and store it in the warehouse db.

A warehouse task should periodically generate and publish the full redirects.txt to the root of the configured DOCS_BACKEND. Conveyor will poll this periodically and then update it's redirects.

@brainwane brainwane added HTML requires change to HTML files CSS/SCSS requires change to CSS/SCSS files help needed We'd love volunteers to advise on or help fix/implement this. labels Mar 22, 2019
@brainwane
Copy link
Contributor

We talked about this today & would love help from a volunteer on this!

So: please go ahead and grab this issue! Just comment and say that you're starting to work on it, and link in a comment to your work-in-progress branch once you start.

As always, if you have questions along the way as you work on this, please feel free to ask them here, in #pypa-dev on Freenode, or the pypa-dev mailing list.

@pchtsp
Copy link

pchtsp commented Sep 22, 2019

I'm sorry to highjack this thread but I'm going crazy trying to manually add a redirect on our old docs (https://pythonhosted.org/PuLP/) to our new documentation (http://coin-or.github.io/pulp/) following this stackoverflow's instructions but I can't for the life of me find any option in all of pypi to upload or delete the documentation. I'm maintainer in the PuLP project.

Am I supposed to be owner of the project to see this option? Has it been taken down? Is there anyway to update the current documentation in pypi to manually add a simple redirect? What are our current alternatives to redirect people from one site to the other?

Thanks!

Franco

@ewdurbin
Copy link
Member Author

ewdurbin commented Sep 22, 2019

@pchtsp the feature has not yet been implemented in warehouse. conveyor, which serves pythonhosted.org still has support for the protocol described in #3417 (comment) if/when it is implemented.

@pchtsp
Copy link

pchtsp commented Sep 23, 2019

@ewdurbin thanks for the answer.

So, if I understood correctly, our current alternatives are
(1) taking down the documentation completely from pythonhoste or
(2) leave the documentation in its current state.

Unless / until the functionality is added to the pypi site, there is no way of modifyig the current version of the docs that are hosted in pythonhosted.

Is this accurate?

Thanks again!

@ewdurbin
Copy link
Member Author

That is correct @pchtsp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CSS/SCSS requires change to CSS/SCSS files feature request help needed We'd love volunteers to advise on or help fix/implement this. HTML requires change to HTML files
Projects
None yet
Development

No branches or pull requests

5 participants