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 codespell to pre-commit hooks and fix spelling of existing files #1161

Merged
merged 9 commits into from
Jan 7, 2024

Conversation

davorrunje
Copy link
Collaborator

@davorrunje davorrunje commented Jan 6, 2024

Why are these changes needed?

There is a large number of typos and spelling errors in the repository that could have been easily caught by a spelling checker. This PR Integrates the codespell tool as a pre-commit hook and scan changed files for spelling errors.

Existing spelling errors are also fixed.

Related issue number

Closes #1162

Checks

@davorrunje davorrunje marked this pull request as draft January 6, 2024 19:45
@codecov-commenter
Copy link

codecov-commenter commented Jan 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (40dbf31) 30.59% compared to head (92ff46e) 49.08%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1161       +/-   ##
===========================================
+ Coverage   30.59%   49.08%   +18.49%     
===========================================
  Files          30       30               
  Lines        4256     4256               
  Branches      983     1034       +51     
===========================================
+ Hits         1302     2089      +787     
+ Misses       2861     1968      -893     
- Partials       93      199      +106     
Flag Coverage Δ
unittests 48.98% <ø> (+18.44%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rickyloynd-microsoft
Copy link
Contributor

Adding codespell to pre-commit catches 139 spelling errors. Most of them are actual misspellings but a few are not, like Empress, which codespell wants to change to Impress. Would this force us to explicitly exclude certain files from codespell in pre-commit-config.yaml?

@davorrunje davorrunje changed the title Chore: fixed spelling, minor errors and reformatting of notebooks using isort and black Add codespell to pre-commit hooks and fix spelling of existing files Jan 6, 2024
@davorrunje
Copy link
Collaborator Author

Adding codespell to pre-commit catches 139 spelling errors. Most of them are actual misspellings but a few are not, like Empress, which codespell wants to change to Impress. Would this force us to explicitly exclude certain files from codespell in pre-commit-config.yaml?

@rickyloynd-microsoft I fixed most spelling errors and then excluded the whole notebook directory from checking. There are some utf-8 encoded parts that confuse codespell. Not perfect, but better than nothing.

Copy link
Contributor

@rickyloynd-microsoft rickyloynd-microsoft left a comment

Choose a reason for hiding this comment

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

After exclusion of the notebooks, I see no problems with codespell's other changes. I defer to Chi on whether to add codespell to pre-commit.

@sonichi sonichi added this pull request to the merge queue Jan 7, 2024
Merged via the queue into main with commit 8f065e0 Jan 7, 2024
82 of 87 checks passed
@sonichi sonichi deleted the codespell branch January 7, 2024 22:13
whiskyboy pushed a commit to whiskyboy/autogen that referenced this pull request Apr 17, 2024
…icrosoft#1161)

* fixed spelling, minor errors and reformatted using black

* polishing

* added codespell to pre-commit hooks, fixed a number of spelling errors and a few minor bugs in the code

* update autogen library version in notebooks

* update autogen library version in notebooks

* update autogen library version in notebooks

* update autogen library version in notebooks

* update autogen library version in notebooks
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.

[Feature Request]: add spelling checker to pre-commit hooks
4 participants