Skip to content

DOC: Upload cheatsheets to site #44018

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
Oct 18, 2021

Conversation

trallard
Copy link
Contributor

@trallard trallard commented Oct 13, 2021

I went ahead and modified the .github/workflows/ci.yml so that the cheatsheets are copied to the docs build directory once the Sphinx site is built

@jreback jreback added this to the 1.4 milestone Oct 16, 2021
@jreback jreback added the Docs label Oct 16, 2021
@jreback
Copy link
Contributor

jreback commented Oct 16, 2021

cc @Dr-Irv @datapythonista over to you

- name: Copy cheatsheets into site directory
run: |
mkdir -p web/build/docs/cheatsheets
cp doc/cheatsheet/Pandas_Cheat_Sheet* web/build/docs/cheatsheets
Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't going to solve the problem. Right now, we have that https://pandas.pydata.org/docs/getting_started/index.html#tutorials has a link
to https://pandas.pydata.org/Pandas_Cheat_Sheet.pdf .

I think we just want to copy Pandas_Cheat_Sheet.pdf to web/build to fix this.

Having said that, maybe @datapythonista knows more about how the web site is built/structured to confirm.

We could consider changing the link in the tutorial, but there are a lot of links to the current location on the web, so we would then need to put a redirect on the web site, which is probably harder.

Copy link
Member

Choose a reason for hiding this comment

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

Agree with @Dr-Irv, we shouldn't change the location of the cheatsheets, we try ro be quite conservative with breaking links. And if we want to consider changing the location, let's keep it separated from this change. Besides that detail, the PR looks great. I do think we need to remove the exclude above @Dr-Irv, otherwise the chetsheets wouldn't upload. So, it's just changing the path were we upload the files and we're good to go IMO.

Copy link
Contributor

Choose a reason for hiding this comment

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

@datapythonista Do you agree with this statement that I made above? (I'm not 100% sure it's correct)

I think we just want to copy Pandas_Cheat_Sheet.pdf to web/build to fix this.

Copy link
Member

Choose a reason for hiding this comment

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

There are more cheatsheets than that, there is at least a Japanese one iirc, but other than that I agree. The file needs to be available at the current location https://pandas.pydata.org/Pandas_Cheat_Sheet.pdf

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, folks I have made the requested changes so now the cheatsheets should be under web/build

Apologies for messing the path in the first place - there were some talks of having a dedicated folder for cheatsheets in #4090 so I think I jumped the gun

@trallard trallard force-pushed the trallard/cheatsheet-update branch from 37c501d to 37ad506 Compare October 18, 2021 11:04
Copy link
Contributor

@Dr-Irv Dr-Irv left a comment

Choose a reason for hiding this comment

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

I'm fine with this now, but @datapythonista how can we test this? How often does this script get run so that the web site is updated?

@datapythonista datapythonista merged commit 1b240fe into pandas-dev:master Oct 18, 2021
@datapythonista
Copy link
Member

Thanks @trallard, really nice.

The CI for this commit (PR merge) will update the website, and the cheatsheet in https://pandas.pydata.org/Pandas_Cheat_Sheet.pdf should be updated with the new version. The new cheatsheet contains 3 columns instead of two for the "Subset" sections, in the bottom right part of the first page. In 30 minutes or so we should see the change. If the job fails, the cheatseet is not replaced, or whatever, we'll follow up with another PR. There is no easy way to test this further without merging the PR.

Note that the copying of the cheatsheet to the directory to upload was already being run in this PR. So the job shouldn't be failing. It's just the upload that hasn't been tested already.

@datapythonista
Copy link
Member

Ups, just realized now that we're copying the cheatsheets to the directory after the directory is uploaded, so the cheatsheets won't be pushed, and will be delete from the server, my bad. I'll open a PR to fix it.

@trallard trallard deleted the trallard/cheatsheet-update branch October 28, 2021 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DOC: Fix up auto build procedure to upload Cheat Sheet to web site
4 participants