Skip to content
This repository has been archived by the owner on Sep 13, 2019. It is now read-only.

Latest commit

 

History

History
97 lines (59 loc) · 3.74 KB

CONTRIBUTING.md

File metadata and controls

97 lines (59 loc) · 3.74 KB

Contributing

We appreciate all kinds of help, so thank you! 👏 😘

You can contribute in many ways to this project.

Issue reporting

🔥 This is a goog point to start, when you find a problem please add it to the issue traker.

Doubts solving

👭 To help less advanced users is another wonderful way to start. You can help us to close some opened issues. This kind of tickets should be labeled as question.

Improvement proposal

😈 If you have an idea for a new feature please open a ticket labeled as enhancement. If you could also add a piece of code with the idea or a partial implementation it would be awesome.

Documentation

👀 We all know the doc always need fixes/upgrades 😉, so please feel free to send a PR (see next point) with what you found.

Code

⭐ This section include some tips that will help you to push source code.

Doc

Review the parts of the documentation regarding the new changes and update it if it is needed.

License

All our open source sofware is published under the Apache 2.0 license.

Please, add your name in the head comment of each file you contribute to (under the tag "Authors").

Pull requests

  • We use GitHub pull requests to accept the contributions.
  • Review the parts of the documentation regarding the new changes and update it if it's needed.
  • New features often imply changes in the existent tests or new ones are needed. Once they're updated/added please be sure they keep passing.

Commits

Please follow the next rules for the commit messages:

  • It should be formed by a one-line subject, followed by one line of white space. Followed by one or more descriptive paragraphs, each separated by one line of white space. All of them finished by a dot.
  • If it fixes an issue, it should include a reference to the issue ID in the first line of the commit.
  • It should provide enough information for a reviewer to understand the changes and their relation to the rest of the code.

From here, depending of the nature of the project, we have specific recommendations about the code style, the debuggins engine or how to run the tests and the rest of security checks. Please visit the one regarding your project.

Environment

  • A better way to install Node.js for developers is to use nvm, to test different versions.
  • Get the code and install all dependencies:
https://github.com/Qiskit/qiskit-js
cd qiskit-js
npm i
npm start -- --help

Style guide

Submit clean code and please make effort to follow existing conventions in order to keep it as readable as possible. We love ES6, so we use ESLint and the Airbnb style guide. It's the most complete, so it forces the developers to keep a consistent style. Moreover, we auto-format the code in each commit, thanks to Prettier. Please run to be sure your code fits with it:

npm run lint

Test

We've chosen the Mocha testing engine with the core "assert" module.

npm test

# To include also the ones which need an API key.
QX_KEY=your_api_key npm test

This command also checks for:

  • Style linting.
  • Outdated/lost/unused dependencies.
  • Insecure dependencies.

Debugging

To debug we use the visionmedia module. So you have to use the proper environment variable with the name of the project:

DEBUG=qiskit* npm start
DEBUG=qiskit:bin* npm start