Skip to content

chore: sync shared config files with org templates - #5

Merged
ariostas merged 3 commits into
mainfrom
chore/sync-shared-files
Nov 4, 2026
Merged

ariostas merged 3 commits into
mainfrom
chore/sync-shared-files

Conversation

@ariostas

@ariostas ariostas commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

🤖 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

  • New .github/dependabot.yml: keeps the GitHub Actions in deploy.yml up to date, grouped into one monthly PR. For example, deploy.yml still uses actions/checkout@v3.
  • New .github/workflows/check-links.yml: checks links with lychee on PRs, on pushes to main and monthly. It checks the Markdown files and notebooks (./**/*.md, ./**/*.ipynb), so it covers the book pages and also the learner notebooks in notebooks/ and solutions-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.
  • New .lycheeignore: excludes https://localhost:8080/, which is Colab's base_uri in the cell metadata of notebooks/mandelbrot-on-all-accelerators.ipynb, not a link.
  • .pre-commit-config.yaml: the org's baseline hooks (pre-commit-hooks including check-yaml, codespell with a new codespell.txt, and blacken-docs), with pre-commit.ci's monthly autoupdate.
  • Pre-commit fixes, in their own commit: a missing final newline in notebooks/mandelbrot-on-all-accelerators.ipynb, trailing whitespace in array-oriented-programming/_config.yml, and four typos: "varible" (1-python.md), "invovles" and "dissasembler" (a code comment, 2-arrays.md), and "configuation" (text in img/history-of-bindings-2.svg, shown in 4-scaling.md). No code behaviour changes.

This replaces the # no pre-commit config 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: only github-actions. The dependencies are in environment.yml, which is a conda file, and Dependabot doesn't support conda.
  • .github/workflows/check-links.yml: also checks .ipynb files, because much of the lesson lives in notebooks.
  • .pre-commit-config.yaml:
    • excludes array-oriented-programming/data/, the datasets the lessons read (otherwise the whitespace hooks would rewrite SMHiggsToZZTo4L.json);
    • codespell ignores runs of 60+ base64 characters (--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 ignores documen in URLs (documen.tician.de hosts the PyOpenCL docs). codespell.txt is empty because no lesson jargon is flagged;
    • no debug-statements, because the repo has no .py files;
    • no nbstripout: the book executes the Markdown pages on every build, but it renders 5-gpu.ipynb from its stored outputs (it's in execute.exclude_patterns, as a GPU lesson), and the solution notebooks are committed with their outputs;
    • blacken-docs only sees plain ```python blocks (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 -a passes.
  • check-yaml passes on the new and existing workflow files.
  • lychee 0.24.2 on ./**/*.md and ./**/*.ipynb: 0 errors, 1 URL excluded by .lycheeignore.
  • jupyter-book build -W array-oriented-programming succeeds before and after the pre-commit fixes, with the environment.yml conda environment (Jupyter Book 1.0.4.post1, linux-aarch64 in Docker), all notebooks executed. On this slower machine one cell in 3-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.
  • Action and hook versions exist: actions/checkout v7.0.1, lycheeverse/lychee-action v2.9.0, pre-commit-hooks v6.0.0, codespell v2.4.3, blacken-docs 1.20.0.

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
@ariostas
ariostas merged commit af92346 into main Nov 4, 2026
2 checks passed
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.

1 participant