How to contribute?
In the following paragraphs we describe the guidelines for contributing to Qibo.
Code review process
All code submissions require a review and continous integration tests beforing accepting the code and merging to the git master branch.
We use the GitHub pull request mechanism which can be summarized as follows:
Fork the Qibo repository.
Checkout master and create a new branch from it
git checkout master -b new_branch
new_branchis the name of your new branch.
Implement your new feature on
When you are done, push your branch with:
git push origin new_branch
At this point you can create a pull request by visiting the Qibo GitHub page.
The review process will start and changes in your code may be requested.
When commits are pushed to the branches in the GitHub repository, we perform integrity checks to ensure that the new features do not break Qibo functionalities and meets our coding standards.
The current code standards that are applied to any new changes:
Tests: We use pytest to run our tests that must continue to pass when new changes are integrated in the code. Regression tests, which are run by the continuous integration workflow are stored in
qibo/tests. These tests contain several examples about how to use Qibo.
Coverage: Test coverage should be maintained / be at least at the same level when new features are implemented.
Pylint: Test code for anomalies, such as bad coding practices, missing documentation, unused variables.
Besides the linter, further custom rules are applied e.g. checks for
# CodeText:skip flag).
The Qibo documentation is automatically generated with sphinx, thus all functions should be documented using
doc folder contains the project setup for the documentation
The documentation requirements can be installed with:
pip install qibo[docs]
Alternatively, install the packages listed in the
extras_require option in
In order to build the documentation web page locally please perform the following steps:
cd doc make html
This last command generates a web page in
doc/build/html/. You can browse
the local compiled documentation by opening
The sections in the documentation are controlled by the
*.rst files located
doc/source/. The application tutorials are rendered from markdown by
linking the respective files from