Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add spellcheck workflow #162

Merged
merged 1 commit into from
May 3, 2024
Merged

Add spellcheck workflow #162

merged 1 commit into from
May 3, 2024

Conversation

jjasghar
Copy link
Member

We have a bunch of documentation, it wouldn't hurt to have spell check.

@jjasghar jjasghar requested a review from a team as a code owner April 16, 2024 17:57
Copy link
Contributor

@bjhargrave bjhargrave left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you also need to include the configuration files.
Screenshot 2024-04-16 at 16 17 00

@jjasghar
Copy link
Member Author

It doesn't seem to unless we want to add a specific dictionary.

https://github.com/marketplace/actions/github-spellcheck-action#configuration

Copy link
Member

@lhawthorn lhawthorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nathan-weinberg nathan-weinberg requested a review from a team April 24, 2024 03:21
Copy link
Contributor

@bjhargrave bjhargrave left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the gha action, it requires a spellcheck.yml file which is not included in this PR.

For example: https://github.com/instructlab/instructlab/blob/main/.spellcheck.yml

I tested this PR in my fork and the spell check failed due to missing spellcheck.yml file.

Using pyspelling on configuration outlined in >spellcheck.yaml<
Checking files matching specified outlined in >spellcheck.yaml<
----------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/bin/pyspelling", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyspelling/__main__.py", line 30, in main
    return run(
           ^^^^
  File "/usr/local/lib/python3.12/site-packages/pyspelling/__main__.py", line 55, in run
    for results in spellcheck(
  File "/usr/local/lib/python3.12/site-packages/pyspelling/__init__.py", line 616, in spellcheck
    config = util.read_config(config_file)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyspelling/util/__init__.py", line 186, in read_config
    raise ValueError(
ValueError: Unable to find or load pyspelling configuration from spellcheck.yaml, for more details on configuration please read https://facelessuser.github.io/pyspelling/configuration/

@bjhargrave
Copy link
Contributor

It doesn't seem to unless we want to add a specific dictionary.

https://github.com/marketplace/actions/github-spellcheck-action#configuration

Step 2 says you need to create a spellcheck.yml file.

Copy link
Contributor

@ckadner ckadner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

.github/workflows/spellcheck.yaml Outdated Show resolved Hide resolved
@nathan-weinberg
Copy link
Member

Very much in favor of this

@ckadner
Copy link
Contributor

ckadner commented Apr 25, 2024

It doesn't seem to unless we want to add a specific dictionary.
https://github.com/marketplace/actions/github-spellcheck-action#configuration

Step 2 says you need to create a spellcheck.yml file.

https://github.com/instructlab/community/actions/runs/8835495973/job/24259773634?pr=162#step:4:19

  File "/usr/local/lib/python3.12/site-packages/pyspelling/__init__.py", line 616, in spellcheck
    config = util.read_config(config_file)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyspelling/util/__init__.py", line 186, in read_config
    raise ValueError(
ValueError: Unable to find or load pyspelling configuration from spellcheck.yaml, for more details on configuration please read https://facelessuser.github.io/pyspelling/configuration/
Error: Files in repository contain spelling errors

@bjhargrave
Copy link
Contributor

Also, this PR needs to fix any spelling errors that may exist so that the repo passes the spellcheck action.

@lehors
Copy link
Contributor

lehors commented Apr 25, 2024

Ok, I've got to say it: I don't know why everybody seems to love those spellcheckers. In my experience they are a pain because there generate too many false positives. We're not producing literature and there are just too many terms we use that spellcheckers don't know, and about every PR needs to include its additions to the custom dictionary.
Now, feel free to ignore me, I've said my piece.

@nathan-weinberg
Copy link
Member

Ok, I've got to say it: I don't know why everybody seems to love those spellcheckers. In my experience they are a pain because there generate too many false positives. We're not producing literature and there are just too many terms we use that spellcheckers don't know, and about every PR needs to include its additions to the custom dictionary. Now, feel free to ignore me, I've said my piece.

I think it makes a lot of sense given the doc-heavy nature of this repo, and I don't think the dictionary maintenence is going to be too hard once we get a lot of the base terms out of the way.

I've opened a PR for a Markdown Linter for this repo as well, they should pair well together: #218

@bjhargrave bjhargrave force-pushed the jjasghar/spellcheck branch from 6b6bf57 to ed7c9ec Compare May 3, 2024 16:19
Co-authored-by: Christian Kadner <ckadner@us.ibm.com>
Signed-off-by: JJ Asghar <awesome@ibm.com>
Signed-off-by: BJ Hargrave <hargrave@us.ibm.com>
@bjhargrave bjhargrave force-pushed the jjasghar/spellcheck branch from ed7c9ec to bca726d Compare May 3, 2024 16:23
@bjhargrave bjhargrave changed the title Added same spell check from cli repo Add spellcheck workflow May 3, 2024
@nathan-weinberg
Copy link
Member

nathan-weinberg commented May 3, 2024

@ckadner can you take another look and approve/merge if things look good to you?

Edit: @ckadner is unavailable for a few days so we will proceed since his comments are addressed

@bjhargrave bjhargrave dismissed ckadner’s stale review May 3, 2024 18:30

Concerns have been address and reviewer is OOO

@nathan-weinberg nathan-weinberg merged commit e342ed9 into main May 3, 2024
4 checks passed
@bjhargrave bjhargrave deleted the jjasghar/spellcheck branch May 3, 2024 18:31
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.

6 participants