From e389ed5a4e0c556e7ce6fcba48daafe4e21764de Mon Sep 17 00:00:00 2001 From: Maciej Olko Date: Thu, 1 Oct 2026 09:50:00 +0200 Subject: [PATCH 01/15] Run pospell/hunspell skipping literal blocks --- .github/workflows/spellcheck.yml | 70 ++++++++++++++++++++++++++ .github/workflows/update-and-build.yml | 11 ++++ 2 files changed, 81 insertions(+) create mode 100644 .github/workflows/spellcheck.yml diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml new file mode 100644 index 0000000000..f678b5b196 --- /dev/null +++ b/.github/workflows/spellcheck.yml @@ -0,0 +1,70 @@ +name: spellcheck + +on: + pull_request: + workflow_dispatch: + workflow_call: + inputs: + version: + description: CPython documentation version + required: true + type: string + translations-ref: + description: Translation branch updated by the calling workflow + required: true + type: string + +permissions: + contents: read + +jobs: + pospell: + runs-on: ubuntu-latest + defaults: + run: + working-directory: cpython/Doc + steps: + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 + with: + python-version: '3.12' + - uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 + - name: Check out CPython documentation + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + repository: python/cpython + ref: ${{ inputs.version || github.base_ref || github.ref_name }} + path: cpython + persist-credentials: false + - name: Check out translations + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + ref: ${{ inputs.translations-ref }} + path: cpython/Doc/locales/pl/LC_MESSAGES + persist-credentials: false + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y hunspell hunspell-pl + make venv + # Pospell needs newer Docutils than the Sphinx used by older branches. + uv venv "$RUNNER_TEMP/spellcheck-venv" + uv pip install --python "$RUNNER_TEMP/spellcheck-venv/bin/python" sphinx-intl pospell + - name: Generate POT files without literal blocks + run: | + if make -n gettext >/dev/null 2>&1; then + make gettext SPHINXOPTS="-D gettext_additional_targets=index -D gettext_compact=False" + else + # CPython 3.10 and 3.11 do not have a dedicated gettext target. + make build BUILDER=gettext SPHINXOPTS="-D gettext_additional_targets=index -D gettext_compact=False" + fi + - name: Update temporary PO files + # Drop obsolete entries so removed literal blocks are not spellchecked. + run: > + "$RUNNER_TEMP/spellcheck-venv/bin/sphinx-intl" update -p build/gettext -d locales + -l pl + --no-obsolete + - name: Check Polish spelling + run: > + "$RUNNER_TEMP/spellcheck-venv/bin/pospell" --language pl + --glob 'locales/pl/LC_MESSAGES/**/*.po' + # PO updates exist only in this disposable checkout; nothing is committed. diff --git a/.github/workflows/update-and-build.yml b/.github/workflows/update-and-build.yml index aa8e6695ba..69de933fdb 100644 --- a/.github/workflows/update-and-build.yml +++ b/.github/workflows/update-and-build.yml @@ -72,6 +72,17 @@ jobs: branch: ${{ matrix.version }} github_token: ${{ secrets.GITHUB_TOKEN }} + spellcheck: + needs: [update] + # These are the runs in which update publishes the fetched translations. + if: github.event_name == 'schedule' || github.ref_name == github.event.repository.default_branch + permissions: + contents: read + uses: ./.github/workflows/spellcheck.yml + with: + version: ${{ github.ref_name }} + translations-ref: ${{ github.ref_name }} + build: runs-on: ubuntu-latest strategy: From 9832a9b7d0a7f72872117eee0518ffd2bce840ba Mon Sep 17 00:00:00 2001 From: Maciej Olko Date: Thu, 1 Oct 2026 22:10:01 +0200 Subject: [PATCH 02/15] Unpin Python version for builds --- .github/workflows/spellcheck.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index f678b5b196..f9a12282d8 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -26,7 +26,7 @@ jobs: steps: - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: - python-version: '3.12' + python-version: 3 - uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 - name: Check out CPython documentation uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 From 81890bfe178914a5a028849095f30f36250f4203 Mon Sep 17 00:00:00 2001 From: Maciej Olko Date: Thu, 1 Oct 2026 22:34:14 +0200 Subject: [PATCH 03/15] Fix gettext_compact=0, use pl_PL for pospell --- .github/workflows/spellcheck.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index f9a12282d8..98539b1c34 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -52,10 +52,10 @@ jobs: - name: Generate POT files without literal blocks run: | if make -n gettext >/dev/null 2>&1; then - make gettext SPHINXOPTS="-D gettext_additional_targets=index -D gettext_compact=False" + make gettext SPHINXOPTS="-D gettext_additional_targets=index -D gettext_compact=0" else # CPython 3.10 and 3.11 do not have a dedicated gettext target. - make build BUILDER=gettext SPHINXOPTS="-D gettext_additional_targets=index -D gettext_compact=False" + make build BUILDER=gettext SPHINXOPTS="-D gettext_additional_targets=index -D gettext_compact=0" fi - name: Update temporary PO files # Drop obsolete entries so removed literal blocks are not spellchecked. @@ -65,6 +65,6 @@ jobs: --no-obsolete - name: Check Polish spelling run: > - "$RUNNER_TEMP/spellcheck-venv/bin/pospell" --language pl + "$RUNNER_TEMP/spellcheck-venv/bin/pospell" --language pl_PL --glob 'locales/pl/LC_MESSAGES/**/*.po' # PO updates exist only in this disposable checkout; nothing is committed. From 2f1e1106722fe996935a804ba7b8a2970ac6448b Mon Sep 17 00:00:00 2001 From: Maciej Olko Date: Thu, 1 Oct 2026 22:45:12 +0200 Subject: [PATCH 04/15] Prepare UTF-8 Polish dictionary By default, ISO-8859-2 is used, for it the check fails on some documentation characters. --- .github/workflows/spellcheck.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index 98539b1c34..d232cc97da 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -49,6 +49,16 @@ jobs: # Pospell needs newer Docutils than the Sphinx used by older branches. uv venv "$RUNNER_TEMP/spellcheck-venv" uv pip install --python "$RUNNER_TEMP/spellcheck-venv/bin/python" sphinx-intl pospell + - name: Prepare UTF-8 Polish dictionary + # The packaged dictionary uses ISO-8859-2, which cannot represent all prose. + run: | + mkdir -p "$RUNNER_TEMP/hunspell-utf8" + dictionary_encoding=$(sed -n 's/^SET //p' /usr/share/hunspell/pl_PL.aff) + iconv -f "$dictionary_encoding" -t UTF-8 /usr/share/hunspell/pl_PL.aff \ + > "$RUNNER_TEMP/hunspell-utf8/pl_PL.aff" + sed -i 's/^SET .*/SET UTF-8/' "$RUNNER_TEMP/hunspell-utf8/pl_PL.aff" + iconv -f "$dictionary_encoding" -t UTF-8 /usr/share/hunspell/pl_PL.dic \ + > "$RUNNER_TEMP/hunspell-utf8/pl_PL.dic" - name: Generate POT files without literal blocks run: | if make -n gettext >/dev/null 2>&1; then @@ -64,6 +74,8 @@ jobs: -l pl --no-obsolete - name: Check Polish spelling + env: + DICPATH: ${{ runner.temp }}/hunspell-utf8 run: > "$RUNNER_TEMP/spellcheck-venv/bin/pospell" --language pl_PL --glob 'locales/pl/LC_MESSAGES/**/*.po' From 929849d439164a3c433c150cdf3deb05d1d5d02a Mon Sep 17 00:00:00 2001 From: Maciej Olko Date: Fri, 2 Oct 2026 00:20:39 +0200 Subject: [PATCH 05/15] Add Transifex glossary terms as hunspell personal dict --- .github/workflows/spellcheck.yml | 16 ++++- .github/workflows/update-and-build.yml | 2 + manage_translation.py | 84 +++++++++++++++++++++++++- 3 files changed, 100 insertions(+), 2 deletions(-) diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index d232cc97da..0b63bffae8 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -13,6 +13,10 @@ on: description: Translation branch updated by the calling workflow required: true type: string + secrets: + TX_TOKEN: + description: Transifex API token with access to the Polish terminology glossary + required: true permissions: contents: read @@ -20,6 +24,7 @@ permissions: jobs: pospell: runs-on: ubuntu-latest + timeout-minutes: 15 defaults: run: working-directory: cpython/Doc @@ -48,7 +53,7 @@ jobs: make venv # Pospell needs newer Docutils than the Sphinx used by older branches. uv venv "$RUNNER_TEMP/spellcheck-venv" - uv pip install --python "$RUNNER_TEMP/spellcheck-venv/bin/python" sphinx-intl pospell + uv pip install --python "$RUNNER_TEMP/spellcheck-venv/bin/python" sphinx-intl pospell transifex-python six - name: Prepare UTF-8 Polish dictionary # The packaged dictionary uses ISO-8859-2, which cannot represent all prose. run: | @@ -59,6 +64,14 @@ jobs: sed -i 's/^SET .*/SET UTF-8/' "$RUNNER_TEMP/hunspell-utf8/pl_PL.aff" iconv -f "$dictionary_encoding" -t UTF-8 /usr/share/hunspell/pl_PL.dic \ > "$RUNNER_TEMP/hunspell-utf8/pl_PL.dic" + - name: Download Polish terminology glossary + working-directory: cpython/Doc/locales/pl/LC_MESSAGES + env: + TX_TOKEN: ${{ secrets.TX_TOKEN }} + run: > + "$RUNNER_TEMP/spellcheck-venv/bin/python" + manage_translation.py fetch_glossary + --output "$RUNNER_TEMP/hunspell-glossary.dic" - name: Generate POT files without literal blocks run: | if make -n gettext >/dev/null 2>&1; then @@ -78,5 +91,6 @@ jobs: DICPATH: ${{ runner.temp }}/hunspell-utf8 run: > "$RUNNER_TEMP/spellcheck-venv/bin/pospell" --language pl_PL + --personal-dict "$RUNNER_TEMP/hunspell-glossary.dic" --glob 'locales/pl/LC_MESSAGES/**/*.po' # PO updates exist only in this disposable checkout; nothing is committed. diff --git a/.github/workflows/update-and-build.yml b/.github/workflows/update-and-build.yml index 69de933fdb..35db305289 100644 --- a/.github/workflows/update-and-build.yml +++ b/.github/workflows/update-and-build.yml @@ -82,6 +82,8 @@ jobs: with: version: ${{ github.ref_name }} translations-ref: ${{ github.ref_name }} + secrets: + TX_TOKEN: ${{ secrets.TX_TOKEN }} build: runs-on: ubuntu-latest diff --git a/manage_translation.py b/manage_translation.py index 0266629e44..2a209bbff6 100755 --- a/manage_translation.py +++ b/manage_translation.py @@ -12,24 +12,33 @@ # * recreate_tx_config: recreate configuration for all resources. # * warn_about_files_to_delete: lists files that are not available upstream # * generate_commit_msg: generates commit message with co-authors +# * fetch_glossary: download Polish terminology as a Hunspell personal dictionary from argparse import ArgumentParser +import csv +import io import os from contextlib import chdir from dataclasses import dataclass from pathlib import Path +import re from subprocess import call, run, CalledProcessError import sys from tempfile import TemporaryDirectory +import time from typing import Self, Iterable +import unicodedata from warnings import warn from polib import pofile, POFile +import requests from transifex.api import transifex_api +from transifex.api.jsonapi.exceptions import JsonApiException LANGUAGE = 'pl' PROJECT_SLUG = 'python-newest' VERSION = '3.14' +GLOSSARY_ID = 'o:python-doc:g:python_global' def fetch(): @@ -45,6 +54,59 @@ def fetch(): _call(f'msgcat --no-location -o {file} {file}') +def _download_glossary(token: str, *, max_wait: float = 300) -> str: + transifex_api.setup(auth=token) + # The SDK supports new API resource types before adding dedicated classes. + download = transifex_api.new( + type='glossaries_async_downloads', + glossary=transifex_api.new(type='glossaries', id=GLOSSARY_ID), + language=transifex_api.Language(id=f'l:{LANGUAGE}'), + ) + download.save() + deadline = time.monotonic() + max_wait + while not download.redirect: + status = download.attributes['status'] + if status == 'failed': + raise ValueError('Transifex glossary export failed.') + if status not in {'pending', 'processing'}: + raise ValueError(f'Unexpected glossary export status: {status!r}') + if time.monotonic() >= deadline: + raise ValueError('Transifex glossary export timed out.') + time.sleep(3) + download.reload() + # Download the CSV without sending the API token to the signed storage URL. + export = requests.get(download.redirect, timeout=30) + export.raise_for_status() + return export.content.decode('utf-8-sig') + + +def _glossary_words(content: str) -> list[str]: + reader = csv.DictReader(io.StringIO(content)) + translation_column = f'translation_{LANGUAGE}' + if not reader.fieldnames or translation_column not in reader.fieldnames: + raise ValueError('Transifex glossary CSV has no Polish translation column.') + words = { + word + for row in reader + for word in re.findall( + r'[^\W\d_]+', unicodedata.normalize('NFC', row[translation_column] or '') + ) + } + if not words: + raise ValueError('Transifex glossary has no Polish terms.') + return sorted(words) + + +def fetch_glossary(output: Path): + """Fetch Polish terminology and write a UTF-8 Hunspell personal dictionary.""" + token = _get_tx_token().strip() + if not token: + raise ValueError('TX_TOKEN is required to download the Transifex glossary.') + words = _glossary_words(_download_glossary(token)) + output.write_text(f'{len(words)}\n' + '\n'.join(words) + '\n', encoding='utf-8') + print(f'Added {len(words)} Polish glossary words to {output}.') + + def _call(command: str): if (return_code := call(command, shell=True)) != 0: exit(return_code) @@ -223,10 +285,30 @@ def generate_commit_msg(): 'recreate_tx_config', 'warn_about_files_to_delete', 'generate_commit_msg', + 'fetch_glossary', ) parser = ArgumentParser() parser.add_argument('cmd', choices=RUNNABLE_SCRIPTS) + parser.add_argument( + '--output', type=Path, help='Hunspell dictionary path for fetch_glossary' + ) options = parser.parse_args() - eval(options.cmd)() + if options.cmd == 'fetch_glossary': + if options.output is None: + parser.error('--output is required for fetch_glossary') + try: + fetch_glossary(options.output) + except (requests.RequestException, JsonApiException) as error: + # Exceptions may contain signed URLs; report the status without those URLs. + status = ( + error.response.status_code + if error.response is not None + else 'network error' + ) + parser.exit(1, f'Transifex glossary request failed: {status}.\n') + except (ValueError, KeyError) as error: + parser.exit(1, f'Invalid Transifex glossary export: {error}\n') + else: + eval(options.cmd)() From b86087701ea32a76e39f1d7831b00ca60a4f38b2 Mon Sep 17 00:00:00 2001 From: Maciej Olko Date: Thu, 8 Oct 2026 00:46:44 +0200 Subject: [PATCH 06/15] Add SJP dictionary to Polish spellcheck --- .github/workflows/spellcheck.yml | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index 0b63bffae8..fda7908f75 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -49,7 +49,7 @@ jobs: - name: Install dependencies run: | sudo apt-get update - sudo apt-get install -y hunspell hunspell-pl + sudo apt-get install -y curl hunspell hunspell-pl unzip make venv # Pospell needs newer Docutils than the Sphinx used by older branches. uv venv "$RUNNER_TEMP/spellcheck-venv" @@ -64,6 +64,26 @@ jobs: sed -i 's/^SET .*/SET UTF-8/' "$RUNNER_TEMP/hunspell-utf8/pl_PL.aff" iconv -f "$dictionary_encoding" -t UTF-8 /usr/share/hunspell/pl_PL.dic \ > "$RUNNER_TEMP/hunspell-utf8/pl_PL.dic" + - name: Download SJP Polish dictionary + run: | + curl --fail --location --retry 3 \ + https://sjp.pl/sl/ort/sjp-hunspell-pl-20260901.zip \ + --output "$RUNNER_TEMP/sjp-hunspell.zip" + echo "47a5ab02cf3def374994b1b03efd9fed2de868349b8ddcebac281b484353d157 $RUNNER_TEMP/sjp-hunspell.zip" \ + | sha256sum --check --strict + # SJP wraps the dictionary files in a second ZIP archive. + unzip -p "$RUNNER_TEMP/sjp-hunspell.zip" pl_PL.zip \ + > "$RUNNER_TEMP/sjp-pl_PL.zip" + unzip -p "$RUNNER_TEMP/sjp-pl_PL.zip" pl_PL.aff \ + > "$RUNNER_TEMP/sjp-pl_PL.aff" + unzip -p "$RUNNER_TEMP/sjp-pl_PL.zip" pl_PL.dic \ + > "$RUNNER_TEMP/sjp-pl_PL.dic" + dictionary_encoding=$(sed -n 's/^SET //p' "$RUNNER_TEMP/sjp-pl_PL.aff") + iconv -f "$dictionary_encoding" -t UTF-8 "$RUNNER_TEMP/sjp-pl_PL.aff" \ + > "$RUNNER_TEMP/hunspell-utf8/pl_SJP.aff" + sed -i 's/^SET .*/SET UTF-8/' "$RUNNER_TEMP/hunspell-utf8/pl_SJP.aff" + iconv -f "$dictionary_encoding" -t UTF-8 "$RUNNER_TEMP/sjp-pl_PL.dic" \ + > "$RUNNER_TEMP/hunspell-utf8/pl_SJP.dic" - name: Download Polish terminology glossary working-directory: cpython/Doc/locales/pl/LC_MESSAGES env: @@ -90,7 +110,7 @@ jobs: env: DICPATH: ${{ runner.temp }}/hunspell-utf8 run: > - "$RUNNER_TEMP/spellcheck-venv/bin/pospell" --language pl_PL + "$RUNNER_TEMP/spellcheck-venv/bin/pospell" --language pl_PL,pl_SJP --personal-dict "$RUNNER_TEMP/hunspell-glossary.dic" --glob 'locales/pl/LC_MESSAGES/**/*.po' # PO updates exist only in this disposable checkout; nothing is committed. From 7a17096e1f2e99a6455670f017ed009c1efe5969 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 8 Oct 2026 06:52:16 +0000 Subject: [PATCH 07/15] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- manage_translation.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/manage_translation.py b/manage_translation.py index 1f5d87963f..c9538cdd61 100755 --- a/manage_translation.py +++ b/manage_translation.py @@ -14,25 +14,25 @@ # * generate_commit_msg: generates commit message with co-authors # * fetch_glossary: download Polish terminology as a Hunspell personal dictionary -from argparse import ArgumentParser -from collections.abc import Iterable -from contextlib import chdir import csv -from dataclasses import dataclass import io import os -from pathlib import Path import re -from subprocess import CalledProcessError, call, run import sys -from tempfile import TemporaryDirectory import time -from typing import Self, Iterable import unicodedata +from argparse import ArgumentParser +from collections.abc import Iterable +from contextlib import chdir +from dataclasses import dataclass +from pathlib import Path +from subprocess import CalledProcessError, call, run +from tempfile import TemporaryDirectory +from typing import Self from warnings import warn -from polib import POFile, pofile import requests +from polib import POFile, pofile from transifex.api import transifex_api from transifex.api.jsonapi.exceptions import JsonApiException From 66d52715578ae3164114515ae6a911295050fe21 Mon Sep 17 00:00:00 2001 From: Maciej Olko Date: Thu, 8 Oct 2026 08:56:41 +0200 Subject: [PATCH 08/15] Use GitHub's dedicated self-repository syntax for spellcheck.uses in update-and-build --- .github/workflows/update-and-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-and-build.yml b/.github/workflows/update-and-build.yml index 03dd8e5154..09827a5fa2 100644 --- a/.github/workflows/update-and-build.yml +++ b/.github/workflows/update-and-build.yml @@ -78,7 +78,7 @@ jobs: if: github.event_name == 'schedule' || github.ref_name == github.event.repository.default_branch permissions: contents: read - uses: ./.github/workflows/spellcheck.yml + uses: $/.github/workflows/spellcheck.yml with: version: ${{ github.ref_name }} translations-ref: ${{ github.ref_name }} From 008caada61c819414fd6831dd2e91feb1bdf5981 Mon Sep 17 00:00:00 2001 From: Maciej Olko Date: Mon, 19 Oct 2026 23:32:24 +0200 Subject: [PATCH 09/15] Update spellcheck workflow reference to absolute --- .github/workflows/update-and-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-and-build.yml b/.github/workflows/update-and-build.yml index 09827a5fa2..c3be46d5a3 100644 --- a/.github/workflows/update-and-build.yml +++ b/.github/workflows/update-and-build.yml @@ -78,7 +78,7 @@ jobs: if: github.event_name == 'schedule' || github.ref_name == github.event.repository.default_branch permissions: contents: read - uses: $/.github/workflows/spellcheck.yml + uses: python/python-docs-pl/.github/workflows/spellcheck.yml@3.15 with: version: ${{ github.ref_name }} translations-ref: ${{ github.ref_name }} From a157f61d4fbf3b97b2659003031fe59cfe3d3219 Mon Sep 17 00:00:00 2001 From: Maciej Olko Date: Tue, 20 Oct 2026 00:12:00 +0200 Subject: [PATCH 10/15] Use self-repository workflow syntax with scoped actionlint ignore --- .github/actionlint.yaml | 6 ++++++ .github/workflows/update-and-build.yml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .github/actionlint.yaml diff --git a/.github/actionlint.yaml b/.github/actionlint.yaml new file mode 100644 index 0000000000..3cf21c4c52 --- /dev/null +++ b/.github/actionlint.yaml @@ -0,0 +1,6 @@ +paths: + .github/workflows/update-and-build.yml: + ignore: + # Remove once https://github.com/rhysd/actionlint/pull/732 is released. + - ^reusable workflow call "\$/\.github/workflows/spellcheck\.yml" at "uses" is not following + the format diff --git a/.github/workflows/update-and-build.yml b/.github/workflows/update-and-build.yml index c3be46d5a3..09827a5fa2 100644 --- a/.github/workflows/update-and-build.yml +++ b/.github/workflows/update-and-build.yml @@ -78,7 +78,7 @@ jobs: if: github.event_name == 'schedule' || github.ref_name == github.event.repository.default_branch permissions: contents: read - uses: python/python-docs-pl/.github/workflows/spellcheck.yml@3.15 + uses: $/.github/workflows/spellcheck.yml with: version: ${{ github.ref_name }} translations-ref: ${{ github.ref_name }} From 72bcd0676b62d7d927ff4a96b9ae86c57afbcedb Mon Sep 17 00:00:00 2001 From: Maciej Olko Date: Tue, 20 Oct 2026 00:59:25 +0200 Subject: [PATCH 11/15] Make post-update spellcheck advisory --- .github/workflows/spellcheck.yml | 5 +++++ .github/workflows/update-and-build.yml | 1 + 2 files changed, 6 insertions(+) diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index fda7908f75..8a755dc892 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -5,6 +5,10 @@ on: workflow_dispatch: workflow_call: inputs: + advisory: + description: Report failures without failing the calling workflow + type: boolean + default: false version: description: CPython documentation version required: true @@ -24,6 +28,7 @@ permissions: jobs: pospell: runs-on: ubuntu-latest + continue-on-error: ${{ inputs.advisory || false }} timeout-minutes: 15 defaults: run: diff --git a/.github/workflows/update-and-build.yml b/.github/workflows/update-and-build.yml index 09827a5fa2..b2f225c6a1 100644 --- a/.github/workflows/update-and-build.yml +++ b/.github/workflows/update-and-build.yml @@ -80,6 +80,7 @@ jobs: contents: read uses: $/.github/workflows/spellcheck.yml with: + advisory: true version: ${{ github.ref_name }} translations-ref: ${{ github.ref_name }} secrets: From bbf2298e8dd14064bc2947f3b0ca953248991e9c Mon Sep 17 00:00:00 2001 From: Maciej Olko Date: Sat, 21 Nov 2026 17:41:16 +0100 Subject: [PATCH 12/15] Make standalone spellcheck advisory --- .github/workflows/spellcheck.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index 8a755dc892..614ae9e307 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -8,7 +8,7 @@ on: advisory: description: Report failures without failing the calling workflow type: boolean - default: false + default: true version: description: CPython documentation version required: true @@ -28,7 +28,7 @@ permissions: jobs: pospell: runs-on: ubuntu-latest - continue-on-error: ${{ inputs.advisory || false }} + continue-on-error: ${{ inputs.advisory || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }} timeout-minutes: 15 defaults: run: From 0aae950c3796e0d50091e4395fba2c060d8048bb Mon Sep 17 00:00:00 2001 From: Maciej Olko Date: Sat, 21 Nov 2026 19:11:58 +0100 Subject: [PATCH 13/15] Publish pospell JSON reports for translation priorities --- .github/workflows/spellcheck.yml | 42 ++++++++- SPELLCHECK_REPORT.md | 53 +++++++++++ spellcheck_report.py | 99 +++++++++++++++++++++ tests/test_spellcheck_report.py | 146 +++++++++++++++++++++++++++++++ 4 files changed, 338 insertions(+), 2 deletions(-) create mode 100644 SPELLCHECK_REPORT.md create mode 100644 spellcheck_report.py create mode 100644 tests/test_spellcheck_report.py diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index 614ae9e307..56bb7128ce 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -38,6 +38,15 @@ jobs: with: python-version: 3 - uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 + - name: Check out workflow tools + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + path: spellcheck-tools + sparse-checkout: | + /spellcheck_report.py + /manage_translation.py + sparse-checkout-cone-mode: false + persist-credentials: false - name: Check out CPython documentation uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: @@ -58,7 +67,10 @@ jobs: make venv # Pospell needs newer Docutils than the Sphinx used by older branches. uv venv "$RUNNER_TEMP/spellcheck-venv" - uv pip install --python "$RUNNER_TEMP/spellcheck-venv/bin/python" sphinx-intl pospell transifex-python six + # Pospell PR 24 provides --report; switch to a release when available. + uv pip install --python "$RUNNER_TEMP/spellcheck-venv/bin/python" \ + sphinx-intl transifex-python six \ + 'pospell @ git+https://git.afpy.org/maciek/pospell.git@feat/json-reports' - name: Prepare UTF-8 Polish dictionary # The packaged dictionary uses ISO-8859-2, which cannot represent all prose. run: | @@ -90,7 +102,7 @@ jobs: iconv -f "$dictionary_encoding" -t UTF-8 "$RUNNER_TEMP/sjp-pl_PL.dic" \ > "$RUNNER_TEMP/hunspell-utf8/pl_SJP.dic" - name: Download Polish terminology glossary - working-directory: cpython/Doc/locales/pl/LC_MESSAGES + working-directory: spellcheck-tools env: TX_TOKEN: ${{ secrets.TX_TOKEN }} run: > @@ -105,6 +117,11 @@ jobs: # CPython 3.10 and 3.11 do not have a dedicated gettext target. make build BUILDER=gettext SPHINXOPTS="-D gettext_additional_targets=index -D gettext_compact=0" fi + - name: Record original translation checksums + run: > + python "$GITHUB_WORKSPACE/spellcheck-tools/spellcheck_report.py" snapshot + --translations locales/pl/LC_MESSAGES --cpython . + --output "$RUNNER_TEMP/spellcheck-source.json" - name: Update temporary PO files # Drop obsolete entries so removed literal blocks are not spellchecked. run: > @@ -112,10 +129,31 @@ jobs: -l pl --no-obsolete - name: Check Polish spelling + id: spelling env: DICPATH: ${{ runner.temp }}/hunspell-utf8 run: > "$RUNNER_TEMP/spellcheck-venv/bin/pospell" --language pl_PL,pl_SJP --personal-dict "$RUNNER_TEMP/hunspell-glossary.dic" --glob 'locales/pl/LC_MESSAGES/**/*.po' + --report "$RUNNER_TEMP/pospell.json" + --report-root locales/pl/LC_MESSAGES + - name: Prepare spelling report + id: report + if: ${{ !cancelled() && (steps.spelling.outcome == 'success' || steps.spelling.outcome == 'failure') }} + env: + DOCS_VERSION: ${{ inputs.version || github.base_ref || github.ref_name }} + run: > + python "$GITHUB_WORKSPACE/spellcheck-tools/spellcheck_report.py" prepare + --input "$RUNNER_TEMP/pospell.json" + --snapshot "$RUNNER_TEMP/spellcheck-source.json" + --docs-version "$DOCS_VERSION" + --output "$RUNNER_TEMP/spellcheck.json" + - name: Upload spelling report + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + if: ${{ !cancelled() && steps.report.outcome == 'success' }} + with: + name: spellcheck-pl + path: ${{ runner.temp }}/spellcheck.json + if-no-files-found: error # PO updates exist only in this disposable checkout; nothing is committed. diff --git a/SPELLCHECK_REPORT.md b/SPELLCHECK_REPORT.md new file mode 100644 index 0000000000..ea55426b2c --- /dev/null +++ b/SPELLCHECK_REPORT.md @@ -0,0 +1,53 @@ +# Spellcheck reports + +The spellcheck workflow publishes a `spellcheck-pl` Actions artifact containing +`spellcheck.json`. It uses pospell's JSON report from +[PR #24](https://git.afpy.org/AFPy/pospell/pulls/24), installed from the +[`feat/json-reports` branch on maciek's fork](https://git.afpy.org/maciek/pospell/src/branch/feat/json-reports) +until a release includes that feature. +Normal text diagnostics remain in the job log. Spelling findings still produce +a failing step, but the job is advisory by default. The report is prepared and +uploaded even when that step fails. + +## Schema version 1 + +The report preserves pospell's `schema_version`, `status`, `created_at`, `checker` +and findings. `spellcheck_report.py` adds or adapts: + +- `language`: `pl`, the translation language expected by consumers. +- `dictionaries`: pospell's dictionary names, currently `pl_PL` and `pl_SJP`. +- `repository`: the GitHub repository name, such as `python/python-docs-pl`. +- `docs_version`: the documentation branch checked, such as `3.15`. +- `run_url`: the Actions run URL. +- `translations_revision` and `cpython_revision`: the checked-out Git commits. +- `catalogs`: resources keyed by POSIX paths relative to the translation root, + such as `tutorial/guide.po`. + +Each catalog contains: + +- `source_sha256`: SHA-256 of the original PO file, recorded before the temporary + `sphinx-intl update`. Consumers compare it with their repository checkout to + determine whether coverage is current. +- `scanned_sha256`: pospell's SHA-256 of the temporarily updated PO file. +- `findings`: pospell's results, with `msgctxt`, `msgid`, `msgid_plural`, + `msgstr_sha256`, and unique `words` for each affected entry. + +`msgstr_sha256` hashes the checked translation as UTF-8 JSON of +`{"msgstr": entry.msgstr, "msgstr_plural": {str(k): v, ...}}`, serialized with +`ensure_ascii=False`, `sort_keys=True`, and `separators=(',', ':')`. Consumers +should match both the entry identity and this fingerprint before using a finding. + +Only catalogs present both in the original checkout and in pospell's report are +published. Clean scanned catalogs retain empty `findings`; unscanned files are +not added as clean. The scan covers prose and excludes literal blocks through +the temporary gettext update. A checked catalog does not imply that every token +or plural form was checked. + +`status: "complete"` means the scan finished, including scans that found spelling +issues. `status: "error"` means it failed, and its findings must not be used as +complete coverage. Failures before pospell can write its JSON, or failures during +report preparation, leave no artifact. Missing reports mean unavailable coverage. + +`potodo-docs-priority` downloads the artifact separately. It validates the source +run, selects complete reports for its requested branch, and checks local entry +identities and fingerprints. This workflow requires no dispatch to that project. diff --git a/spellcheck_report.py b/spellcheck_report.py new file mode 100644 index 0000000000..b53d0c31c1 --- /dev/null +++ b/spellcheck_report.py @@ -0,0 +1,99 @@ +"""Adapt pospell's JSON report for translation-priority consumers.""" + +import argparse +import hashlib +import json +import os +import subprocess +from pathlib import Path + + +def revision(root: Path) -> str: + return subprocess.check_output( + ['git', '-C', str(root), 'rev-parse', 'HEAD'], text=True + ).strip() + + +def snapshot_catalogs(translations: Path, cpython: Path) -> dict: + """Record repository identities before sphinx-intl rewrites temporary POs.""" + return { + 'translations_revision': revision(translations), + 'cpython_revision': revision(cpython), + 'catalogs': { + path.relative_to(translations).as_posix(): hashlib.sha256( + path.read_bytes() + ).hexdigest() + for path in sorted(translations.rglob('*.po')) + }, + } + + +def prepare_report( + report: dict, + snapshot: dict, + *, + docs_version: str, + repository: str, + run_url: str, +) -> dict: + """Keep pospell findings intact while describing the original checkout.""" + if report.get('schema_version') != 1: + raise ValueError('Unsupported pospell report schema') + if report.get('status') not in {'complete', 'error'}: + raise ValueError('Invalid pospell report status') + return { + **report, + 'language': 'pl', + 'dictionaries': report['language'].split(','), + 'repository': repository, + 'docs_version': docs_version, + 'run_url': run_url, + 'translations_revision': snapshot['translations_revision'], + 'cpython_revision': snapshot['cpython_revision'], + 'catalogs': { + resource: { + **catalog, + 'scanned_sha256': catalog['source_sha256'], + 'source_sha256': snapshot['catalogs'][resource], + } + for resource, catalog in report['catalogs'].items() + # Newly created catalogs have no corresponding repository file. + if resource in snapshot['catalogs'] + }, + } + + +def main() -> None: + parser = argparse.ArgumentParser(description=__doc__) + commands = parser.add_subparsers(dest='command', required=True) + snapshot_parser = commands.add_parser('snapshot') + snapshot_parser.add_argument('--translations', type=Path, required=True) + snapshot_parser.add_argument('--cpython', type=Path, required=True) + snapshot_parser.add_argument('--output', type=Path, required=True) + report_parser = commands.add_parser('prepare') + report_parser.add_argument('--input', type=Path, required=True) + report_parser.add_argument('--snapshot', type=Path, required=True) + report_parser.add_argument('--docs-version', required=True) + report_parser.add_argument('--output', type=Path, required=True) + args = parser.parse_args() + if args.command == 'snapshot': + data = snapshot_catalogs(args.translations, args.cpython) + else: + data = prepare_report( + json.loads(args.input.read_text(encoding='utf-8')), + json.loads(args.snapshot.read_text(encoding='utf-8')), + docs_version=args.docs_version, + repository=os.environ['GITHUB_REPOSITORY'], + run_url=( + f'{os.environ["GITHUB_SERVER_URL"]}/' + f'{os.environ["GITHUB_REPOSITORY"]}/actions/runs/' + f'{os.environ["GITHUB_RUN_ID"]}' + ), + ) + args.output.write_text( + json.dumps(data, ensure_ascii=False, indent=2) + '\n', encoding='utf-8' + ) + + +if __name__ == '__main__': + main() diff --git a/tests/test_spellcheck_report.py b/tests/test_spellcheck_report.py new file mode 100644 index 0000000000..6223f4124d --- /dev/null +++ b/tests/test_spellcheck_report.py @@ -0,0 +1,146 @@ +import copy +import hashlib +import json +import os +import tempfile +import unittest +from pathlib import Path +from unittest.mock import patch + +from spellcheck_report import main, prepare_report, snapshot_catalogs + + +class SpellcheckReportTests(unittest.TestCase): + def setUp(self): + self.directory = tempfile.TemporaryDirectory() + self.addCleanup(self.directory.cleanup) + self.root = Path(self.directory.name) + self.catalog = self.root / 'tutorial' / 'guide.po' + self.catalog.parent.mkdir() + self.catalog.write_text('msgid "Source"\nmsgstr "Błont"\n', encoding='utf-8') + with patch( + 'spellcheck_report.revision', side_effect=['translations', 'cpython'] + ): + self.snapshot = snapshot_catalogs(self.root, self.root) + self.finding = { + 'msgctxt': None, + 'msgid': 'Source', + 'msgid_plural': '', + 'msgstr_sha256': 'translation-digest', + 'words': ['Błont'], + } + self.raw = { + 'schema_version': 1, + 'status': 'complete', + 'created_at': '2026-11-21T00:00:00+00:00', + 'language': 'pl_PL,pl_SJP', + 'checker': {'pospell': '1.3', 'hunspell': 'test'}, + 'catalogs': { + 'tutorial/guide.po': { + 'source_sha256': 'temporary-po-digest', + 'findings': [self.finding], + }, + }, + } + + def prepare(self, raw=None): + return prepare_report( + self.raw if raw is None else raw, + self.snapshot, + docs_version='3.15', + repository='python/python-docs-pl', + run_url='https://github.com/python/python-docs-pl/actions/runs/123', + ) + + def test_original_checksum_survives_temporary_po_update(self): + original = hashlib.sha256(self.catalog.read_bytes()).hexdigest() + self.catalog.write_text('# temporary changes\n', encoding='utf-8') + result = self.prepare() + catalog = result['catalogs']['tutorial/guide.po'] + self.assertEqual(catalog['source_sha256'], original) + self.assertEqual(catalog['scanned_sha256'], 'temporary-po-digest') + self.assertEqual(catalog['findings'], [self.finding]) + self.assertEqual(result['language'], 'pl') + self.assertEqual(result['dictionaries'], ['pl_PL', 'pl_SJP']) + self.assertEqual(result['translations_revision'], 'translations') + self.assertEqual(result['cpython_revision'], 'cpython') + self.assertEqual(result['checker'], self.raw['checker']) + + def test_clean_scanned_catalogs_are_kept_but_unscanned_ones_are_not_added(self): + raw = copy.deepcopy(self.raw) + raw['catalogs']['tutorial/guide.po']['findings'] = [] + self.snapshot['catalogs']['unscanned.po'] = 'unscanned-digest' + raw['catalogs']['new.po'] = {'source_sha256': 'new', 'findings': []} + result = self.prepare(raw) + self.assertEqual(set(result['catalogs']), {'tutorial/guide.po'}) + self.assertEqual(result['catalogs']['tutorial/guide.po']['findings'], []) + + def test_error_report_is_not_promoted_to_complete(self): + self.raw.update(status='error', error='Hunspell failed') + result = self.prepare() + self.assertEqual(result['status'], 'error') + self.assertEqual(result['error'], 'Hunspell failed') + + def test_unsupported_or_invalid_reports_are_rejected(self): + for field, value in [('schema_version', 2), ('status', 'success')]: + with self.subTest(field=field), self.assertRaises(ValueError): + self.prepare({**self.raw, field: value}) + + def test_cli_adds_metadata_and_preserves_non_ascii_findings(self): + raw = self.root / 'pospell.json' + state = self.root / 'snapshot.json' + output = self.root / 'spellcheck.json' + raw.write_text(json.dumps(self.raw), encoding='utf-8') + state.write_text(json.dumps(self.snapshot), encoding='utf-8') + with ( + patch.dict( + os.environ, + { + 'GITHUB_REPOSITORY': 'python/python-docs-pl', + 'GITHUB_SERVER_URL': 'https://github.com', + 'GITHUB_RUN_ID': '123', + }, + ), + patch( + 'sys.argv', + [ + 'spellcheck_report.py', + 'prepare', + '--input', + str(raw), + '--snapshot', + str(state), + '--docs-version', + '3.15', + '--output', + str(output), + ], + ), + ): + main() + result = json.loads(output.read_text(encoding='utf-8')) + self.assertEqual(result, self.prepare()) + self.assertIn('Błont', output.read_text(encoding='utf-8')) + + def test_missing_pospell_report_cannot_become_a_clean_report(self): + output = self.root / 'spellcheck.json' + with ( + patch( + 'sys.argv', + [ + 'spellcheck_report.py', + 'prepare', + '--input', + str(self.root / 'missing.json'), + '--snapshot', + str(self.root / 'snapshot.json'), + '--docs-version', + '3.15', + '--output', + str(output), + ], + ), + self.assertRaises(FileNotFoundError), + ): + main() + self.assertFalse(output.exists()) From 839039d017a33ca1f5a0f6c2026791b36820c158 Mon Sep 17 00:00:00 2001 From: Maciej Olko Date: Sun, 22 Nov 2026 00:21:12 +0100 Subject: [PATCH 14/15] Focus spellcheck report docs on repository integration --- SPELLCHECK_REPORT.md | 52 +++++++++++++++----------------------------- 1 file changed, 18 insertions(+), 34 deletions(-) diff --git a/SPELLCHECK_REPORT.md b/SPELLCHECK_REPORT.md index ea55426b2c..ccb79c41ed 100644 --- a/SPELLCHECK_REPORT.md +++ b/SPELLCHECK_REPORT.md @@ -1,18 +1,19 @@ # Spellcheck reports The spellcheck workflow publishes a `spellcheck-pl` Actions artifact containing -`spellcheck.json`. It uses pospell's JSON report from -[PR #24](https://git.afpy.org/AFPy/pospell/pulls/24), installed from the -[`feat/json-reports` branch on maciek's fork](https://git.afpy.org/maciek/pospell/src/branch/feat/json-reports) -until a release includes that feature. -Normal text diagnostics remain in the job log. Spelling findings still produce -a failing step, but the job is advisory by default. The report is prepared and -uploaded even when that step fails. +`spellcheck.json`. Pospell is installed from `maciek/pospell@feat/json-reports` +until a release includes JSON reports. See the +[pospell documentation](https://git.afpy.org/maciek/pospell/src/branch/feat/json-reports/README.md) +for the report schema, finding identities, translation fingerprints, and statuses. -## Schema version 1 +Normal text diagnostics remain in the job log. The report is prepared and uploaded +even when spelling findings cause the check step to fail; the job is advisory by +default. If pospell cannot write its JSON or report preparation fails, no artifact +is published. -The report preserves pospell's `schema_version`, `status`, `created_at`, `checker` -and findings. `spellcheck_report.py` adds or adapts: +## Integration fields + +`spellcheck_report.py` preserves pospell's schema-v1 findings and adds or adapts: - `language`: `pl`, the translation language expected by consumers. - `dictionaries`: pospell's dictionary names, currently `pl_PL` and `pl_SJP`. @@ -20,33 +21,16 @@ and findings. `spellcheck_report.py` adds or adapts: - `docs_version`: the documentation branch checked, such as `3.15`. - `run_url`: the Actions run URL. - `translations_revision` and `cpython_revision`: the checked-out Git commits. -- `catalogs`: resources keyed by POSIX paths relative to the translation root, - such as `tutorial/guide.po`. - -Each catalog contains: - -- `source_sha256`: SHA-256 of the original PO file, recorded before the temporary - `sphinx-intl update`. Consumers compare it with their repository checkout to - determine whether coverage is current. -- `scanned_sha256`: pospell's SHA-256 of the temporarily updated PO file. -- `findings`: pospell's results, with `msgctxt`, `msgid`, `msgid_plural`, - `msgstr_sha256`, and unique `words` for each affected entry. -`msgstr_sha256` hashes the checked translation as UTF-8 JSON of -`{"msgstr": entry.msgstr, "msgstr_plural": {str(k): v, ...}}`, serialized with -`ensure_ascii=False`, `sort_keys=True`, and `separators=(',', ':')`. Consumers -should match both the entry identity and this fingerprint before using a finding. +Catalog paths are relative to `locales/pl/LC_MESSAGES`, such as +`tutorial/guide.po`. Each catalog's `source_sha256` is replaced with the checksum +of the original PO, recorded before the temporary `sphinx-intl update`. This lets +consumers compare coverage with their repository checkout. Pospell's checksum of +the temporarily updated PO is retained as `scanned_sha256`. Only catalogs present both in the original checkout and in pospell's report are -published. Clean scanned catalogs retain empty `findings`; unscanned files are -not added as clean. The scan covers prose and excludes literal blocks through -the temporary gettext update. A checked catalog does not imply that every token -or plural form was checked. - -`status: "complete"` means the scan finished, including scans that found spelling -issues. `status: "error"` means it failed, and its findings must not be used as -complete coverage. Failures before pospell can write its JSON, or failures during -report preparation, leave no artifact. Missing reports mean unavailable coverage. +published; unscanned files are not added as clean. The scan covers prose and +excludes literal blocks through the temporary gettext update. `potodo-docs-priority` downloads the artifact separately. It validates the source run, selects complete reports for its requested branch, and checks local entry From a957207eef4d06798bc49a50dd568ca1834d1df6 Mon Sep 17 00:00:00 2001 From: Maciej Olko Date: Sun, 22 Nov 2026 00:25:56 +0100 Subject: [PATCH 15/15] Fix SJP dictionary download URL and checksum --- .github/workflows/spellcheck.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index 56bb7128ce..09ecc9bd83 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -84,9 +84,9 @@ jobs: - name: Download SJP Polish dictionary run: | curl --fail --location --retry 3 \ - https://sjp.pl/sl/ort/sjp-hunspell-pl-20260901.zip \ + https://sjp.pl/sl/ort/sjp-hunspell-pl-20261101.zip \ --output "$RUNNER_TEMP/sjp-hunspell.zip" - echo "47a5ab02cf3def374994b1b03efd9fed2de868349b8ddcebac281b484353d157 $RUNNER_TEMP/sjp-hunspell.zip" \ + echo "a29b40d80a2501ba1ad84fa17f7d177e2ebe313082f74f837a77b3135c05340c $RUNNER_TEMP/sjp-hunspell.zip" \ | sha256sum --check --strict # SJP wraps the dictionary files in a second ZIP archive. unzip -p "$RUNNER_TEMP/sjp-hunspell.zip" pl_PL.zip \