From 741f9db6ddb40efc4d1a7db0883ce6d5f3211a1b Mon Sep 17 00:00:00 2001 From: dave3d <611581+dave3d@users.noreply.github.com> Date: Tue, 17 Nov 2026 18:30:48 +0000 Subject: [PATCH 1/4] Initial plan From dfabc3ffac7499898c8aec6f0d37c3074ed60436 Mon Sep 17 00:00:00 2001 From: dave3d <611581+dave3d@users.noreply.github.com> Date: Tue, 17 Nov 2026 18:32:26 +0000 Subject: [PATCH 2/4] docs: add package installation instructions Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> --- README.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0cce75f..936b70c 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,31 @@ The CommentSpellCheck (CSC) package provides a script that automatically spell checks the comments of a code base. It was originally developed to be run on the SimpleITK and ITK code bases. +## Installation + +Install the package from PyPI with: + + python -m pip install comment-spell-check + +This installs the `comment_spell_check` command, used in the example below. + +To use CommentSpellCheck as a pre-commit hook, add the following to your +`.pre-commit-config.yaml`, replacing `vX.Y.Z` with the release tag you want: + +```yaml +repos: +- repo: https://github.com/SimpleITK/CommentSpellCheck + rev: vX.Y.Z + hooks: + - id: comment-spell-check +``` + +Pre-commit installs this hook from the GitHub repository; a separate PyPI +installation is not needed for the hook. + Here is how it is typically run: - python comment_spell_check.py --exclude Ancillary $SIMPLEITK_SOURCE_DIR/Code + comment_spell_check --exclude Ancillary $SIMPLEITK_SOURCE_DIR/Code This command will recursively find all the \'.h\' files in a directory, extract the C/C++ comments from the code, and run a spell checker on them. From f80df781bf76150fc89ac76c84652baf48d714d9 Mon Sep 17 00:00:00 2001 From: dave3d <611581+dave3d@users.noreply.github.com> Date: Tue, 17 Nov 2026 19:33:01 +0000 Subject: [PATCH 3/4] ci: use supported Python for package tests Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> --- .github/workflows/python-app.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index f55ee52..a47e3d1 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -40,10 +40,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up Python 3.9 + - name: Set up Python 3.11 uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: 3.11 cache: 'pip' - name: Install dependencies run: | From d8bda4fc9c8a22555bb3017f2794050e5a8dd959 Mon Sep 17 00:00:00 2001 From: dave3d <611581+dave3d@users.noreply.github.com> Date: Tue, 17 Nov 2026 19:34:29 +0000 Subject: [PATCH 4/4] fix: constrain bibtexparser to compatible API Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index c10f7a2..1024006 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ comment_parser pyspellchecker -bibtexparser +bibtexparser<2 requests