Skip to content

WEB: Make all links in the website relative #50897

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

Merged
merged 3 commits into from
Jan 26, 2023

Conversation

datapythonista
Copy link
Member

I have a first version implemented of the system that will allow us to preview the rendered web/docs of a PR without having to download the artifact (see #50832).

In order to be able to navigate the website in a relative path (i.e. https://pandas.pydata.org/preview/XXXXX/ instead of the root https://pandas.pydata.org/) we need the changes implemented here, that make all the links relative, so for example the a link from /preview/XXXXX/donate.html would go to /preview/XXXXX/getting_started.html, instead of simply /getting_started.html like we've got now.

@datapythonista
Copy link
Member Author

The new preview system seems to work reasonably well, this is what it generates for this PR: https://pandas.pydata.org/preview/50897/

To tell the server to make the preview available in that url from the artifact, we need a request like this: curl -X POST https://pandas.pydata.org/preview/submit/3966694545/50888/. Where the first number is the run id of the job that genereated the web/docs artifact (the run id it's in the url of the job). And the second number is the PR number (it's only used to name the target directory).

There are many things that can be improved, but with this PR and calling the trigger from the job in #50899 seems like we've got a first working version.

CC: @pandas-dev/pandas-core

@lithomas1
Copy link
Member

@datapythonista
Ah nice, thanks for fixing this.
This was the main thing that blocked me from moving forward with uploading docs to OVH (I think? All the files were uploaded correctly, stuff just didn't load properly when it wasn't in the base of the bucket).

If you'd like, I can send you what I had for uploading docs to an OVH bucket.

@datapythonista datapythonista merged commit b39c78b into pandas-dev:main Jan 26, 2023
@datapythonista
Copy link
Member Author

If you'd like, I can send you what I had for uploading docs to an OVH bucket.

I had some problems with OVH storage. I think we can make it work, but deleting files or buckets with their UI fails, and I think someone else wasn't working well, so I set up just a regular instance. If we don't need to have a service running a storage bucket seems better since we shouldn't run out of space (not sure if it's a good thing, I think cleaning old stuff is nice). But I think we'll need to implement part of the system to publish the docs as a github app.

Happy to discuss further, and surely happy to get your code if we are going to use an OVH bucket. But for what I did I think what we've got with an instance seems to be a bit better.

@phofl phofl mentioned this pull request Feb 25, 2023
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Web pandas website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants