Skip to content

codespell: action, config + some typos found and fixed#150

Open
yarikoptic wants to merge 10 commits intocunningham-lab:masterfrom
yarikoptic:enh-codespell
Open

codespell: action, config + some typos found and fixed#150
yarikoptic wants to merge 10 commits intocunningham-lab:masterfrom
yarikoptic:enh-codespell

Conversation

@yarikoptic
Copy link

I also un-gitignored the paper/ folder which has LOTS of files committed. That exclusion should be improved to ignore more specifically if there is anything to ignore. I also refactored one tiny function to just avoid temporary variable with name close to a typo.

After this, any PR which introduces a typo - should cause CI to fail.

=== 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",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
=== Do not change lines below ===
{
 "chain": [],
 "cmd": "codespell -i3 -C4 -w",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
@cellistigs
Copy link
Collaborator

Hi @yarikoptic, thanks for this pull request! At a glance it seems like codespell would be a useful feature to have on our repo, and I appreciate all of the up-front work that you have done to make our repo compatible with it. As I'm not familiar myself with codespell, can I ask:

  • How restrictive is it? As evidenced by your renaming of delt I'm curious how much this will complain about common abbreviations.
  • Are there certain downstream benefits of codespell that you have in mind?

@yarikoptic
Copy link
Author

yarikoptic commented Aug 28, 2023

  • How restrictive is it? As evidenced by your renaming of delt I'm curious how much this will complain about common abbreviations.

yeah, it is prone to complain about abbreviations which are close to be a typo even though abbreviations would be all CAPS. But I found those to be relatively sparse and easy to ignore.

As for delt, pushed 7c79d79 to just avoid there at all... and I feel that I have done like that in this PR elsewhere but may be it was just a different project.

  • Are there certain downstream benefits of codespell that you have in mind?

well, besides it being not unknown to detect typos in actual untested code and thus fixing up issue which might have been triggered by downstream code (like here?), I see it also ensuring that names in the API are chosen such that they aren't some typoed/misspelled words, which does happen.

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.

2 participants