Skip to content

How to contribute to Glances ?

Nicolas Hennion edited this page Oct 20, 2024 · 11 revisions

Glances development factory uses the spirit of the the 'git flow' workflow: http://danielkummer.github.io/git-flow-cheatsheet/.

The following branches are available:

  • master: this is the master and stable branch, all the continuous integration is based on this branch. Nothing should be pulled request on this branch.
  • develop: this is the main development branch for Glances 3.x. The pull request for news features should be done on this branch.
  • release/glances2: this is the maintenance branch for Glances 2.x. Only hotfix pull request could be done on this branch.

Clone the Glances repository

First of all, you have to fork the Glances repository to your computer using the Fork button on the upper right side of the Github Web site.

Then clone locally using the following command line:

git clone git@github.com:USERNAME/glances.git

Note: replace USERNAME by your Github login name.

Add the main repository as upstream

git remote add upstream git@github.com:nicolargo/glances.git

Clone the Glances repository

Create the development environment:

make venv

Run the unit-test locally:

make test

Run Glances locally:

make run

or run-webserver, ru-server, run-client, run-browser.

Correct a bug or add a new feature

Update your repository with the upstream:

git fetch upstream

All news features should be made from the DEVELOP branch.

git checkout develop

Create bug/feature branch:

git checkout -b BRANCHNAME

Note: replace BRANCH by your bug/feature name (ex: bug/issue666 or feature/issue666)

It's time to code...

Your code should be PEP compliant, you can check it with:

make lint

Commit your branch:

git commit -a -m "Description - #6666"

Get latest works from others developer:

git pull origin feature/issue666

Push it:

git push -u origin feature/issue666

Send a message (in the relative issue thread), your code will be review by the Glances team. When all is good, use the pull request function in GitHub to propose your new feature.