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 support (config, workflow to detect/not fix) and make it fix few typos #587

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

yarikoptic
Copy link

More about codespell: https://github.com/codespell-project/codespell .

I personally introduced it to dozens if not hundreds of projects already and so far only positive feedback.

CI workflow has 'permissions' set only to 'read' so also should be safe.
Per request at napari/napari#7619 (comment)

@github-actions github-actions bot added documentation Improvements or additions to documentation maintenance CI, dependencies, and other maintenance labels Feb 20, 2025
Copy link
Member

@psobolewskiPhD psobolewskiPhD left a comment

Choose a reason for hiding this comment

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

Caught a few false positives.
How will those work going forward? will they get re-flagged?

General question: what do we want to do about release notes? There are typos there, but those are the titles of the PRs, which are the source of truth?
Should we skip the release notes? or fix them? fix the PR titles?

@@ -57,7 +57,7 @@ You can report issues to the napari Code of Conduct committee, at napari-conduct
* [Nicholas Sofroniew](https://github.com/sofroniewn)
* [Kira Evans](https://github.com/kne42)

If your report involves any members of the committee, or if they feel they have a conflict of interest in handling it, then they will recuse themselves from considering your report. Alternatively, if for any reason you feel uncomfortable making a report to the committee, then you can also contact:
If your report involves any members of the committee, or if they feel they have a conflict of interest in handling it, then they will recurse themselves from considering your report. Alternatively, if for any reason you feel uncomfortable making a report to the committee, then you can also contact:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
If your report involves any members of the committee, or if they feel they have a conflict of interest in handling it, then they will recurse themselves from considering your report. Alternatively, if for any reason you feel uncomfortable making a report to the committee, then you can also contact:
If your report involves any members of the committee, or if they feel they have a conflict of interest in handling it, then they will recuse themselves from considering your report. Alternatively, if for any reason you feel uncomfortable making a report to the committee, then you can also contact:

Revert please https://www.merriam-webster.com/dictionary/recuse

@@ -107,4 +107,4 @@ The committee will never publicly discuss the issue; all public statements will

## Conflicts of interest

In the event of any conflict of interest, a committee member must immediately notify the other members, and recuse themselves if necessary.
In the event of any conflict of interest, a committee member must immediately notify the other members, and recurse themselves if necessary.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
In the event of any conflict of interest, a committee member must immediately notify the other members, and recurse themselves if necessary.
In the event of any conflict of interest, a committee member must immediately notify the other members, and recuse themselves if necessary.

Revert please https://www.merriam-webster.com/dictionary/recuse

@@ -276,7 +276,7 @@ function actually instantiating the widget. It accepts only one argument: a
napari `Viewer` proxy instance. The proxy restricts access to some `Viewer`
functionality like private methods.

Similarly `napari_experimental_provide_function` hooks return ane or more
Similarly `napari_experimental_provide_function` hooks return and or more
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Similarly `napari_experimental_provide_function` hooks return and or more
Similarly `napari_experimental_provide_function` hooks return one or more

It is a typo, but not the right fix 🤣

Copy link
Author

Choose a reason for hiding this comment

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

@yarikoptic
Copy link
Author

How will those work going forward? will they get re-flagged?

a few ways to ignore them -(I already ignored some) - either via config (added in this PR) or "inline" (less applicable in docs) . See https://github.com/codespell-project/codespell?tab=readme-ov-file#using-a-config-file .

Let me address those false positives now, good eye @psobolewskiPhD !

yarikoptic added a commit to yarikoptic/codespell that referenced this pull request Feb 20, 2025
=== Do not change lines below ===
{
 "chain": [],
 "cmd": "codespell -w -i 3 -C 2",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
=== Do not change lines below ===
{
 "chain": [],
 "cmd": "codespell -w -i 3 -C 2 ./docs/release/release_0_5_0.md",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
…agically

=== Do not change lines below ===
{
 "chain": [],
 "cmd": "codespell -w",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
@yarikoptic
Copy link
Author

done, pushed, also spotted/ignored one more name.

yarikoptic added a commit to yarikoptic/codespell that referenced this pull request Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation maintenance CI, dependencies, and other maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants