Skip to content

Conversation

sadielbartholomew
Copy link
Member

Quick PR to fix a link to the PDF cheat sheet which is broken since the hash in the link wasn't removed somehow in the build process: see https://ncas-cms.github.io/cf-python/cheat_sheet.html and try to click 'pdf' (or open it in a new tab, remove the hash component and it works). I want to update this manually in the built HTML since I want to update the Intro. Scientific Computing to include a link to the cheat sheet from the current docs and don't want a broken link sitting there for someone to find.

I would have just pushed this fix as a lone commit if it weren't for the fact that I wanted to check if we need to update the release script in case anything is wrong that led to the hash component not getting removed to break the link, but actually taking a quick look the logic looks fine to me, so I am at a loss as to why the hash remained there in the latest release process:

cf-python/release_docs

Lines 91 to 101 in 0c5af83

for download_file in cf_tutorial_files.zip tutorial.py field_analysis.py cheatsheet.pdf
do
# Remove the hash string component added by GitHub to the link
# where the resources are hosted (GH changes it to something like
# '_downloads/4cd32e1c6bdf28fb61e15ffab2a8d84e/download_file')
sed -i "s/\(href=._downloads\).*\($download_file\)/\1\/\2/" \
$dir/tutorial.html \
$dir/analysis.html \
$dir/cheat_sheet.html
# all pages referencing these resources must be added to this list
done

Any ideas @davidhassell? If not I'll assume we did something wrong in the last release build and we can just merge this fix as-is.

@sadielbartholomew sadielbartholomew self-assigned this Nov 5, 2024
@davidhassell
Copy link
Collaborator

No ideas from me - sorry :(

@sadielbartholomew
Copy link
Member Author

No ideas from me - sorry :(

No problem. I'll merge this fix and note down to check the link works when we next do a release. Thanks.

@sadielbartholomew sadielbartholomew merged commit 9bb47a0 into NCAS-CMS:main Nov 5, 2024
0 of 3 checks passed
@sadielbartholomew sadielbartholomew deleted the docs-addition-downloads branch November 5, 2024 22:14
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.

2 participants