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

[Docs] Fix Chinese docs whitespaces #521

Merged
merged 6 commits into from
Oct 17, 2022

Conversation

C1rN09
Copy link
Collaborator

@C1rN09 C1rN09 commented Sep 8, 2022

Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.

Motivation

Fix Chinese docs whitespaces caused by HTML specification. See #486

Modification

  • Add a pre-commit-hook to remove end_of_line characters that split natural Chinese paragraphs
  • Fix all docs related

BC-breaking (Optional)

No

Use cases (Optional)

If this PR introduces a new feature, it is better to list some use cases here, and update the documentation.

Checklist

  • Pre-commit or other linting tools are used to fix the potential lint issues.
  • The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
  • If the modification has potential influence on downstream projects, this PR should be tested with downstream projects, like MMDet or MMCls.
  • The documentation has been modified accordingly, like docstring or example tutorials.

@codecov
Copy link

codecov bot commented Sep 8, 2022

Codecov Report

Base: 78.10% // Head: 77.81% // Decreases project coverage by -0.29% ⚠️

Coverage data is based on head (45780f0) compared to base (a6e1259).
Patch has no changes to coverable lines.

❗ Current head 45780f0 differs from pull request most recent head 9b5067e. Consider uploading reports for the commit 9b5067e to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #521      +/-   ##
==========================================
- Coverage   78.10%   77.81%   -0.30%     
==========================================
  Files         126      116      -10     
  Lines        9039     8608     -431     
  Branches     1800     1777      -23     
==========================================
- Hits         7060     6698     -362     
+ Misses       1666     1610      -56     
+ Partials      313      300      -13     
Flag Coverage Δ
unittests 77.81% <ø> (-0.30%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
mmengine/model/utils.py 59.75% <0.00%> (-3.71%) ⬇️
mmengine/model/wrappers/__init__.py 66.66% <0.00%> (-3.34%) ⬇️
mmengine/model/base_model/base_model.py 83.33% <0.00%> (-2.97%) ⬇️
mmengine/model/wrappers/distributed.py 48.57% <0.00%> (-2.95%) ⬇️
mmengine/utils/dl_utils/collect_env.py 44.44% <0.00%> (-0.77%) ⬇️
mmengine/runner/checkpoint.py 44.00% <0.00%> (-0.64%) ⬇️
mmengine/hooks/checkpoint_hook.py 89.83% <0.00%> (-0.47%) ⬇️
mmengine/hooks/logger_hook.py 98.70% <0.00%> (-0.14%) ⬇️
mmengine/model/__init__.py 75.00% <0.00%> (ø)
mmengine/fileio/__init__.py 100.00% <0.00%> (ø)
... and 24 more

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.

@ZwwWayne ZwwWayne added this to the 0.2.0 milestone Sep 9, 2022
@zhouzaida
Copy link
Collaborator

zhouzaida commented Sep 11, 2022

This is a useful script and it can also be applied in other OpenMMLab projects so we can add it to https://github.com/open-mmlab/pre-commit-hooks.

@zhouzaida
Copy link
Collaborator

zhouzaida commented Sep 13, 2022

open-mmlab/pre-commit-hooks#12 had been merged.
Please update .pre-commit-config.yaml and .pre-commit-config-zh-cn.yaml accordingly.

@HAOCHENYE HAOCHENYE added the ready ready to merge label Oct 10, 2022
@C1rN09 C1rN09 linked an issue Oct 11, 2022 that may be closed by this pull request
@C1rN09 C1rN09 marked this pull request as draft October 11, 2022 07:45
@C1rN09 C1rN09 removed the ready ready to merge label Oct 13, 2022
@C1rN09 C1rN09 marked this pull request as ready for review October 17, 2022 02:50
@C1rN09 C1rN09 added the ready ready to merge label Oct 17, 2022
@zhouzaida zhouzaida changed the title [Docs & Enhancement] Fix Chinese docs whitespaces [Docs] Fix Chinese docs whitespaces Oct 17, 2022
@zhouzaida zhouzaida merged commit 09a195b into open-mmlab:main Oct 17, 2022
C1rN09 added a commit to C1rN09/mmengine that referenced this pull request Nov 1, 2022
* change pre-commit-config

* modify docs with pre-commit hook

* change pre-commit-config-zh-cn

* fallback readme.md

Co-authored-by: HAOCHENYE <21724054@zju.edu.cn>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rendering issue of markdown docs
4 participants