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 typos spell checker to pre-commit #2568

Merged
merged 8 commits into from
Aug 2, 2024
Merged

add typos spell checker to pre-commit #2568

merged 8 commits into from
Aug 2, 2024

Conversation

Adam-D-Lewis
Copy link
Member

@Adam-D-Lewis Adam-D-Lewis commented Jul 18, 2024

Reference Issues or PRs

Adds typos to the pre-commit config to fix a lot of uncaught typos.

I think the biggest benefit of adding typos is that it caught quite a few typos that codespell doesn't catch. I'm okay with trying to leave codespell and typos both in the pre-commit file, but they may conflict eventually. If that's the case, perhaps we remove either codespell or typos at that time from the pre-commit file.

Typos is faster than codespell. Typos took 0.2 seconds to run while typos took 0.05 seconds to run in my test, but I think the time difference is not important since they are both quick to run.

What does this implement/fix?

Put a x in the boxes that apply

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds a feature)
  • Breaking change (fix or feature that would cause existing features not to work as expected)
  • Documentation Update
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build related changes
  • Other (please describe):

Testing

  • Did you test the pull request locally?
  • Did you add new tests?

Any other comments?

@@ -606,7 +606,7 @@ class NodeSelectorKeyValue(schema.Base):

class KubernetesCredentials(schema.Base):
host: str
cluster_ca_certifiate: str
cluster_ca_certificate: str
Copy link
Member Author

Choose a reason for hiding this comment

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

We should catch this in the update step and update the spelling for users if they had this set explicitly.

Copy link
Contributor

Choose a reason for hiding this comment

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

I would add a # typos: ignore here for now, and a todo to address this for next release, so that we add as part of the update method as suggested. to keep this in mind, we could pin the issue in our notes, or in the issues tab

Copy link
Member Author

Choose a reason for hiding this comment

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

We will likely need to delete the old file during the nebari update step since otherwise it'll leave it behind in the stages folder. We've done this in the past.

@Adam-D-Lewis Adam-D-Lewis changed the title add typos spell checker add typos spell checker to pre-commit Jul 18, 2024
@Adam-D-Lewis
Copy link
Member Author

Even though this isn't done yet (see my comments), I'd be curious to get any feedback on it @dcmcand @marcelovilla @viniciusdc

@marcelovilla
Copy link
Member

@Adam-D-Lewis thank you for this! I wouldn't have thought we had that many typos in the code base and it's great you're adding a hook to catch them.

I'm not familiar with either codespell or typos but it seems typos worked great in this case so I think leaving it for now might be good enough.

As for fixing the typo in the configuration file, I agree we should include the logic to fix the spelling in the user's config file and delete the rendered terraform file during the upgrade step. However, I don't think it's necessarily urgent and we could have a separate PR for that if you think it's more convenient.

@viniciusdc
Copy link
Contributor

I completely agree on what @marcelovilla said above as well, and would vote for a separate PR to address the changes in the config file.

RELEASE.md Show resolved Hide resolved
yarikoptic added a commit to yarikoptic/codespell that referenced this pull request Jul 26, 2024
Originally found detected/fixed by typos in
- nebari-dev/nebari#2568
DimitriPapadopoulos pushed a commit to yarikoptic/codespell that referenced this pull request Jul 26, 2024
Originally found detected/fixed by typos in
- nebari-dev/nebari#2568
@Adam-D-Lewis
Copy link
Member Author

@viniciusdc Alright, I pushed off the 2 things which would take a bit more work to resolve and opened issues for them so we can get this in sooner rather than later. @viniciusdc or @marcelovilla Can you review again?

@Adam-D-Lewis Adam-D-Lewis removed the request for review from iameskild July 30, 2024 19:28
@Adam-D-Lewis Adam-D-Lewis added this to the Nebari Core Team - DevEx milestone Aug 1, 2024
@Adam-D-Lewis Adam-D-Lewis self-assigned this Aug 1, 2024
Copy link
Contributor

@viniciusdc viniciusdc left a comment

Choose a reason for hiding this comment

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

LGTM, nice tool! 🚀

@Adam-D-Lewis Adam-D-Lewis merged commit dce1381 into develop Aug 2, 2024
30 checks passed
@Adam-D-Lewis Adam-D-Lewis deleted the typos branch August 2, 2024 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done 💪🏾
Development

Successfully merging this pull request may close these issues.

5 participants