Skip to content

Contributing

Jeanne Joachim edited this page Dec 17, 2021 · 12 revisions

Check the utils folder for additional cases, scripts, geo files and meshes.

Pull requests

Title

Each pull request should only either fix an issue, add a single feature or restructure the code for one aspect, plus a test, if needed, to certify it. If there are many aspects to change, it is better to create multiples branches and create multiple pull requests. The title should start with an action verb and only contain one idea.

Review process

  • At least 2 reviewers for minor changes, like a bug fix or a small feature
  • At least 3 reviewers for bigger changes like bigger features and architectural reconfiguration.
  • The reviewer should be notified before opening the pull request. The reviewers should be selected from already existing contributor to the code. (See section: Insights\Contributors).

Review responsibility

  • Give a review of the code implementation and general functionality of the code.
  • Give a review on the code description and comments.
  • Verify that the pull request meets the requirement described above regarding testing and the format of the pull request.
  • Give the review in a timely manner.

Wiki

Edition with Markdown wiki: Markdown Cheatsheet and Synthax guidance.

Images

Add in the git project:

  1. Clone the wiki git project locally:

        git clone https://github.com/lethe-cfd/lethe.wiki.git
    
    • NB: if previously cloned, go to lethe.wiki folder and pull: git pull
  2. Navigate to lethe.wiki/images and create a sub-folder to organize the images (ex/ myPage)

  3. Copy/paste the images in the new subfolder (ex/ myFolder)

  4. Add it to the git project:

        git add images/myFolder/*
        git commit -m "added images for page myPage"
        git push
    

Use the image in a wiki page with the html code (allow to define the width in pixel):

   <img src="./images/myFolder/image.png" width="800">

Table of content

For now, the only way to have a table of content in Markdown github synthax is by doing it manually. These tools can also be used to generate it:

Equations

Special characters in the text: &alpha; gives α

LaTeX equations can be formatted using a special tweak: ![<your_equation>](https://latex.codecogs.com/svg.latex?<your_equation>)

In the generated https, there should be no spaces: remove spaces in your equation, or add &space; in the link if necessary (see example 2 below). For simplicity, it can be done easily in any text editor.

Examples:

  1. ![i^2=-1](https://latex.codecogs.com/svg.latex?i^2=-1)

    • gives: i^2=-1
  2. ![df=\frac{\partial f}{\partial t}](https://latex.codecogs.com/svg.latex?df=\frac{\partial&space;f}{\partial&space;t})

    • gives: df=\frac{\partial f}{\partial t}
  3. ![\rho\left[\frac{\partial \bar{u}}{\partial t} + \bar{u}\cdot\bar{\nabla} \bar{u} \right] = - \bar{\nabla} \bar{p} + \mu \bar{\nabla}^2 \bar{u} + \rho \bar{g}](https://latex.codecogs.com/svg.latex?&space;\rho\left[\frac{\partial&space;\bar{u}}{\partial&space;t}&space;+&space;\bar{u}\cdot\bar{\nabla}&space;\bar{u}\right]&space;=&space;-&space;\bar{\nabla}&space;\bar{p}&space;+&space;\mu&space;\bar{\nabla}^2&space;\bar{u}&space;+&space;\rho&space;\bar{g})

    • gives: \rho\left[\frac{\partial \bar{u}}{\partial t} + \bar{u}\cdot\bar{\nabla} \bar{u} \right] = - \bar{\nabla} \bar{p} + \mu \bar{\nabla}^2 \bar{u} + \rho \bar{g}

Code

Default language: <pre><code> your_code </code></pre> or ``` your_code ```

Python syntax highlight: ```python your_code ```

C++ syntax highlight: ```c++ your_code ```

Examples:

  1. ```python for i in range(5): print(i) ```
    • gives:
for i in range(5):
  print(i)
  1. ```c++ for (int i = 0 ; i<5 ; i++) { std::cout << i << std::endl; } ```
    • gives:
for (int i = 0 ; i<5 ; i++)
{
 std::cout << i << std::endl;
}

Tables


| My | Beautiful | Table |
| ------------- |:-------------:| -----:|
| left-aligned | centered | right-aligned |
| tables | are | rendered |
| with | automatic | strip |

Gives:

My Beautiful Table
left-aligned centered right-aligned
tables are rendered
with automatic strip
Clone this wiki locally