Skip to content

Add codespell support (config, workflow to detect/not fix) and make it fix few typos#587

Merged
jni merged 8 commits into
napari:mainfrom
yarikoptic:enh-codespell
Feb 26, 2025
Merged

Add codespell support (config, workflow to detect/not fix) and make it fix few typos#587
jni merged 8 commits into
napari:mainfrom
yarikoptic:enh-codespell

Conversation

@yarikoptic

Copy link
Copy Markdown
Contributor

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

@psobolewskiPhD psobolewskiPhD left a comment

Copy link
Copy Markdown
Member

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?

Comment thread docs/community/code_of_conduct.md Outdated
* [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
Copy Markdown
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

## 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
Copy Markdown
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

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
Copy Markdown
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
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@yarikoptic

Copy link
Copy Markdown
Contributor 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
Copy Markdown
Contributor Author

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

yarikoptic added a commit to yarikoptic/codespell that referenced this pull request Feb 20, 2025
@psobolewskiPhD

Copy link
Copy Markdown
Member

I asked this on the napari/napari PR, but i think it's good to have the info here too.
So i'm pretty cool with this.
But can you say a few words how this will work going forward?
Say a contributor makes a PR with a typo.
What happens? pre-commit flags it and blocks merge?
What if it's a false positive like the ones I caught above?

DimitriPapadopoulos pushed a commit to codespell-project/codespell that referenced this pull request Feb 24, 2025
@jni jni added this to the 0.6.0 milestone Feb 26, 2025
@jni jni merged commit f678b7b into napari:main Feb 26, 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.

3 participants