Skip to content

Contribute

Rodolfo Dirack edited this page Feb 29, 2020 · 4 revisions

How to contribute with this project?

Please follow the steps above:

1. fork the project in https://github.com/Dirack/diffractionSimulator/fork

This is an open source project, distributed above GPL3 License. If you fork it, you automatically agree with the terms disposed in this License.

2. Create a branch for your new feature.

Use a clear branch name with context. Example, 'feature/parseOutputProgramMorseinJSON' is better than 'feature/morse'.

Add headers in your source code or modify the existent ones following the template bellow:

#!/bin/bash
#
# programName (Shell Script)
#
# Dependencies: -lynx. Use 'sudo apt-get install lynx' to install.
#
# Purpose: Download SConstruct files from MADAGASCAR website.
# 
# Site: http://www.dirackslouge.online
#
# Version 1.0
#
# Programer: Rodolfo A. C. Neves 30/06/2019
# 
# Email (Maintenance): [email protected]
# 
# License: GPL-3.0 <https://www.gnu.org/licenses/gpl-3.0.txt>.

3. Do a clear commit message (50 characters title and two paragraphs of text body).

The commit history is so important as the source file content and feature. The standard commit message used in this repository has a maximum of 50 characters title and two paragraphs describing your modification. Pull Requests with insufficient commit history will be rejected. If needed, use commit reference to other commits and issues inside your commit message.

If the modification is too small (such as a variable value or one code line) the commit message could have only a title. However, for meaningful modifications, the commits should have title and message as described above.

It is recommended to avoid explanation of the logic of your modification in the source file with comments. this can be done with clear commit messages extensively. If your explanation is too long (more then two paragraphs), it is better to separate this modifications in two or more commits with clearer and shorter commit messages.

Use clear variable and function names with context, in camelCase format preferably. Example for variables, 'temporaryFiles' is better than 'tmp', or 'username' is better than just 'name'. And for functions, 'formatDirectoryName' is better than 'fmtdir'.

An example of a standardized commit bellow:

Program morse - Send email from bash terminal

Morse uses 'sendemail' to send emails throughout a shell terminal. Its
interface is based on 'Dialog', a program that generates iterative dialog
boxes in the shell terminal screen.

4. Push your modifications in your repository.

Use the command bellow to push:

~$ git push origin master

5. Do a Pull Request with a clear description of your modifications.

Your Pull Request should have a clear and detailed description of your modifications and their purpose, use images and code snippets to detail your contribution.

It is fairly recommended to add usage examples and tests in your Pull Request to increase the probability of acceptance. Do not forget to document this examples and tests with README files and to join then in a separated directory in your Pull Request.

Clone this wiki locally