Repository navigation
chore: sync shared config files with org templates - #5
Merged
Merged
Conversation
Part of hsf-training/hsf-training-ai-maintenance#4. Assisted-by: Claude Code:claude-opus-5-5
Closed
34 tasks done
Add the org's baseline pre-commit config (pre-commit-hooks, codespell and blacken-docs). It is part of the hsf-training repo standards, and the operator running the org-wide config sync asked to enable it here. This replaces the `# no pre-commit` / `repos: []` placeholder from d14b1c5, which was added for executablebooks/cookiecutter-jupyter-book#46: pre-commit.ci failed on PRs because the template had no `.pre-commit-config.yaml`. This config keeps the file in place, so pre-commit.ci still finds it, and passes on the whole repo: the datasets in `array-oriented-programming/data/` are excluded, and codespell ignores base64 blobs, so notebook outputs and attachments don't produce false positives. nbstripout is not added because the book renders the stored outputs of 5-gpu.ipynb, which it doesn't execute. Part of hsf-training/hsf-training-ai-maintenance#4. Assisted-by: Claude Code:claude-opus-5-5
- Add the missing final newline to notebooks/mandelbrot-on-all-accelerators.ipynb. - Trim trailing whitespace in array-oriented-programming/_config.yml. - Fix typos found by codespell: "varible", "invovles", "dissasembler" (a code comment) and "configuation" (text in img/history-of-bindings-2.svg). No change to code behaviour. Part of hsf-training/hsf-training-ai-maintenance#4. Assisted-by: Claude Code:claude-opus-5-5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 AI text below 🤖
Part of hsf-training/hsf-training-ai-maintenance#4, which brings the org's shared config files in line with the templates.
Changes
.github/dependabot.yml: keeps the GitHub Actions indeploy.ymlup to date, grouped into one monthly PR. For example,deploy.ymlstill usesactions/checkout@v3..github/workflows/check-links.yml: checks links with lychee on PRs, on pushes tomainand monthly. It checks the Markdown files and notebooks (./**/*.md,./**/*.ipynb), so it covers the book pages and also the learner notebooks innotebooks/andsolutions-NO-PEEKING/, which aren't part of the built site. Checking the built HTML instead would need the full conda environment and notebook execution in this job, and would also check the theme's own links..lycheeignore: excludeshttps://localhost:8080/, which is Colab'sbase_uriin the cell metadata ofnotebooks/mandelbrot-on-all-accelerators.ipynb, not a link..pre-commit-config.yaml: the org's baseline hooks (pre-commit-hooksincludingcheck-yaml,codespellwith a newcodespell.txt, andblacken-docs), with pre-commit.ci's monthly autoupdate.notebooks/mandelbrot-on-all-accelerators.ipynb, trailing whitespace inarray-oriented-programming/_config.yml, and four typos: "varible" (1-python.md), "invovles" and "dissasembler" (a code comment,2-arrays.md), and "configuation" (text inimg/history-of-bindings-2.svg, shown in4-scaling.md). No code behaviour changes.This replaces the
# no pre-commitconfig from d14b1c5; if you'd rather keep pre-commit off, I can drop these two commits. That placeholder was added for executablebooks/cookiecutter-jupyter-book#46, where pre-commit.ci failed on PRs because the repo had no.pre-commit-config.yaml. With this config the file still exists, and all hooks pass on the whole repo, so pre-commit.ci stays green.All other links work.
Differences from the templates
.github/dependabot.yml: onlygithub-actions. The dependencies are inenvironment.yml, which is a conda file, and Dependabot doesn't support conda..github/workflows/check-links.yml: also checks.ipynbfiles, because much of the lesson lives in notebooks..pre-commit-config.yaml:array-oriented-programming/data/, the datasets the lessons read (otherwise the whitespace hooks would rewriteSMHiggsToZZTo4L.json);--ignore-regex), so it still checks the prose and code in notebooks but not the images in their outputs and attachments, which gave ~60 false positives; it also ignoresdocumenin URLs (documen.tician.dehosts the PyOpenCL docs).codespell.txtis empty because no lesson jargon is flagged;debug-statements, because the repo has no.pyfiles;nbstripout: the book executes the Markdown pages on every build, but it renders5-gpu.ipynbfrom its stored outputs (it's inexecute.exclude_patterns, as a GPU lesson), and the solution notebooks are committed with their outputs;blacken-docsonly sees plain```pythonblocks (three of them, none reformatted), not the{code-cell}blocks that hold most of the lesson code.CONTRIBUTING.md: kept the existing one. It has no dead links and doesn't name a branch.Verification
prek -apasses.check-yamlpasses on the new and existing workflow files../**/*.mdand./**/*.ipynb: 0 errors, 1 URL excluded by.lycheeignore.jupyter-book build -W array-oriented-programmingsucceeds before and after the pre-commit fixes, with theenvironment.ymlconda environment (Jupyter Book 1.0.4.post1, linux-aarch64 in Docker), all notebooks executed. On this slower machine one cell in3-ragged.md(ak.from_parquet) hit the default 30 s cell timeout, so the local builds used a longer timeout. The monthly CI deploys pass with the default.actions/checkoutv7.0.1,lycheeverse/lychee-actionv2.9.0,pre-commit-hooksv6.0.0,codespellv2.4.3,blacken-docs1.20.0.