👏🎉 First off, thanks for taking the time to contribute! 🎉👏
The following is a set of guidelines for contributing to Mitype. These are mostly guidelines, not rules. Use your best judgment.
Read build document if you want to understand how mitype works or want to debug an issue and run it locally.
- All pull requests must have an issue linked with it. Please create an issue if it doesn't exist already before creating a pull request.
- Creating an issue beforehand helps discuss bugs and enhancements before work begins, preventing wasted effort.
- Comment on an issue if you are willing to work on it if no one else is assigned already.
-
Follow the styleguides.
-
Single feature or bug-fix per PR.
-
Make your modification compact - don't reformat source code in your request. It makes code review more difficult.
- Use the present tense ("Add feature" not "Added feature")
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
- Do not end the title with full-stop
- Limit the title to 72 characters or less
- Leave one line empty after your title if the message has a body
- Refer issues like "This fixes bug #ID" at the end of the body
All python code is linted with black by running black .
- Place imports in the following order:
- Built-in Python Modules (such as
os
) - Mitype Modules (using relative paths)
- Built-in Python Modules (such as
- Format imports using isort by running
isort --profile black .
- Avoid platform-dependent code
You can run the above styling checks manually, however we encourage you to use pre-commit hooks instead. Install pre-commit and set up the hooks by running the following commands.
pip install pre-commit
pre-commit install
Now during a commit, all the checks will run on the modified files.
You can run pre-commit against all the files without committing by running -
pre-commit run --all-files
While contributing to the project, it is very important to maintain a healthy environment! Hence we request you to follow the Code of Conduct.