-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
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
DOC: Upload cheatsheets to site #44018
Conversation
cc @Dr-Irv @datapythonista over to you |
.github/workflows/ci.yml
Outdated
- name: Copy cheatsheets into site directory | ||
run: | | ||
mkdir -p web/build/docs/cheatsheets | ||
cp doc/cheatsheet/Pandas_Cheat_Sheet* web/build/docs/cheatsheets |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
37c501d
to
37ad506
Compare
There was a problem hiding this 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?
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. |
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. |
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