How to Contribute to This Site
This explains what you need to know to successfully submit changes to this site.
Learning Objectives
How to locally build this website.
How to check for broken links.
How to check spelling and formatting.
How to run CI locally for checking code changes.
Requirements
Ubuntu 20.04
ROS 2 Galactic
Docker
A colcon workspace with a copy of the moveit2_tutorials repo (if you don’t already have one, Getting Started will walk you through the process of creating one).
Steps
Build and view the website locally
First,
cd
to the root directory of the moveit2_tutorials repo (if you followed the Getting Started tutorial, this will be~/ws_moveit/src/moveit2_tutorials
). From that directory, run this command:make html # Or run the following lines if you want to automatically rebuild the website on new changes while inotifywait -re modify,move,create,delete .; do make html doneThen you can open the local build of the site in your web browser from:
./build/html/index.html
. For example, to open the local site in your default browser the command would be:xdg-open ./build/html/index.html
Test for broken links
To test for broken links, run the
htmlproofer
script. Note that running this script may require you to install some Python dependencies. If usingpip
to install these dependencies, you may want to create a virtual environment.python3 -m venv .venv source .venv/bin/activateYou can then install requirements using
pip
:pip3 install --upgrade --requirement requirements.txtYou can run the
htmlproofer
script with this command:./htmlproofer.sh
Run the formatters and spellchecker
We use pre-commit to run the formatting and spelling checkers. You can install it with pip like this:
python3 -m pip install --user pre-commitTo run pre-commit locally to fix formatting and spelling:
pre-commit run --all
Run industrial_ci locally to run CI
Clone a copy of industrial_ci into your workspace.
Build and source your workspace.
Run this command from the workspace directory to test code changes just as it is done in CI:
ros2 run industrial_ci rerun_ci src/moveit2_tutorials \ DOCKER_IMAGE='moveit/moveit2:rolling-source' \ UPSTREAM_WORKSPACE='moveit2_tutorials.repos' \ TARGET_CMAKE_ARGS='-DCMAKE_BUILD_TYPE=Release' \ CCACHE_DIR="$HOME/.ccache" \ CLANG_TIDY='true'