ci: add codespell spell-check workflow#417
ci: add codespell spell-check workflow#417dev-aditya-hub wants to merge 2 commits intokubeedge:mainfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: dev-aditya-hub The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Add .github/workflows/spell-check.yml running codespell on every push and pull_request, and a .codespellrc limiting the check to core/. Fix all typos caught by the new check: - Deafult -> Default (log.py) - caculate -> calculate (federated_class_incremental_learning.py) - enviroment -> environment (simulation.py, simulation_system_admin.py) - segmantation -> segmentation (dataset.py) Signed-off-by: dev-aditya-hub <premjadhvar95@gmail.com>
9b9abc1 to
8b321bc
Compare
There was a problem hiding this comment.
Code Review
This pull request corrects various spelling errors across the codebase, specifically targeting terms like "environment", "calculate", "default", and "segmentation". It also introduces a .codespellrc configuration file to help maintain spelling integrity. The review feedback suggests several improvements: aligning the .codespellrc skip list with its internal documentation, fixing a grammatical error in a log message, correcting the "destory" typo in a function name, and updating a docstring that incorrectly describes a destruction function as a build function.
| [codespell] | ||
| # examples/ and docs/proposals/ contain pre-existing issues from many | ||
| # contributors; they are tracked separately. CI focuses on core/ only. | ||
| skip = *.pyc,__pycache__,*.egg-info,.git |
There was a problem hiding this comment.
| if build_simulation_env_ret.returncode == 0: | ||
| LOGGER.info( | ||
| "Congratulation! The simulation enviroment build successful!") | ||
| "Congratulation! The simulation environment build successful!") |
There was a problem hiding this comment.
|
|
||
|
|
||
| def destory_simulation_enviroment(simulation): | ||
| def destory_simulation_environment(simulation): |
There was a problem hiding this comment.
The function name still contains the typo destory (should be destroy). Since this PR is already renaming the function (changing the suffix), it is an appropriate time to fix the prefix as well.
| def destory_simulation_environment(simulation): | |
| def destroy_simulation_environment(simulation): |
| def destory_simulation_environment(simulation): | ||
| """ | ||
| build the simulation enviroment | ||
| build the simulation environment |
- "os" -> "of" in RuntimeError message (check_host_cpu) - rename destory_simulation_environment -> destroy_simulation_environment - fix docstring: "build" -> "destroy" for destroy_simulation_environment Signed-off-by: dev-aditya-hub <premjadhvar95@gmail.com>
|
/assign @MooreZheng |
Summary
.github/workflows/spell-check.ymlthat runscodespellon everypushtomainand everypull_request, preventing new spelling errors from landing incore/.codespellrcto configure the check: scope iscore/only;examples/anddocs/proposals/contain pre-existing issues from many contributors and are tracked separatelycore/:Deafult→Default(core/common/log.py)caculate→calculate(federated_class_incremental_learning.py)enviroment→environment(simulation.py,simulation_system_admin.py)segmantation→segmentation(dataset.py)Why codespell
codespell is lightweight (pure Python, zero system deps), widely used in CNCF projects, and integrates in one
pip installstep — no extra Actions or third-party integrations required.Test plan
codespell --config .codespellrc coreexits 0 locally after applying the typo fixesFixes #232
Signed-off-by: dev-aditya-hub premjadhvar95@gmail.com