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

CI: implement codespell check for custom word mappings #1322

Merged
merged 22 commits into from
Oct 17, 2022

Conversation

sappelhoff
Copy link
Member

minor, came up in #1289

@sappelhoff sappelhoff added the exclude-from-changelog This item will not feature in the automatically generated changelog label Oct 14, 2022
@sappelhoff sappelhoff requested a review from Remi-Gau October 14, 2022 10:05
@codecov
Copy link

codecov bot commented Oct 14, 2022

Codecov Report

Base: 88.33% // Head: 88.33% // No change to project coverage 👍

Coverage data is based on head (45a78b6) compared to base (296ec42).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1322   +/-   ##
=======================================
  Coverage   88.33%   88.33%           
=======================================
  Files          11       11           
  Lines        1080     1080           
=======================================
  Hits          954      954           
  Misses        126      126           
Impacted Files Coverage Δ
tools/schemacode/bidsschematools/render/text.py 97.39% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Collaborator

@Remi-Gau Remi-Gau left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @sappelhoff

@Remi-Gau
Copy link
Collaborator

not for this PR, but may be worth having a copespell config + CI to avoid those kind of inconsistencies creeping back in. Should be doable, no?

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

@sappelhoff
Copy link
Member Author

Yes, agreed that should be a good thing for us, as we have already had several such "wording PRs"

@effigies
Copy link
Collaborator

I would go the other way. English tends to adopt hyphens when words are new and then drop them when they become common, except when doing so causes ambiguity. If we have both forms, then it typically means the hyphen is the older form on the way out.

Additionally, Merriam-Webster says "less commonly sub-directory", so I would go with the more common form.

@Remi-Gau
Copy link
Collaborator

I would go the other way. English tends to adopt hyphens when words are new and then drop them when they become common, except when doing so causes ambiguity. If we have both forms, then it typically means the hyphen is the older form on the way out.

Additionally, Merriam-Webster says "less commonly sub-directory", so I would go with the more common form.

Fine with me as long as we try to stick to a single one.

@sappelhoff
Copy link
Member Author

I am also fine with that, thanks for chiming in Chris.

I'll turn it to subdir consistently and add a CI check that we can later re-use for other words we want to be consistent on.

@Remi-Gau
Copy link
Collaborator

not for this PR, but may be worth having a copespell config + CI to avoid those kind of inconsistencies creeping back in. Should be doable, no?

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

previous similar PRs:

@Remi-Gau
Copy link
Collaborator

@effigies any reason why codespell.yml was removed in this PR?

I think I may be missing something so I don't want to bring it back in case you set up something else instead.

https://github.com/bids-standard/bids-specification/pull/1302/files

@effigies
Copy link
Collaborator

All the validation steps were put into a single workflow.

@Remi-Gau
Copy link
Collaborator

All the validation steps were put into a single workflow.

oops my bad. I thought that the codespell.yml was a config for codespell file used by some other automated CI and not a typical github action.

@sappelhoff
Copy link
Member Author

haha, now look at all those "folder" words that have already crept in due to a lacking CI step.

I'll correct these in this PR as well, following #1044

@sappelhoff sappelhoff changed the title Wording: subdir -> sub-dir: use hyphen Wording: sub-dir -> subdir: do not use hyphen; CI: implement codespell check for custom word mappings Oct 17, 2022
@Remi-Gau
Copy link
Collaborator

haha, now look at all those "folder" words that have already crept in due to a lacking CI step.

I'll correct these in this PR as well, following #1044

should we update the PR title,then?

@sappelhoff sappelhoff changed the title Wording: sub-dir -> subdir: do not use hyphen; CI: implement codespell check for custom word mappings CI: implement codespell check for custom word mappings Oct 17, 2022
codespell_words.txt Outdated Show resolved Hide resolved
@sappelhoff
Copy link
Member Author

it looks like it's fine, but it might not be:

https://github.com/bids-standard/bids-specification/actions/runs/3265755715/jobs/5368473030

image

@effigies
Copy link
Collaborator

My guess is those are just listing the with: options. The configuration should still be working. Try removing fo from the codespell list and see if it flags the PDF build.

@sappelhoff
Copy link
Member Author

My guess is those are just listing the with: options. The configuration should still be working. Try removing fo from the codespell list and see if it flags the PDF build.

indeed, that is the case. Thanks!

@Remi-Gau
Copy link
Collaborator

Wanna add it to pre-commit?

  - repo: https://github.com/codespell-project/codespell
    rev: v2.2.2
    hooks:
      - id: codespell
``

@effigies effigies merged commit 8cc459f into bids-standard:master Oct 17, 2022
@sappelhoff sappelhoff deleted the wording branch October 18, 2022 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exclude-from-changelog This item will not feature in the automatically generated changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants