Skip to content

Repository Guidelines

Damien LaRocque edited this page Feb 4, 2024 · 3 revisions

README and Markdown

Fenced code blocks

It is a good practice to enable syntax highlighting to fenced code blocks, so that one can see in which language a code block is written into.

Here is an example of a fenced code block in Python:

```py
import rclpy

if __name__ == "__main__":
    print(f"Hello, world !", f"5 + 2 = {5+2}")
```
import rclpy

if __name__ == "__main__":
    print(f"Hello, world !", f"5 + 2 = {5+2}")

Here are the indicators of the main languages that are used in the lab

Code Language
py Python
cpp C++
yaml YAML
tex LaTeX
json JSON
sh Shell
console Shell session

Python

It is a good practice to use virtual environments to develop Python projects. Such virtual environments require a requirements.txt at the root of the repo. This file lists all the pip dependencies of your project, like in this example :

# Scientific packages
numpy
scipy
matplotlib

# Development packages
black
pylint

Requirements files can also be more complex with links to GitHub repos and specific package versions. pip has a documentation page on the requirements file format.

Projects requirements can be installed in a virtual environment at the root of the repo :

python3 -m venv venv
. venv/bin/activate
pip3 install -r requirements.txt
Clone this wiki locally