-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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: config + action (to detect new typos) and make it fix a good number of them #11195
base: main
Are you sure you want to change the base?
Conversation
🔍 Existing Issues For ReviewYour pull request is modifying functions with the following pre-existing issues: 📄 File: readthedocs/api/v2/views/integrations.py
Did you find this useful? React with a 👍 or 👎 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR 👍🏼
I didn't take a full review, but I noted a few issues that I see will generate some conflicts. In particular, those that change Python code and require some manual interaction (e.g. a Django migration to update the help_text
)
I'm not opposed to this work, but I find it hard to prioritize by the core team at this point.
@@ -66,7 +66,7 @@ class Migration(migrations.Migration): | |||
"action_arg", | |||
models.CharField( | |||
blank=True, | |||
help_text="Value used for the action to perfom an operation", | |||
help_text="Value used for the action to perform an operation", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would require a Django migrations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, let me exclude all such lines with help_text *=.*
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
even better -- while reviewing tuneups needed for pre-commit (e.g. #11201 and from there on) - ralized that it is migrations
-- better be excludes altogether.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry for the noise -- original is still in readthedocs/builds/models.py . I will add explicit skip for this phrase and TODO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note we can't skip the whole migrations directory since we are running safemigrations pre commit over it mainly, but also other checks as well
@@ -170,7 +170,7 @@ Version 10.15.1 | |||
* `@stsewd <https://github.com/stsewd>`__: Update docs requirements (`#11032 <https://github.com/readthedocs/readthedocs.org/pull/11032>`__) | |||
* `@github-actions[bot] <https://github.com/github-actions[bot]>`__: Dependencies: all packages updated via pip-tools (`#11029 <https://github.com/readthedocs/readthedocs.org/pull/11029>`__) | |||
* `@stsewd <https://github.com/stsewd>`__: Redirects: limit to 100 per project (`#11028 <https://github.com/readthedocs/readthedocs.org/pull/11028>`__) | |||
* `@humitos <https://github.com/humitos>`__: Build: reset notifications when reseting a build (`#11027 <https://github.com/readthedocs/readthedocs.org/pull/11027>`__) | |||
* `@humitos <https://github.com/humitos>`__: Build: reset notifications when resetting a build (`#11027 <https://github.com/readthedocs/readthedocs.org/pull/11027>`__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is no need to touch this file. Also, changing the name of the PRs here won't change them in GH and these won't match.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my 1c: IMHO it is worth fixing it as it is "user facing" , whenever PRs with their titles -- developer facing etc.
But if you insist - I can easily skip it. Just one more call ;)
We use pre-commit for all other linting checks. I feel if we implement this it should be at pre-commit, not GHA. |
Hmm, interesting, my script should've detected presence of pre-commit config... Will have a look wherever get a chance. You do have ci job running the pre-commit I assume? (I don't see report from pre-commit service) |
that explains it: ❯ ls -ld .pre-commit-config.yaml
lrwxrwxrwx 1 yoh yoh 29 Mar 7 18:00 .pre-commit-config.yaml -> common/pre-commit-config.yaml
❯ cat .pre-commit-config.yaml
cat: .pre-commit-config.yaml: No such file or directory
❯ git submodule
-4af0fffd2cbeeb40f0a71b875beb99d6dc88a355 common Let's do the submodules dance now... |
=== 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 ^^^
51b4bb1
to
ef04ef4
Compare
ef04ef4
to
120e693
Compare
codespell was used occasionally on some files, so not a new tool here. But now it would guard RTD from having typos introduced to begin with.
Note that some fixes could affect (fix) functionality.
There is an odd "variable"
syntaxt
which I didn't fix since seems would require transition and smells like it is on purpose:❯ git grep syntaxt -- readthedocs/ readthedocs/projects/migrations/0106_add_addons_config.py: ("syntaxt", models.CharField(max_length=128)), readthedocs/projects/models.py: syntaxt = models.CharField(max_length=128) readthedocs/projects/tasks/builds.py: grab them by using glob syntaxt between other files that could be garbage.
or was it intended to be
syntax
?TODOs
📚 Documentation previews 📚
docs
): https://docs--11195.org.readthedocs.build/en/11195/dev
): https://dev--11195.org.readthedocs.build/en/11195/