Skip to content

Latest commit

 

History

History
47 lines (34 loc) · 3.49 KB

CONTRIBUTING.md

File metadata and controls

47 lines (34 loc) · 3.49 KB

Contributing

Did you write nice code which can be useful for others? Have an idea for something to add? We'd love to have your contribution! There are several ways in which you can contribute, please see what suits you the most and don't be shy about asking for help.

Opening an issue

The easiest way to contribute is to simply open an issue. This can be used if you have an idea for a new tool, if you have an idea on how to improve an existing one or if you found a bug. In addition, this can also be used in case you're having any issue contributing your own code.

Directly contributing to the repository

If you want to contribute code to the Python package, you would need to work with GitHub. If you've never worked with a git repository, then you should know that it is an online repository that helps with code management. If you don't have git software on your computer, then you can use GitHub Desktop. You can read more about git here.

GitHub has a page dedicated to explaining the steps for contributing to repositories. You can click on the desktop link on the top of the webpage to get to the GitHub Desktop instructions. The steps can be summarized as follows:

  1. Fork the repository
  2. Create a branch (Optional, see below)
  3. Write your changes and push them.
  4. Open a Pull Request (PR) back to the main repository.
  5. An admin will take a look at your code. If changes are needed, we will either ask you to do them or, with your permission, do them ourselves.
  6. An admin will merge your contribution.

Feel free to ask for help at any step along the way. If needed, we will step in and help you finalize your code.

Code standards

In order to maintain a high standard of quality, we follow several coding guidelines, and we have a few tips to help facilitate the process. At any point, you can simply open a PR, state that you are having problems with the technical details, and we would step in and help.

Coding tips to avoid merge conflicts:

  1. Build new features or fix existing ones in a branch. You can do as many commits as you want to a branch, saving your work as you go along. You can push this feature branch to save your work and back it up.

    Note: You must work on your own fork, we recommend that you create a branch in your fork.

  2. Make sure your fork is in sync with the main repository.

Code standard guidelines:

  1. When you are ready to merge your code into the main repository, you need to make sure that all of your commits and commit messages are good and descriptive. You can always squash your commits into a few (or a single) commits.

  2. We use black to make sure that our code is standardized. Format your code before opening the PR by first install black:pip install black and then type in the terminal black .\qualang_tools\ (At the root of the repository)

  3. When adding new features, add appropriate tests to the test folder that checks the validity of the tools/features.

    Note: If you're not sure how to write tests or which test to write, just leave it to us.