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 documentation about spell check by codespell. #5005

Merged
merged 1 commit into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ test:
doc8 --ignore D001 --ignore-path build

spellcheck:
git ls-files '*.md' '*.rst' | xargs codespell --ignore-words=codespell_whitelist.txt --skip="source/Releases/*"
git ls-files '*.md' '*.rst' | xargs codespell --config codespell.cfg
fujitatomoya marked this conversation as resolved.
Show resolved Hide resolved

linkcheck:
$(BUILD) -b linkcheck $(OPTS) $(SOURCE) $(LINKCHECKDIR)
Expand Down
15 changes: 15 additions & 0 deletions codespell.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[codespell]

# Enable built-in dictionaries/rules.
# See more details for https://github.com/codespell-project/codespell/tree/main/codespell_lib/data.
builtin = clear,rare,informal,code
fujitatomoya marked this conversation as resolved.
Show resolved Hide resolved

# Ignore words listed in this file.
ignore-words = codespell_whitelist.txt

# Skip checking files in this directory.
# This folder is ignored for a couple of reasons.
# *-Changelog.rst files are generated by commit history that could include some misspellings,
# but we should keep the original commit messages here.
# Besides, it includes names of authors and contributors, which compile up the false alarms.
skip = source/Releases/*
3 changes: 3 additions & 0 deletions codespell_whitelist.txt
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
empy
ws
lets
christophebedard marked this conversation as resolved.
Show resolved Hide resolved
jupyter
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,33 @@ This is the recommended way to test out local changes.
The build process can take some time.
To see the output, open ``build/html/index.html`` in your browser.

You can also run the documentation tests locally (using `doc8 <https://github.com/PyCQA/doc8>`_) with the following command:

Checking / Testing the site
^^^^^^^^^^^^^^^^^^^^^^^^^^^

You can run the documentation tests locally (using `doc8 <https://github.com/PyCQA/doc8>`_) with the following command:

.. code-block:: console

make test

You can run the documentation linter locally (using `sphinx-lint <https://github.com/sphinx-contrib/sphinx-lint>`_) with the following command:

.. code-block:: console

make lint

You can run the documentation spell checker locally (using `codespell <https://github.com/codespell-project/codespell>`_) with the following command:

.. code-block:: console

make spellcheck

.. note::

If that detects specific words that need to be ignored, add it to `codespell_whitelist <https://github.com/ros2/ros2_documentation/blob/{REPOS_FILE_BRANCH}/codespell_whitelist.txt>`_ .


View Site Through Github CI
^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ So now we have the full pipeline working, from creating the Dockerfile,
all the way to deploying it and seeing it work on IBM Cloud. But, what
if we want to use a custom set of packages we (or someone else) created?

Well that all has to do with how you set-up your Dockerfile. Lets use
Well that all has to do with how you set-up your Dockerfile. Let's use
the example provided by ROS 2 `here <https://hub.docker.com/_/ros/>`__.
Create a new directory with a new Dockerfile (or overwrite the existing
one) and add the following in it (or download the file
Expand Down